PlasmaActivities
7#ifndef KACTIVITIES_UTILS_H
8#define KACTIVITIES_UTILS_H
15 StringListView(
const QStringList &list,
int start,
int end = -1)
22 const QString &operator()(
int index)
const
24 return m_list[m_start + index];
33 const QStringList &m_list;
58 for (
int i = 0; i < result.size() - 1; ++i) {
59 if (result[i].isLower() && result[i + 1].isUpper()) {
60 result[i + 1] = result[i + 1].toLower();
61 result.insert(i + 1, QStringLiteral(
"-"));
68void printActivity(
const QString &
id)
80 info.id() == controller->currentActivity() ?
"[CURRENT] " :
95 if (info.id() == controller->currentActivity()
98 <<
"Activity is the current one, but its state is"
128void switchToActivity(
const QString &
id)
130 auto result = awaitFuture(controller->setCurrentActivity(
id));
134 qDebug() <<
"Current activity is" << id;
136 qDebug() <<
"Failed to change the activity";
142#define DEFINE_COMMAND(Command, MinArgCount) \
143 struct Command##_command { \
144 const StringListView &args; \
145 Command##_command(const StringListView &args) \
148 if (args.count() < MinArgCount + 1) { \
149 qFatal("not enough arguments for " #Command); \
156 int Command##_command::operator()()
This class provides methods for controlling and managing the activities.
This class provides info about an activity.
@ Starting
Activity is begin started.
@ Running
Activity is running.
@ Stopped
Activity is stopped.
@ Stopping
Activity is begin started.
Q_SCRIPTABLE Q_NOREPLY void start()
Namespace for everything in libkactivities.
KIOCORE_EXPORT QStringList list(const QString &fileClass)
const QList< QKeySequence > & end()
void processEvents(QEventLoop::ProcessEventsFlags flags)
bool isFinished() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 28 2025 12:01:06 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.