kpilot/lib
ActionQueue Class Reference
#include <actionQueue.h>
Inheritance diagram for ActionQueue:

Detailed Description
The ActionQueue is a meta-action, which handles running a bunch of SyncActions in sequence.It is a SyncAction itself, so it can even be queued on another ActionQueue.
An ActionQueue is constructed with a device
. As usual, you should connect the device's deviceReady() signal with the exec() slot -- or something to that effect. The ActionQueue will then run all the actions in the queue in sequence.
Definition at line 57 of file actionQueue.h.
Public Member Functions | |
ActionQueue (KPilotLink *device) | |
virtual | ~ActionQueue () |
bool | isEmpty () const |
void | addAction (SyncAction *a) |
void | queueInit () |
void | queueConduits (const QStringList &conduits, const SyncAction::SyncMode &mode) |
void | queueCleanup () |
Protected Slots | |
void | actionCompleted (SyncAction *) |
Protected Member Functions | |
void | clear () |
SyncAction * | nextAction () |
virtual bool | exec () |
Constructor & Destructor Documentation
|
Constructor. Pass in a KPilot device link for it to act on. It is legal to pass in 0 (NULL) as a device. Ownership of the device is unchanged. Definition at line 42 of file actionQueue.cc. |
|
Destructor.
Definition at line 49 of file actionQueue.cc. |
Member Function Documentation
|
When one action finishes, start the next one.
Definition at line 114 of file actionQueue.cc. |
|
You can push your own action Ownership of the action is given to the ActionQueue object. Definition at line 81 of file actionQueue.h. |
|
Remove all the actions from the queue and delete them (the queue owns the actions, after all).
Definition at line 55 of file actionQueue.cc. |
|
Reimplemented from SyncAction.
Implements SyncAction. Definition at line 108 of file actionQueue.cc. |
|
Is the queue empty? Returns
Definition at line 72 of file actionQueue.h. |
|
Dequeue the next action in the queue, ready for processing. This takes the action off the queue, so remember to delete it eventually. Definition at line 142 of file actionQueue.h. |
|
Convenience function for adding a cleanup action (see CleanupAction in actions.h) to the queue. Should be the last action added to the queue because a HotSync can only have one cleanup. Definition at line 103 of file actionQueue.cc. |
|
Queue a (series) of conduits Each of the conduits named is called through a ConduitProxy object which handles loading the conduit's shared library and creating the actual SyncAction for that conduit. Actions named "internal_*" are silently ignored since those names are used by KPilot internally for administrative purposes. Definition at line 73 of file actionQueue.cc. |
|
Initialize the queue. This empties it out and adds a welcome action (see WelcomeAction in actions.h) so that the user knows what is happening when the ActionQueue begins to execute. Equivalent to clear(); addAction(new WelcomeAction); Definition at line 66 of file actionQueue.cc. |
The documentation for this class was generated from the following files: