pyface.tasks.tasks_application module¶
Define a base Task application class to create the event loop, and launch the creation of tasks and corresponding windows.
-
class
pyface.tasks.tasks_application.
TaskFactory
[source]¶ Bases:
traits.has_traits.HasStrictTraits
A factory for creating a Task with some additional metadata.
-
id
= Str()¶ The task factory’s unique identifier. This ID is assigned to all tasks created by the factory.
-
name
= Str()¶ The task factory’s user-visible name.
-
factory
= Callable¶ A callable with the following signature:
callable(**traits) -> Task
Often this attribute will simply be a Task subclass.
-
-
class
pyface.tasks.tasks_application.
TasksApplication
[source]¶ Bases:
pyface.gui_application.GUIApplication
A base class for Pyface tasks applications.
-
tasks
= List(Instance("pyface.tasks.task.Task"))¶ List of all running tasks
-
active_task
= Property( …¶ Currently active Task if any.
-
task_factories
= List()¶ List of all application task factories.
-
default_layout
= List( …¶ The default layout for the application. If not specified, a single window will be created with the first available task factory.
-
extra_actions
= List( …¶ Hook to add global schema additions to tasks/windows
-
extra_dock_pane_factories
= List(Callable)¶ Hook to add global dock pane additions to tasks/windows
-
create_task
(id)[source]¶ Creates the Task with the specified ID.
- Parameters
id (str) – The id of the task factory to use.
- Returns
- Return type
The new Task, or None if there is not a suitable TaskFactory.
-