Changeset View
Changeset View
Standalone View
Standalone View
runners/kill/killrunner.h
1 | /* Copyright 2009 <Jan Gerrit Marker> <jangerrit@weiler-marker.com> | 1 | /* Copyright 2009 <Jan Gerrit Marker> <jangerrit@weiler-marker.com> | ||
---|---|---|---|---|---|
2 | * Copyright 2020 <Alexander Lohnau> <alexander.lohnau@gmx.de> | ||||
2 | * | 3 | * | ||
3 | * This library is free software; you can redistribute it and/or | 4 | * This library is free software; you can redistribute it and/or | ||
4 | * modify it under the terms of the GNU Lesser General Public | 5 | * modify it under the terms of the GNU Lesser General Public | ||
5 | * License as published by the Free Software Foundation; either | 6 | * 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 | * 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 | * 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 | * 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. | 10 | * act as a proxy defined in Section 6 of version 3 of the license. | ||
Show All 37 Lines | 42 | public: | |||
47 | QList<QAction*> actionsForMatch(const Plasma::QueryMatch &match) override; | 48 | QList<QAction*> actionsForMatch(const Plasma::QueryMatch &match) override; | ||
48 | void reloadConfiguration() override; | 49 | void reloadConfiguration() override; | ||
49 | 50 | | |||
50 | private Q_SLOTS: | 51 | private Q_SLOTS: | ||
51 | void prep(); | 52 | void prep(); | ||
52 | void cleanup(); | 53 | void cleanup(); | ||
53 | 54 | | |||
54 | private: | 55 | private: | ||
55 | /** @param uid the uid of the user | | |||
56 | * @return the username of the user with the UID uid | | |||
57 | */ | | |||
58 | QString getUserName(qlonglong uid); | | |||
59 | | ||||
60 | /** The trigger word */ | 56 | /** The trigger word */ | ||
61 | QString m_triggerWord; | 57 | QString m_triggerWord; | ||
62 | 58 | | |||
63 | /** How to sort */ | 59 | /** How to sort */ | ||
64 | KillRunnerConfig::Sort m_sorting; | 60 | KillRunnerConfig::Sort m_sorting; | ||
65 | 61 | | |||
66 | /** process lister */ | 62 | /** process lister */ | ||
67 | KSysGuard::Processes *m_processes; | 63 | KSysGuard::Processes *m_processes; | ||
68 | 64 | | |||
69 | /** lock for initializing m_processes */ | 65 | /** lock for initializing m_processes */ | ||
70 | QReadWriteLock m_prepLock; | 66 | QReadWriteLock m_prepLock; | ||
71 | 67 | | |||
72 | /** timer for retrying the cleanup due to lock contention */ | 68 | /** timer for retrying the cleanup due to lock contention */ | ||
73 | QTimer m_delayedCleanupTimer; | 69 | QTimer m_delayedCleanupTimer; | ||
70 | | ||||
71 | /** Reuse actions */ | ||||
72 | QList<QAction *> m_actionList; | ||||
73 | | ||||
74 | /** Reuse value */ | ||||
75 | bool m_hasTrigger; | ||||
74 | }; | 76 | }; | ||
75 | 77 | | |||
76 | #endif | 78 | #endif |