mainwindow¶
- class camelot.view.mainwindow.MainWindow(gui_context, parent=None)[source]¶
Main window of a Desktop Camelot application
Parameters: - gui_context – an camelot.admin.action.application_action.ApplicationActionGuiContext object
- parent – a QtWidgets.QWidget object or None
- action_triggered(_checked=False)[source]¶
Execute an action that was triggered somewhere in the main window, such as the toolbar or the main menu
- get_gui_context()[source]¶
Get the GuiContext of the active view in the mainwindow, or the GuiContext of the application.
Returns: a camelot.admin.action.base.GuiContext
Set the main menu :param main_menu: a list of camelot.admin.menu.Menu objects,
as returned by the camelot.admin.application_admin.ApplicationAdmin.get_main_menu() method.
- set_sections(sections)[source]¶
Set the sections of the navigation pane :param main_menu: a list of camelot.admin.section.Section objects,
as returned by the camelot.admin.application_admin.ApplicationAdmin.get_sections() method.
- set_toolbar_actions(toolbar_area, toolbar_actions)[source]¶
Set the toolbar for a specific area :param toolbar_area: the area on which to put the toolbar, from
Qt.LeftToolBarArea through Qt.BottomToolBarAreaParameters: toolbar_actions – a list of camelot.admin.action..base.Action objects, as returned by the camelot.admin.application_admin.ApplicationAdmin.get_toolbar_actions() method.