8.6.4.1.2. pymodaq_gui.managers.settings.subentries module
- class pymodaq_gui.managers.settings.subentries.SettingsEntryHandler(model, settings, *args, ind_subentry=None, **kwargs)[source]
Bases:
SubEntryHandlerMethods
execute_subentry(entry, *args, **kwargs)Execute the given subentry
- execute_subentry(entry, *args, **kwargs)[source]
Execute the given subentry
In general, should get first the module on which the settings will be applied Then apply the Settings subentry to this module
Examples
module = self.get_module(entry, *args, **kwargs) module.settings.child(*entry.setting.path).setValue(entry.setting.value())
- handler_name: SubEntryHandlerTypes = 'Settings'
- staticMetaObject = PySide6.QtCore.QMetaObject("SettingsEntryHandler" inherits "SubEntryHandler": )
- use_dialog = False
- class pymodaq_gui.managers.settings.subentries.SubEntry(entry_type, module_name, setting)[source]
Bases:
objectDepending on the module or modules this manager handles, the attributes below should be completed as well as the serialization/deserialization
Methods
deserialize(bytes_str)Convert bytes into a ParameterWithPath object
serialize
- entry_type: SubEntryHandlerTypes | str
- setting: ParameterWithPath
- class pymodaq_gui.managers.settings.subentries.SubEntryHandler(model, settings, *args, ind_subentry=None, **kwargs)[source]
Bases:
QObjectMethods
execute_subentry(entry, **kwargs)Execute the given subentry and emit the signal sub_entry_done when done
get_module(entry, *args, **kwargs)Get the ParameterManager module on which the settings will be applied
Get a StateSubEntry from the dialog
To reimplement
executed_signal
execution_failed
new_entry
setup_ui
show_dialog
sub_entry_done
subentry_set
- static get_module(entry, *args, **kwargs)[source]
Get the ParameterManager module on which the settings will be applied
To be reimplemented
- Return type:
- execute_subentry(entry, **kwargs)[source]
Execute the given subentry and emit the signal sub_entry_done when done
- get_subentry_from_dialog()[source]
Get a StateSubEntry from the dialog
To be reimplemented
- Return type:
- setup_widgets()[source]
To reimplement
You can use self.widget as the container for your custom widgets!
- executed_signal
- execution_failed
- handler_name: SubEntryHandlerTypes = <pymodaq_utils.abstract.DummyAttribute object>
- model: SettingsManagerModel
- new_entry
- staticMetaObject = PySide6.QtCore.QMetaObject("SubEntryHandler" inherits "QObject": Methods: #4 type=Signal, signature=new_entry(PyObject), parameters=PyObject #5 type=Signal, signature=executed_signal(int), parameters=int #6 type=Signal, signature=execution_failed(PyObject), parameters=PyObject #7 type=Signal, signature=sub_entry_done(bool), parameters=bool )
- sub_entry_done
- use_dialog = True
- class pymodaq_gui.managers.settings.subentries.SubEntryHandlerFactory[source]
Bases:
objectThe factory class to get SubEntry handlers
- Attributes:
- entries
Methods
get_subentry_handler(subentry_name)Factory command to get registered subentry handler.
Class decorator method to register SubEntryHandlers class to the internal registry.
- classmethod get_subentry_handler(subentry_name)[source]
Factory command to get registered subentry handler.
This method gets the appropriate executor class from the registry
- Return type:
- classmethod register_handler()[source]
Class decorator method to register SubEntryHandlers class to the internal registry. Must be used as a decorator above the definition of an SubEntryHandler inherited class.
The entry class must implement specific class attributes and methods
- Return type:
- handlers_registry = {StateSubEntryHandlerTypes.ACTUATOR_VALUE: <class 'pymodaq.utils.managers.state.subentries.ActuatorValueSubEntryHandler'>, 'ControlModulesSettings': <class 'pymodaq.extensions.scan.manager.subentries.ControlModulesEntryHandler'>, StateSubEntryHandlerTypes.INIT: <class 'pymodaq.utils.managers.state.subentries.InitSubEntryHandler'>, 'ScannerSubType': <class 'pymodaq.extensions.scan.manager.subentries.ScannnerEntryHandler'>, SubEntryHandlerTypes.SETTINGS: <class 'pymodaq_gui.managers.settings.subentries.SettingsEntryHandler'>, 'StartScanSubType': <class 'pymodaq.extensions.scan.manager.subentries.StartScanEntryHandler'>, StateSubEntryHandlerTypes.SETTINGS: <class 'pymodaq.utils.managers.state.subentries.StateSettingsEntryHandler'>, StateSubEntryHandlerTypes.STOP_ALL: <class 'pymodaq.utils.managers.state.subentries.StopAllSubEntryHandler'>, StateSubEntryHandlerTypes.STOP_EXTENSION: <class 'pymodaq.utils.managers.state.subentries.StopExtensionSubEntryHandler'>, StateSubEntryHandlerTypes.STOP: <class 'pymodaq.utils.managers.state.subentries.StopSubEntryHandler'>, StateSubEntryHandlerTypes.WAIT: <class 'pymodaq.utils.managers.state.subentries.WaitSubEntryHandler'>, 'scan_settings': <class 'pymodaq.extensions.scan.manager.subentries.ScanSettingsEntryHandler'>}