7.5.6.2. pymodaq_gui.utils.custom_app module
- class pymodaq_gui.utils.custom_app.CustomApp(parent: DockArea | QWidget)[source]
Bases:
QObject,ActionManager,ParameterManagerBase Class to ease the implementation of User Interfaces
Inherits the MixIns ActionManager and ParameterManager classes. You have to subclass some methods and make concrete implementation of a given number of methods:
setup_actions: mandatory, see
pymodaq.utils.managers.action_manager.ActionManagervalue_changed: non mandatory, see
pymodaq.utils.managers.parameter_manager.ParameterManagerchild_added: non mandatory, see
pymodaq.utils.managers.parameter_manager.ParameterManagerparam_deleted: non mandatory, see
pymodaq.utils.managers.parameter_manager.ParameterManagersetup_docks: mandatory
setup_menu: non mandatory
connect_things: mandatory
- Parameters:
parent (DockArea or QtWidget) –
See also
pymodaq.utils.managers.action_manager.ActionManager,pymodaq.utils.managers.parameter_manager.ParameterManager,pymodaq.utils.managers.modules_manager.ModulesManagerMethods
Connect actions and/or other widgets signal to methods
Mandatory method to be subclassed to setup the docks layout
setup_menu([menubar])Non mandatory method to be subclassed in order to create a menubar
log_signal
setup_ui
- setup_docks()[source]
Mandatory method to be subclassed to setup the docks layout
Examples
>>>self.docks[‘ADock’] = gutils.Dock(‘ADock name’) >>>self.dockarea.addDock(self.docks[‘ADock’]) >>>self.docks[‘AnotherDock’] = gutils.Dock(‘AnotherDock name’) >>>self.dockarea.addDock(self.docks[‘AnotherDock’’’], ‘bottom’, self.docks[‘ADock’])
See also
pyqtgraph.dockarea.Dock
Non mandatory method to be subclassed in order to create a menubar
create menu for actions contained into the self._actions, for instance:
Examples
>>>file_menu = self._menubar.addMenu(‘File’) >>>self.affect_to(‘load’, file_menu) >>>self.affect_to(‘save’, file_menu)
>>>file_menu.addSeparator() >>>self.affect_to(‘quit’, file_menu)
See also
pymodaq.utils.managers.action_manager.ActionManager
- log_signal
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- params = []