A widget which provides a summary of all registered global tasks. More...
#include <TaskSummaryWidget.h>
Public Types | |
enum | NoActiveTaskHandling { HideSummaryWidget = 0, ShowSummaryWidget = 1 } |
Indicates how the TaskSummaryWidget should be shown when no SingleTaskWidget items are present. More... | |
enum | TaskDisplayOptions { DisplayOnlyBusyTasks = 0, DisplayAllTasks = 1 } |
The possible ways that SingleTaskWidget widgets can be displayed in the summary widget. More... | |
enum | TaskRemoveOption { RemoveWhenDeleted = 0, RemoveWhenCompletedSuccessfully = 1, RemoveWhenCompletedSuccessfullyWithWarnings = 2, RemoveWhenFailed = 4, RemoveWhenStopped = 8 } |
The possible ways that SingleTaskWidget widgets can be removed from the summary widget. More... |
Signals | |
void | numberOfDisplayedTasksChanged (int number_of_visible_tasks) |
Signal which is emitted when the number of displayed tasks changed. |
Public Member Functions | |
void | clear () |
Function which will clear all current tasks shown by the summary widget. | |
QList< int > | displayedTasksFilter () const |
Gets the current displayed tasks filter. | |
void | displayedTasksFilterAddId (int id) |
Adds a task ID to the displayed tasks filter. | |
void | displayedTasksFilterRemoveId (int id) |
Adds a task ID to the displayed tasks filter. | |
void | findCurrentTasks () |
Function which will search for all tasks in the global object pool and show them according to how the widget is set up. | |
NoActiveTaskHandling | noActiveTaskHandling () const |
Gets the NoActiveTaskHandling for this summary widget. | |
void | setDisplayedTasksFilter (QList< int > displayed_task_ids) |
Sets a filter in order to only display tasks with IDs that match the filter. | |
void | setNoActiveTaskHandling (NoActiveTaskHandling no_active_task_handling) |
Sets the NoActiveTaskHandling for this summary widget. | |
void | setTaskDisplayOptions (TaskDisplayOptions task_display_options) |
Sets the TaskDisplayOptions for this summary widget. | |
void | setTaskRemoveOptionFlags (TaskRemoveOptionFlags task_remove_option_flags) |
Sets the TaskRemoveOptionFlags for this summary widget. | |
void | setTaskSummaryEnabled (bool enable) |
Sets if this task summary widget is enabled. | |
TaskDisplayOptions | taskDisplayOptions () const |
Gets the TaskDisplayOptions for this summary widget. | |
TaskRemoveOptionFlags | taskRemoveOptionFlags () const |
Gets the TaskRemoveOptionFlags for this summary widget. | |
bool | taskSummaryEnabled () const |
Gets if this task summary widget is enabled. |
A widget which provides a summary of all registered global tasks.
Qtilities::CoreGui::TaskSummaryWidget provides the ability to display all tasks in an application and is customizable in order for your needs. It can for example only show active tasks, or all tasks (active and inactive).
To create a task summary widget is straight forward. For example:
It is important to note that only tasks registered in the global object pool and set as global tasks (see Qtilities::Core::Interfaces::ITask::TaskGlobal) are shown in the task summary widget. The figure below shows a task summary widget which shows three active tasks. Note that the QTimer task can be stopped.
When using Qtilities::CoreGui::QtilitiesMainWindow you can set it up to show a task summary information automatically for you. This makes it very easy to provide an overview of tasks in your application. The Tasking Example demonstrates this.
See the Tasking article for more information on tasking.
This class was added in Qtilities v1.0.
Indicates how the TaskSummaryWidget should be shown when no SingleTaskWidget items are present.
Default is HideSummaryWidget.
The possible ways that SingleTaskWidget widgets can be displayed in the summary widget.
Default is DisplayOnlyBusyTasks.
The possible ways that SingleTaskWidget widgets can be removed from the summary widget.
In addition to the available remove options listed, tasks will always be removed when they are deleted.
QList< int > TaskSummaryWidget::displayedTasksFilter | ( | ) | const |
Gets the current displayed tasks filter.
This function was added in Qtilities v1.3.
void TaskSummaryWidget::displayedTasksFilterAddId | ( | int | id | ) |
Adds a task ID to the displayed tasks filter.
This function was added in Qtilities v1.3.
void TaskSummaryWidget::displayedTasksFilterRemoveId | ( | int | id | ) |
Adds a task ID to the displayed tasks filter.
This function was added in Qtilities v1.3.
|
signal |
Signal which is emitted when the number of displayed tasks changed.
This signal was added in Qtilities v1.3.
void TaskSummaryWidget::setDisplayedTasksFilter | ( | QList< int > | displayed_task_ids | ) |
Sets a filter in order to only display tasks with IDs that match the filter.
When empty, all tasks are displayed. This is the default.
This function was added in Qtilities v1.3.
void Qtilities::CoreGui::TaskSummaryWidget::setTaskSummaryEnabled | ( | bool | enable | ) |
Sets if this task summary widget is enabled.
This function was added in Qtilities v1.1.
bool Qtilities::CoreGui::TaskSummaryWidget::taskSummaryEnabled | ( | ) | const |
Gets if this task summary widget is enabled.
This function was added in Qtilities v1.1.
Qtilities : Reference Documentation | Back to top |
Copyright © 2009-2013, Jaco Naudé
|