dip.shell.shells.qmainwindow

This module contains the implementation of the QMainWindow based user interface shell.

QMainWindowShell

class dip.shell.shells.qmainwindow.QMainWindowShell

Base class: QObjectFactory

The QMainWindowShell class is an implementation of a user interface shell using QMainWindow. It places tools in the central widget according to the tab_policy and unmanaged tools in dock widgets.

id = 'dip.shell'
The shell’s identifier.
menu_bar = Instance(QMenuBar)
The QMenuBar that is added to the QMainWindow. If it is None then no menu bar is added.
menus = List()
The list of menus to be added to the menu bar, typically by using MenuBar.
tab_policy = Enum('on_demand', 'always', 'never')
This specifies when tabs should be used. 'on_demand' means that tabs are displayed when there is more than one tool. 'always' means that tabs are always displayed, even when there is only one tool. 'never' means that tabs are never displayed and only one tool can be used at a time.
__init__(**properties)
Initialize the QMainWindow shell.
add_tool(tool)

Add a tool to the shell.

Parameter:tool – is the tool to add.
perform_close(tool)

Close a tool asking the user for help where necessary.

Parameter:tool – is the tool to close.
perform_new()
Create a tool for a new shell object asking the user for help where necessary.
perform_open()
Create a tool for a shell object read from storage asking the user for help where necessary.
perform_quit()
Confirm that the user wants to quit given the state of any shell objects.
perform_save(tool)

Write a shell object to storage at its current location asking the user for help where necessary.

Parameter:tool – is the tool operating on the shell object to write.
perform_save_as(tool)

Write a shell object to storage at a new location asking the user for help where necessary.

Parameter:tool – is the tool operating on the shell object to write.

Table Of Contents

Previous topic

dip.shell.actions

Next topic

dip.ui

This Page