mainwindow

class camelot.view.mainwindow.MainWindow(gui_context, parent=None)[source]

Main window of a Desktop Camelot application

Parameters:
action_triggered(_checked=False)[source]

Execute an action that was triggered somewhere in the main window, such as the toolbar or the main menu

change_view_mode()[source]

Switch between hidden or shown menubar and navigation pane

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
read_settings()[source]

Restore the geometry of the main window to its last saved state

set_main_menu(main_menu)[source]

Set the main menu :param main_menu: a list of camelot.admin.menu.Menu objects,

set_sections(sections)[source]

Set the sections of the navigation pane :param main_menu: a list of camelot.admin.section.Section objects,

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.BottomToolBarArea
Parameters:toolbar_actions – a list of camelot.admin.action..base.Action objects, as returned by the camelot.admin.application_admin.ApplicationAdmin.get_toolbar_actions() method.
unmaximize_view()[source]

Show the navigation pane and the menu bar if they exist

view_activated()[source]

Update the state of the actions when the active tab in the desktop widget has changed

write_settings()[source]

Store the current geometry of the main window