Changeset View
Changeset View
Standalone View
Standalone View
runners/kill/killrunner_config.h
Show All 14 Lines | |||||
15 | * | 15 | * | ||
16 | * You should have received a copy of the GNU Lesser General Public | 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/>. | 17 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #ifndef KILLRUNNERCONFIG_H | 20 | #ifndef KILLRUNNERCONFIG_H | ||
21 | #define KILLRUNNERCONFIG_H | 21 | #define KILLRUNNERCONFIG_H | ||
22 | 22 | | |||
23 | //Project-Includes | | |||
24 | #include "ui_killrunner_config.h" | 23 | #include "ui_killrunner_config.h" | ||
25 | //KDE-Includes | 24 | #include "config_keys.h" | ||
26 | #include <KCModule> | | |||
27 | //Qt | | |||
28 | 25 | | |||
29 | static const char CONFIG_USE_TRIGGERWORD[] = "useTriggerWord"; | 26 | #include <KCModule> | ||
30 | static const char CONFIG_TRIGGERWORD[] = "triggerWord"; | | |||
31 | static const char CONFIG_SORTING[] = "sorting"; | | |||
32 | 27 | | |||
33 | class KillRunnerConfigForm : public QWidget, public Ui::KillRunnerConfigUi | 28 | class KillRunnerConfigForm : public QWidget, public Ui::KillRunnerConfigUi | ||
34 | { | 29 | { | ||
35 | Q_OBJECT | 30 | Q_OBJECT | ||
36 | 31 | | |||
37 | public: | 32 | public: | ||
38 | explicit KillRunnerConfigForm(QWidget* parent); | 33 | explicit KillRunnerConfigForm(QWidget* parent); | ||
39 | }; | 34 | }; | ||
40 | 35 | | |||
41 | class KillRunnerConfig : public KCModule | 36 | class KillRunnerConfig : public KCModule | ||
42 | { | 37 | { | ||
43 | Q_OBJECT | 38 | Q_OBJECT | ||
44 | 39 | | |||
45 | public: | 40 | public: | ||
46 | explicit KillRunnerConfig(QWidget* parent = nullptr, const QVariantList& args = QVariantList()); | 41 | explicit KillRunnerConfig(QWidget* parent = nullptr, const QVariantList& args = QVariantList()); | ||
47 | 42 | | |||
48 | /** Possibilities to sort */ | | |||
49 | enum Sort {NONE = 0, CPU, CPUI}; | | |||
50 | | ||||
51 | public Q_SLOTS: | 43 | public Q_SLOTS: | ||
52 | void save() override; | 44 | void save() override; | ||
53 | void load() override; | 45 | void load() override; | ||
54 | void defaults() override; | 46 | void defaults() override; | ||
55 | 47 | | |||
56 | private: | 48 | private: | ||
57 | KillRunnerConfigForm* m_ui; | 49 | KillRunnerConfigForm* m_ui; | ||
58 | }; | 50 | }; | ||
59 | #endif | 51 | #endif |