pyface.tasks.action.task_toggle_group module

class pyface.tasks.action.task_toggle_group.TaskToggleAction[source]

Bases: Action

An action for activating a task.

name = Property(Str, observe="task.name")

The user-visible name of the action, matches the task name.

style = "toggle"

The action is a toggle menu item.

tooltip = Property(Str, observe="name")

The tooltip to display for the menu item.

task = Instance(Task)

The Task with which the action is associated.

destroy()[source]

Called when the action is no longer required.

By default this method does nothing, but this would be a great place to unhook trait listeners etc.

perform(event=None)[source]

Performs the action.

Parameters

event (ActionEvent) – The event which triggered the action.

class pyface.tasks.action.task_toggle_group.TaskToggleGroup(*items, **traits)[source]

Bases: Group

A menu for changing the active task in a task window.

manager = Any()

The ActionManager to which the group belongs.

window = Instance("pyface.tasks.task_window.TaskWindow")

The window that contains the group.