8.2.3. The CustomApp base class

CustomApp(parent[, dashboard])

Base Class to ease the implementation of User Interfaces

class pymodaq.utils.gui_utils.CustomApp(parent: Union[DockArea, QWidget], dashboard: 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:

Parameters
  • parent (DockArea or QtWidget) –

  • dashboard (DashBoard, optional) –

Attributes
modules_manager

useful tool to interact with DAQ_Moves and DAQ_Viewers

Methods

connect_things()

Connect actions and/or other widgets signal to methods

setup_docks()

Mandatory method to be subclassed to setup the docks layout

setup_menu()

Non mandatory method to be subclassed in order to create a menubar

log_signal

setup_ui

connect_things()[source]

Connect actions and/or other widgets signal to methods

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

setup_menu()[source]

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: ModulesManager

useful tool to interact with DAQ_Moves and DAQ_Viewers

Will be available if a DashBoard has been set

Return type

ModulesManager