KDECore
#include <kauthactionwatcher.h>
Signals | |
void | actionPerformed (const ActionReply &reply) |
void | actionStarted () |
void | progressStep (int progress) |
void | progressStep (const QVariantMap &data) |
void | statusChanged (int status) |
Public Member Functions | |
virtual | ~ActionWatcher () |
QString | action () const |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
Static Public Member Functions | |
static ActionWatcher * | watcher (const QString &action) |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Additional Inherited Members | |
Protected Member Functions inherited from QObject | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from QObject | |
objectName | |
Detailed Description
Class used to receive notifications about the status of an action execution.
The ActionWatcher class provides some signals useful to track the execution of an action. The Action class is designed to be very ligthweight, so it's not the case to make it a QObject subclass. This means the action object can't expose signals. This is the reason why every action (not every Action object) used by the app has an associated ActionWatcher.
You don't create watchers directly. Instead, you should get one from the Action::watcher() method, if you have an action object, or with the ActionWatcher::watcher() static method, which takes the action name string.
See the documentation of single signals for more details about them.
- Since
- 4.4
Definition at line 50 of file kauthactionwatcher.h.
Constructor & Destructor Documentation
|
virtual |
Virtual destructor.
Definition at line 62 of file kauthactionwatcher.cpp.
Member Function Documentation
QString KAuth::ActionWatcher::action | ( | ) | const |
Returns the action name associated with this watcher.
Definition at line 76 of file kauthactionwatcher.cpp.
|
signal |
Signal emitted when an action completed the execution.
This signal provides the only way to obtain the reply from the helper in case of asynchronous calls. The reply object is the same returned by the helper, or an error reply from the library if something went wrong.
- Parameters
-
reply The reply coming from the helper
|
signal |
Signal emitted when an action starts the execution.
This signal is emitted whe In case of execute() and executeAsync(), the signal is emitted about immediately, because the request is very fast.
If you execute a group of actions using Action::executeActions(), this signal is emitted when the single action is actually about to be executed, not when the whole group starts executing. This means you can use this signal to start some kind of timeout to handle helper crashes, if you feel the need.
|
signal |
Signal emitted by the helper to notify the action's progress.
This signal is emitted every time the helper's code calls the HelperSupport::progressStep(int) method. This is useful to let the helper notify the execution status of a long action. The meaning of the integer passed here is totally application-dependent. If you need to be more expressive, you can use the other signal that pass a QVariantMap.
- Parameters
-
progress The progress indicator from the helper
|
signal |
Signal emitted by the helper to notify the action's progress.
This signal is emitted every time the helper's code calls the HelperSupport::progressStep(QVariantMap) method. This is useful to let the helper notify the execution status of a long action, also providing some data, for example if you want to achieve some sort of progressive loading. The meaning of the data passed here is totally application-dependent. If you only need to pass some percentage, you can use the other signal that pass an int.
- Parameters
-
data The progress data from the helper
|
signal |
|
static |
Factory method to get watchers.
This method allows you to obtain (and create if needed) an action watcher from the action string identifier. It's more common to obtain a watcher using Action::watcher(), which actually calls this method.
Every signal of this class is emitted whichever method you used to execute the action. This means you could connect to the signal actionPerformed() even if you're using the execute() method (which already returns the reply) and you'll get the same reply.
- Parameters
-
action The action string identifier for the creation of the watcher
- Returns
- The action watcher associated with the given action
Definition at line 67 of file kauthactionwatcher.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:13 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.