dip.shell.actions

The dip.shell.actions module provides support for actions including standard actions for managing the lifecycle of a shell object.

CloseAction

class dip.shell.actions.CloseAction

Base class: ShellAction

The CloseAction class is a shell action that invokes the perform_close() method.

id = 'dip.shell.actions.close'
The identifier of the action.
text = '&Close'
The action’s text.
shortcut = QKeySequence.Close
The action’s shortcut.
visible = False
This is set if the action is visible.
perform(tool)

Perform the action.

Parameter:tool – is the tool.

NewAction

class dip.shell.actions.NewAction

Base class: ShellAction

The NewAction class is a shell action that invokes the perform_new() method.

id = 'dip.shell.actions.new'
The identifier of the action.
text = '&New'
The action’s text.
shortcut = QKeySequence.New
The action’s shortcut.
needs_tool = False
The action does not require an active tool.
visible = False
This is set if the action is visible.
perform(tool)

Perform the action.

Parameter:tool – is the tool.

OpenAction

class dip.shell.actions.OpenAction

Base class: ShellAction

The OpenAction class is a shell action that invokes the perform_open() method.

id = 'dip.shell.actions.open'
The identifier of the action.
text = '&Open...'
The action’s text.
shortcut = QKeySequence.Open
The action’s shortcut.
needs_tool = False
The action does not require an active tool.
visible = False
This is set if the action is visible.
perform(tool)

Perform the action.

Parameter:tool – is the tool.

QuitAction

class dip.shell.actions.QuitAction

Base class: ShellAction

The QuitAction class is a shell action that invokes the perform_quit() method.

id = 'dip.shell.actions.quit'
The identifier of the action.
text = '&Quit'
The action’s text.
shortcut = QKeySequence.Quit
The action’s shortcut.
needs_tool = False
The action does not require an active tool.
perform(tool)

Perform the action.

Parameter:tool – is the tool.

SaveAction

class dip.shell.actions.SaveAction

Base class: ShellAction

The SaveAction class is a shell action that invokes the perform_save() method.

id = 'dip.shell.actions.save'
The identifier of the action.
text = '&Save'
The action’s text.
shortcut = QKeySequence.Save
The action’s shortcut.
visible = False
This is set if the action is visible.
perform(tool)

Perform the action.

Parameter:tool – is the tool.

SaveAsAction

class dip.shell.actions.SaveAsAction

Base class: ShellAction

The SaveAsAction class is a shell action that invokes the perform_save_as() method.

id = 'dip.shell.actions.save_as'
The identifier of the action.
text = 'Save &As...'
The action’s text.
shortcut = QKeySequence.SaveAs
The action’s shortcut.
visible = False
This is set if the action is visible.
perform(tool)

Perform the action.

Parameter:tool – is the tool.

ShellAction

class dip.shell.actions.ShellAction

Base class: Model

The ShellAction class is an action intended to be used by a shell. The action can automatically disable and enable itself depending on the shell’s current active tool. The class has been designed so that it doesn’t normally need to be sub-classed.

perform(tool)

Perform the action (probably) on a tool. This will not be called if validate() returns False.

Parameter:tool – is the tool.
validate(tool)

Check if the action can be performed on a tool.

Parameter:tool – is the tool.
Returns:True if the action can be performed.

WhatsThisAction

class dip.shell.actions.WhatsThisAction

Base class: Model

The WhatsThisAction class is an action that can be contributed to the ‘dip.shell.actions’ extension point to invoke “What’s This?” help.

id = 'dip.shell.actions.whats_this'
The identifier of the action.

Table Of Contents

Previous topic

dip.shell.plugins

Next topic

dip.shell.shells.qmainwindow

This Page