Changeset View
Changeset View
Standalone View
Standalone View
runners/characters/charrunner_config.h
Show All 16 Lines | |||||
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 CHARRUNNERCONFIG_H | 20 | #ifndef CHARRUNNERCONFIG_H | ||
21 | #define CHARRUNNERCONFIG_H | 21 | #define CHARRUNNERCONFIG_H | ||
22 | 22 | | |||
23 | //Project-Includes | 23 | //Project-Includes | ||
24 | #include "ui_charrunner_config.h" | 24 | #include "ui_charrunner_config.h" | ||
25 | //KDE-Includes | 25 | // KF | ||
26 | #include <KCModule> | 26 | #include <KCModule> | ||
27 | 27 | | |||
28 | //Names of config-entries | | |||
29 | static const char CONFIG_TRIGGERWORD[] = "triggerWord"; | | |||
30 | static const char CONFIG_ALIASES[] = "aliases"; | | |||
31 | static const char CONFIG_CODES[] = "codes"; | | |||
32 | 28 | | |||
33 | class CharacterRunnerConfigForm : public QWidget, public Ui::CharacterRunnerConfigUi | 29 | class CharacterRunnerConfigForm : public QWidget, public Ui::CharacterRunnerConfigUi | ||
34 | { | 30 | { | ||
35 | Q_OBJECT | 31 | Q_OBJECT | ||
36 | 32 | | |||
37 | public: | 33 | public: | ||
38 | explicit CharacterRunnerConfigForm(QWidget* parent); | 34 | explicit CharacterRunnerConfigForm(QWidget* parent); | ||
39 | }; | 35 | }; | ||
40 | 36 | | |||
41 | class CharacterRunnerConfig : public KCModule | 37 | class CharacterRunnerConfig : public KCModule | ||
42 | { | 38 | { | ||
43 | Q_OBJECT | 39 | Q_OBJECT | ||
44 | 40 | | |||
45 | public: | 41 | public: | ||
46 | explicit CharacterRunnerConfig(QWidget* parent = 0, const QVariantList& args = QVariantList()); | 42 | explicit CharacterRunnerConfig(QWidget* parent, const QVariantList& args = QVariantList()); | ||
47 | 43 | | |||
48 | public slots: | 44 | public Q_SLOTS: | ||
49 | void save(); | 45 | void save() override; | ||
50 | void load(); | 46 | void load() override; | ||
51 | void defaults(); | 47 | void defaults() override; | ||
48 | | ||||
49 | private Q_SLOTS: | ||||
52 | void addItem(); | 50 | void addItem(); | ||
53 | void deleteItem(); | 51 | void deleteItem(); | ||
54 | 52 | | |||
55 | private: | 53 | private: | ||
56 | CharacterRunnerConfigForm* m_ui; | 54 | CharacterRunnerConfigForm* m_ui; | ||
57 | }; | 55 | }; | ||
58 | #endif | 56 | #endif |