1
/* Copyright 2009 <Jan Gerrit Marker> <jangerrit@weiler-marker.com>
3
* This library is free software; you can redistribute it and/or
4
* modify it under the terms of the GNU Lesser General Public
5
* License as published by the Free Software Foundation; either
6
* version 2.1 of the License, or (at your option) version 3, or any
7
* later version accepted by the membership of KDE e.V. (or its
8
* successor approved by the membership of KDE e.V.), which shall
9
* act as a proxy defined in Section 6 of version 3 of the license.
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
23
#include <QReadWriteLock>
26
#include <Plasma/AbstractRunner>
28
#include "killrunner_config.h"
37
class KillRunner : public Plasma::AbstractRunner
42
KillRunner(QObject *parent, const QVariantList& args);
45
void match(Plasma::RunnerContext &context);
46
void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match);
47
QList<QAction*> actionsForMatch(const Plasma::QueryMatch &match);
48
void reloadConfiguration();
55
/** @param uid the uid of the user
56
* @return the username of the user with the UID uid
58
QString getUserName(qlonglong uid);
60
/** The trigger word */
61
QString m_triggerWord;
64
KillRunnerConfig::Sort m_sorting;
67
KSysGuard::Processes *m_processes;
69
/** lock for initializing m_processes */
70
QReadWriteLock m_prepLock;
72
/** timer for retrying the cleanup due to lock contention */
73
QTimer m_delayedCleanupTimer;
75
K_EXPORT_PLASMA_RUNNER(kill, KillRunner)