mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-14 03:31:50 +02:00
fix(setting_widget): added parent kwarg into all settings widgets in plotting framework
This commit is contained in:
@ -213,7 +213,7 @@ class MotorMap(PlotBase):
|
|||||||
|
|
||||||
def _add_motor_map_settings(self):
|
def _add_motor_map_settings(self):
|
||||||
"""Add the motor map settings to the side panel."""
|
"""Add the motor map settings to the side panel."""
|
||||||
motor_map_settings = MotorMapSettings(target_widget=self, popup=False)
|
motor_map_settings = MotorMapSettings(parent=self, target_widget=self, popup=False)
|
||||||
self.side_panel.add_menu(
|
self.side_panel.add_menu(
|
||||||
action_id="motor_map_settings",
|
action_id="motor_map_settings",
|
||||||
icon_name="settings_brightness",
|
icon_name="settings_brightness",
|
||||||
@ -249,7 +249,7 @@ class MotorMap(PlotBase):
|
|||||||
"""
|
"""
|
||||||
action = self.toolbar.widgets["motor_map_settings"].action
|
action = self.toolbar.widgets["motor_map_settings"].action
|
||||||
if self.motor_map_settings is None or not self.motor_map_settings.isVisible():
|
if self.motor_map_settings is None or not self.motor_map_settings.isVisible():
|
||||||
motor_map_settings = MotorMapSettings(target_widget=self, popup=True)
|
motor_map_settings = MotorMapSettings(parent=self, target_widget=self, popup=True)
|
||||||
self.motor_map_settings = SettingsDialog(
|
self.motor_map_settings = SettingsDialog(
|
||||||
self,
|
self,
|
||||||
settings_widget=motor_map_settings,
|
settings_widget=motor_map_settings,
|
||||||
|
@ -156,7 +156,7 @@ class MultiWaveform(PlotBase):
|
|||||||
self.layout_manager.add_widget_relative(
|
self.layout_manager.add_widget_relative(
|
||||||
self.control_panel, self.round_plot_widget, "bottom"
|
self.control_panel, self.round_plot_widget, "bottom"
|
||||||
)
|
)
|
||||||
self.controls = MultiWaveformControlPanel(target_widget=self)
|
self.controls = MultiWaveformControlPanel(parent=self, target_widget=self)
|
||||||
self.control_panel.add_menu(
|
self.control_panel.add_menu(
|
||||||
action_id="control",
|
action_id="control",
|
||||||
icon_name="tune",
|
icon_name="tune",
|
||||||
|
@ -171,7 +171,7 @@ class PlotBase(BECWidget, QWidget):
|
|||||||
"""Adds multiple menus to the side panel."""
|
"""Adds multiple menus to the side panel."""
|
||||||
# Setting Axis Widget
|
# Setting Axis Widget
|
||||||
try:
|
try:
|
||||||
axis_setting = AxisSettings(target_widget=self)
|
axis_setting = AxisSettings(parent=self, target_widget=self)
|
||||||
self.side_panel.add_menu(
|
self.side_panel.add_menu(
|
||||||
action_id="axis",
|
action_id="axis",
|
||||||
icon_name="settings",
|
icon_name="settings",
|
||||||
@ -200,7 +200,7 @@ class PlotBase(BECWidget, QWidget):
|
|||||||
"""
|
"""
|
||||||
settings_action = self.toolbar.widgets["axis"].action
|
settings_action = self.toolbar.widgets["axis"].action
|
||||||
if self.axis_settings_dialog is None or not self.axis_settings_dialog.isVisible():
|
if self.axis_settings_dialog is None or not self.axis_settings_dialog.isVisible():
|
||||||
axis_setting = AxisSettings(target_widget=self, popup=True)
|
axis_setting = AxisSettings(parent=self, target_widget=self, popup=True)
|
||||||
self.axis_settings_dialog = SettingsDialog(
|
self.axis_settings_dialog = SettingsDialog(
|
||||||
self, settings_widget=axis_setting, window_title="Axis Settings", modal=False
|
self, settings_widget=axis_setting, window_title="Axis Settings", modal=False
|
||||||
)
|
)
|
||||||
|
@ -142,7 +142,7 @@ class ScatterWaveform(PlotBase):
|
|||||||
Initialize the scatter curve settings menu.
|
Initialize the scatter curve settings menu.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
scatter_curve_settings = ScatterCurveSettings(target_widget=self, popup=False)
|
scatter_curve_settings = ScatterCurveSettings(parent=self, target_widget=self, popup=False)
|
||||||
self.side_panel.add_menu(
|
self.side_panel.add_menu(
|
||||||
action_id="scatter_curve",
|
action_id="scatter_curve",
|
||||||
icon_name="scatter_plot",
|
icon_name="scatter_plot",
|
||||||
@ -178,7 +178,7 @@ class ScatterWaveform(PlotBase):
|
|||||||
"""
|
"""
|
||||||
scatter_settings_action = self.toolbar.widgets["scatter_waveform_settings"].action
|
scatter_settings_action = self.toolbar.widgets["scatter_waveform_settings"].action
|
||||||
if self.scatter_dialog is None or not self.scatter_dialog.isVisible():
|
if self.scatter_dialog is None or not self.scatter_dialog.isVisible():
|
||||||
scatter_settings = ScatterCurveSettings(target_widget=self, popup=True)
|
scatter_settings = ScatterCurveSettings(parent=self, target_widget=self, popup=True)
|
||||||
self.scatter_dialog = SettingsDialog(
|
self.scatter_dialog = SettingsDialog(
|
||||||
self,
|
self,
|
||||||
settings_widget=scatter_settings,
|
settings_widget=scatter_settings,
|
||||||
|
@ -260,7 +260,7 @@ class Waveform(PlotBase):
|
|||||||
curve_action = self.toolbar.widgets["curve"].action
|
curve_action = self.toolbar.widgets["curve"].action
|
||||||
|
|
||||||
if self.curve_settings_dialog is None or not self.curve_settings_dialog.isVisible():
|
if self.curve_settings_dialog is None or not self.curve_settings_dialog.isVisible():
|
||||||
curve_setting = CurveSetting(target_widget=self)
|
curve_setting = CurveSetting(parent=self, target_widget=self)
|
||||||
self.curve_settings_dialog = SettingsDialog(
|
self.curve_settings_dialog = SettingsDialog(
|
||||||
self, settings_widget=curve_setting, window_title="Curve Settings", modal=False
|
self, settings_widget=curve_setting, window_title="Curve Settings", modal=False
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user