bec_widgets.utils.settings_dialog ================================= .. py:module:: bec_widgets.utils.settings_dialog Classes ------- .. autoapisummary:: bec_widgets.utils.settings_dialog.SettingWidget bec_widgets.utils.settings_dialog.SettingsDialog Module Contents --------------- .. py:class:: SettingWidget(parent=None, *args, **kwargs) Bases: :py:obj:`qtpy.QtWidgets.QWidget` Abstract class for a settings widget to enforce the implementation of the accept_changes and display_current_settings. Can be used for toolbar actions to display the settings of a widget. :param target_widget: The widget that the settings will be taken from and applied to. :type target_widget: QWidget .. py:method:: accept_changes() Accepts the changes made in the settings widget and applies them to the target widget. .. py:method:: cleanup() Cleanup the settings widget. .. py:method:: closeEvent(event: qtpy.QtGui.QCloseEvent) -> None .. py:method:: display_current_settings(config_dict: dict) Displays the current settings of the target widget in the settings widget. :param config_dict: The current settings of the target widget. :type config_dict: dict .. py:method:: set_target_widget(target_widget: qtpy.QtWidgets.QWidget) .. py:attribute:: target_widget :value: None .. py:class:: SettingsDialog(parent=None, settings_widget: SettingWidget = None, window_title: str = 'Settings', config: dict = None, modal: bool = False, *args, **kwargs) Bases: :py:obj:`qtpy.QtWidgets.QDialog` Dialog to display and edit the settings of a widget with accept and cancel buttons. :param parent: The parent widget of the dialog. :type parent: QWidget :param target_widget: The widget that the settings will be taken from and applied to. :type target_widget: QWidget :param settings_widget: The widget that will display the settings. :type settings_widget: SettingWidget .. py:method:: accept() Accept the changes made in the settings widget and close the dialog. .. py:method:: apply_changes() Apply the changes made in the settings widget without closing the dialog. .. py:method:: cleanup() Cleanup the dialog. .. py:method:: closeEvent(event) .. py:method:: reject() Reject the changes made in the settings widget and close the dialog. .. py:attribute:: apply_button .. py:attribute:: button_box .. py:attribute:: layout .. py:attribute:: widget :value: None