KActivities 5.109.0
|
This class provides methods for controlling and managing the activities. More...
#include <controller.h>
Properties | |
QString | currentActivity |
![]() | |
QStringList | activities |
QString | currentActivity |
QStringList | runningActivities |
ServiceStatus | serviceStatus |
Public Member Functions | |
Controller (QObject *parent=nullptr) | |
QFuture< QString > | addActivity (const QString &name) |
Adds a new activity. | |
QFuture< void > | nextActivity () |
Switches to the next activity. | |
QFuture< void > | previousActivity () |
Switches to the previous activity. | |
QFuture< void > | removeActivity (const QString &id) |
Removes the specified activity. | |
QFuture< void > | setActivityDescription (const QString &id, const QString &description) |
Sets the description of the specified activity. | |
QFuture< void > | setActivityIcon (const QString &id, const QString &icon) |
Sets the icon of the specified activity. | |
QFuture< void > | setActivityName (const QString &id, const QString &name) |
Sets the name of the specified activity. | |
QFuture< bool > | setCurrentActivity (const QString &id) |
Sets the current activity. | |
QFuture< void > | startActivity (const QString &id) |
Starts the activity. | |
QFuture< void > | stopActivity (const QString &id) |
Stops the activity. | |
![]() | |
Consumer (QObject *parent=nullptr) | |
QStringList | activities () const |
QStringList | activities (Info::State state) const |
QString | currentActivity () const |
QStringList | runningActivities () const |
ServiceStatus | serviceStatus () |
Additional Inherited Members | |
![]() | |
enum | ServiceStatus { NotRunning , Unknown , Running } |
Different states of the activities service. More... | |
![]() | |
void | activitiesChanged (const QStringList &activities) |
This signal is emitted when the activity list changes. | |
void | activityAdded (const QString &id) |
This signal is emitted when a new activity is added. | |
void | activityRemoved (const QString &id) |
This signal is emitted when an activity has been removed. | |
void | currentActivityChanged (const QString &id) |
This signal is emitted when the current activity is changed. | |
void | runningActivitiesChanged (const QStringList &runningActivities) |
This signal is emitted when the list of running activities changes. | |
void | serviceStatusChanged (Consumer::ServiceStatus status) |
This signal is emitted when the activity service goes online or offline, or when the class manages to synchronize the data with the service. | |
This class provides methods for controlling and managing the activities.
QFuture< QString > KActivities::Controller::addActivity | ( | const QString & | name | ) |
Adds a new activity.
name | name of the activity |
QFuture< void > KActivities::Controller::nextActivity | ( | ) |
Switches to the next activity.
QFuture< void > KActivities::Controller::previousActivity | ( | ) |
Switches to the previous activity.
QFuture< void > KActivities::Controller::removeActivity | ( | const QString & | id | ) |
Removes the specified activity.
id | id of the activity to delete |
QFuture< void > KActivities::Controller::setActivityDescription | ( | const QString & | id, |
const QString & | description | ||
) |
Sets the description of the specified activity.
id | id of the activity |
description | description to be set |
QFuture< void > KActivities::Controller::setActivityIcon | ( | const QString & | id, |
const QString & | icon | ||
) |
Sets the icon of the specified activity.
id | id of the activity |
icon | icon to be set - freedesktop.org name or file path |
QFuture< void > KActivities::Controller::setActivityName | ( | const QString & | id, |
const QString & | name | ||
) |
Sets the name of the specified activity.
id | id of the activity |
name | name to be set |
QFuture< bool > KActivities::Controller::setCurrentActivity | ( | const QString & | id | ) |
Sets the current activity.
id | id of the activity to make current |
QFuture< void > KActivities::Controller::startActivity | ( | const QString & | id | ) |
Starts the activity.
id | id of the activity to start |
QFuture< void > KActivities::Controller::stopActivity | ( | const QString & | id | ) |
Stops the activity.
id | id of the activity to stop |