6.2.2. The CustomApp base class¶
|
Base Class to ease the implementation of User Interfaces |
- class pymodaq.utils.gui_utils.CustomApp(parent: Union[DockArea, QWidget], dashboard=None)[source]¶
Base 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.ActionManager
value_changed: non mandatory, see
pymodaq.utils.managers.parameter_manager.ParameterManager
child_added: non mandatory, see
pymodaq.utils.managers.parameter_manager.ParameterManager
param_deleted: non mandatory, see
pymodaq.utils.managers.parameter_manager.ParameterManager
setup_docks: mandatory
setup_menu: non mandatory
connect_things: mandatory
- Parameters
parent (DockArea or QtWidget) –
dashboard (DashBoard, optional) –
See also
pymodaq.utils.managers.action_manager.ActionManager
,pymodaq.utils.managers.parameter_manager.ParameterManager
,pymodaq.utils.managers.modules_manager.ModulesManager
,pymodaq.dashboard.DashBoard
- Attributes
modules_manager
useful tool to interact with DAQ_Moves and DAQ_Viewers
Methods
Connect actions and/or other widgets signal to methods
Mandatory method to be subclassed to setup the docks layout
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)
- property modules_manager¶
useful tool to interact with DAQ_Moves and DAQ_Viewers
Will be available if a DashBoard has been set
- Return type