Changeset View
Changeset View
Standalone View
Standalone View
runners/kill/config_keys.h
- This file was copied from runners/kill/killrunner_config.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. | ||
10 | * | 11 | * | ||
11 | * This library is distributed in the hope that it will be useful, | 12 | * This library is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * Lesser General Public License for more details. | 15 | * Lesser General Public License for more details. | ||
15 | * | 16 | * | ||
16 | * You should have received a copy of the GNU Lesser General Public | 17 | * 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/>. | 18 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
18 | */ | 19 | */ | ||
19 | 20 | | |||
20 | #ifndef KILLRUNNERCONFIG_H | 21 | #ifndef KILLRUNNER_CONFIG_KEYS_H | ||
21 | #define KILLRUNNERCONFIG_H | 22 | #define KILLRUNNER_CONFIG_KEYS_H | ||
22 | 23 | | |||
23 | //Project-Includes | | |||
24 | #include "ui_killrunner_config.h" | | |||
25 | //KDE-Includes | | |||
26 | #include <KCModule> | | |||
27 | //Qt | | |||
28 | 24 | | |||
29 | static const char CONFIG_USE_TRIGGERWORD[] = "useTriggerWord"; | 25 | static const char CONFIG_USE_TRIGGERWORD[] = "useTriggerWord"; | ||
30 | static const char CONFIG_TRIGGERWORD[] = "triggerWord"; | 26 | static const char CONFIG_TRIGGERWORD[] = "triggerWord"; | ||
31 | static const char CONFIG_SORTING[] = "sorting"; | 27 | static const char CONFIG_SORTING[] = "sorting"; | ||
32 | 28 | | |||
33 | class KillRunnerConfigForm : public QWidget, public Ui::KillRunnerConfigUi | | |||
34 | { | | |||
35 | Q_OBJECT | | |||
36 | | ||||
37 | public: | | |||
38 | explicit KillRunnerConfigForm(QWidget* parent); | | |||
39 | }; | | |||
40 | | ||||
41 | class KillRunnerConfig : public KCModule | | |||
42 | { | | |||
43 | Q_OBJECT | | |||
44 | | ||||
45 | public: | | |||
46 | explicit KillRunnerConfig(QWidget* parent = nullptr, const QVariantList& args = QVariantList()); | | |||
47 | | ||||
48 | /** Possibilities to sort */ | 29 | /** Possibilities to sort */ | ||
49 | enum Sort {NONE = 0, CPU, CPUI}; | 30 | enum Sort {NONE = 0, CPU, CPUI}; | ||
50 | 31 | | |||
51 | public Q_SLOTS: | | |||
52 | void save() override; | | |||
53 | void load() override; | | |||
54 | void defaults() override; | | |||
55 | | ||||
56 | private: | | |||
57 | KillRunnerConfigForm* m_ui; | | |||
58 | }; | | |||
59 | #endif | 32 | #endif |