8.2.3. The CustomApp base class
|
Base Class to ease the implementation of User Interfaces |
- class pymodaq_gui.utils.custom_app.CustomApp(parent=None, tree=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.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 (
Union[DockArea,QMainWindow,QWidget])
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
Non mandatory method to be subclassed in order to do things after the UI setup
quit_fun()Method to be subclassed in order to define a custom quit function
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
- do_things_after_ui_setup()[source]
Non mandatory method to be subclassed in order to do things after the UI setup
- 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