Generic interface which provides a way for objects to expose tasks that they can perform. More...
#include <ITaskContainer.h>
Public Member Functions | |
void | disableTask (int task_id) |
Disables the creation and registering in the global object pool of a task object to monitor the progress of the task. | |
void | enableTask (int task_id) |
Enables the creation and registering in the global object pool of a task object to monitor the progress of the task. | |
int | findTaskID (const QString &task_name) const |
Returns the task ID for the task specified by the given task_name. | |
bool | isTaskActive (int task_id) const |
Checks if a specific task is active. | |
bool | isTaskGlobal (int task_id) const |
Checks if a specific task is global or local. See Qtilities::Core::Interfaces::ITask::TaskType. | |
void | setTaskGlobal (int task_id) |
Sets a task a global. See Qtilities::Core::Interfaces::ITask::TaskType. | |
void | setTaskLocal (int task_id) |
Sets a task a local. See Qtilities::Core::Interfaces::ITask::TaskType. | |
ITask * | task (int task_id) const |
Returns the task specified by the given task_id. | |
QList< ITask * > | tasks () const |
A list of tasks provided by the object. | |
Public Member Functions inherited from Qtilities::Core::Interfaces::IObjectBase | |
virtual QObject * | objectBase ()=0 |
Returns the QObject* base of the interface. | |
virtual const QObject * | objectBase () const =0 |
Returns a const QObject* base of the interface. | |
QString | objectOriginID () const |
Allows interfaces to provide some sort of source identification. | |
void | setObjectOriginID (const QString &object_origin_id) |
Allows setting of the object source ID of this interface implementation. |
Protected Member Functions | |
Task * | findTask (const QString &task_name) const |
Returns the Task object specified by the given task_name. | |
void | registerTask (Task *task, const QString &task_name) |
Registers a task in this container. |
Generic interface which provides a way for objects to expose tasks that they can perform.
This interface allows any object to expose tasks which can be performed by it.
To find the ID of an exposed task:
See the Tasking article for more information on tasking.
This class was added in Qtilities v1.0.
int Qtilities::Core::Interfaces::ITaskContainer::findTaskID | ( | const QString & | task_name | ) | const |
Returns the task ID for the task specified by the given task_name.
|
protected |
Registers a task in this container.
This function will automatically register the task in the global object pool.
Qtilities : Reference Documentation | Back to top |
Copyright © 2009-2013, Jaco Naudé
|