|
void | added () |
| Emitted when the activity is added.
|
|
void | descriptionChanged (const QString &description) |
| Emitted when the description is changed.
|
|
void | iconChanged (const QString &icon) |
| Emitted when the icon was changed.
|
|
void | infoChanged () |
| Links the specified resource to the activity.
|
|
void | isCurrentChanged (bool current) |
| Emitted when the activity becomes the current one, or when it stops being the current one.
|
|
void | nameChanged (const QString &name) |
| Emitted when the name is changed.
|
|
void | removed () |
| Emitted when the activity is removed.
|
|
void | started () |
| Emitted when the activity is started.
|
|
void | stateChanged (KActivities::Info::State state) |
| Emitted when the activity changes state.
|
|
void | stopped () |
| Emitted when the activity is stopped.
|
|
This class provides info about an activity.
Most methods in it require a semantic backend running to function properly.
This class is not thread-safe.
- See also
- Consumer for info about activities
The API of the class is synchronous, but the most used properties are pre-fetched and cached. This means that, in order to get the least amount of d-bus related locks, you should declare long-lived instances of this class.
Before relying on the values retrieved by the class, make sure that the state is not Info::Unknown. You can get invalid data either because the service is not functioning properly (or at all) or because the class did not have enough time to synchronize the data with it.
For example, if this is the only existing instance of the Info class, the name method will return an empty string.
For example, this is wrong (works, but blocks):
void someMethod(const QString & activity) {
doSomethingWith(info.name());
}
This class provides info about an activity.
Definition info.h:57
Instances of the Info class should be long-lived. For example, members of the classes that use them, and you should listen for the changes in the provided properties.
- Since
- 4.5