#include <KoAction.h>
Graphe de collaboration de KoAction:
Connecteurs publics | |
void | execute () |
void | execute (QVariant *params) |
Signaux | |
void | triggered (const QVariant ¶ms) |
void | updateUi (const QVariant ¶ms) |
Fonctions membres publiques | |
KoAction (QObject *parent=0) | |
virtual | ~KoAction () |
void | setWeaver (ThreadWeaver::WeaverInterface *weaver) |
ThreadWeaver::WeaverInterface * | weaver () const |
void | setExecutePolicy (KoExecutePolicy *policy) |
void | setEnabled (bool enabled) |
bool | isEnabled () const |
int | jobCount () |
Fonctions membres privées | |
void | doAction (QVariant *params) |
void | doActionUi (QVariant *params) |
Attributs privés | |
KoExecutePolicy * | m_policy |
ThreadWeaver::WeaverInterface * | m_weaver |
bool | m_enabled |
KoJobsListPolicy * | m_jobsQueue |
Amis | |
class | ActionJob |
Action *myAction = new Action(); myAction->setWeaver(m_weaver); myAction->connect(myAction, SIGNAL(triggered(const QVariant&)), target, SLOT(slot()), Qt::DirectConnection); myAction.execute();
Notice that the default version uses the SimpleQueuedPolicy.
Définition à la ligne 55 du fichier KoAction.h.
KoAction::KoAction | ( | QObject * | parent = 0 |
) |
Create a new Action object. The action will start with a SimpleQueuedPolicy.
parent | the parent QObject, for memory mangement purposes. |
Définition à la ligne 28 du fichier KoAction.cpp.
Références m_jobsQueue.
KoAction::~KoAction | ( | ) | [virtual] |
void KoAction::setWeaver | ( | ThreadWeaver::WeaverInterface * | weaver | ) | [inline] |
Set a ThreadWeaver on this action which is used to execute the action in a different thread when it is activated;
weaver | the weaver to be used |
Définition à la ligne 71 du fichier KoAction.h.
ThreadWeaver::WeaverInterface* KoAction::weaver | ( | ) | const [inline] |
Return the currently set threadWeaver
Définition à la ligne 76 du fichier KoAction.h.
Référencé par KoSimpleQueuedPolicy::schedule(), KoQueuedPolicy::schedule(), et KoOnlyLastPolicy::schedule().
Voici le graphe d'appel pour cette fonction :
void KoAction::setExecutePolicy | ( | KoExecutePolicy * | policy | ) | [inline] |
Set a new policy for this action.
Définition à la ligne 81 du fichier KoAction.h.
void KoAction::setEnabled | ( | bool | enabled | ) | [inline] |
Enable disable this action and all its registered components. Incoming events will not cause the action to be committed when the action is disabled.
enabled | the new state of the action. |
Définition à la ligne 88 du fichier KoAction.h.
Référencé par ActionJob::run(), et KoQueuedPolicy::schedule().
Voici le graphe d'appel pour cette fonction :
bool KoAction::isEnabled | ( | ) | const [inline] |
return if the action is enabled.
Définition à la ligne 93 du fichier KoAction.h.
Référencé par KoQueuedPolicy::schedule(), et KoOnlyLastPolicy::schedule().
Voici le graphe d'appel pour cette fonction :
int KoAction::jobCount | ( | ) |
Return te amount of executes there are still to finish.
Définition à la ligne 70 du fichier KoAction.cpp.
Références KoJobsListPolicy::count(), et m_jobsQueue.
Voici le graphe d'appel pour cette fonction :
void KoAction::triggered | ( | const QVariant & | params | ) | [signal] |
The signal emitted when the action is triggered. Note that this signal is queued and can very well be in a different thread based on the current executePolicy.
params | a variant that equals the variant given in the execute() signal |
Référencé par doAction().
void KoAction::updateUi | ( | const QVariant & | params | ) | [signal] |
The signal emitted directly after the triggered() signal, but this signal is guaranteed to be in the Gui thread and can be used to update the user interface after an action has been completed.
params | a variant that equals the variant given in the execute() signal |
Référencé par doActionUi().
void KoAction::execute | ( | ) | [slot] |
Call this to request the action to be executed. The request will be handled according to the current ExecutePolicy
Définition à la ligne 41 du fichier KoAction.cpp.
void KoAction::execute | ( | QVariant * | params | ) | [slot] |
Call this to request the action to be executed. The request will be handled according to the current ExecutePolicy
params | a variant with a parameter that will be emitted in the triggered() and updateUi() signals. |
Définition à la ligne 45 du fichier KoAction.cpp.
Références m_enabled, m_jobsQueue, m_policy, m_weaver, et KoExecutePolicy::schedule().
void KoAction::doAction | ( | QVariant * | params | ) | [private] |
Définition à la ligne 52 du fichier KoAction.cpp.
Références triggered().
Référencé par ActionJob::run().
Voici le graphe d'appel pour cette fonction :
void KoAction::doActionUi | ( | QVariant * | params | ) | [private] |
Définition à la ligne 61 du fichier KoAction.cpp.
Références updateUi().
Référencé par ActionJob::event(), et ActionJob::run().
Voici le graphe d'appel pour cette fonction :
friend class ActionJob [friend] |
Définition à la ligne 133 du fichier KoAction.h.
KoExecutePolicy* KoAction::m_policy [private] |
ThreadWeaver::WeaverInterface* KoAction::m_weaver [private] |
bool KoAction::m_enabled [private] |
KoJobsListPolicy* KoAction::m_jobsQueue [private] |
Définition à la ligne 140 du fichier KoAction.h.
Référencé par execute(), jobCount(), KoAction(), et ~KoAction().