Changeset View
Changeset View
Standalone View
Standalone View
kded/gtkconfig.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * Copyright (C) 2019 Mikhail Zolotukhin <zomial@protonmail.com> | ||||
3 | * Copyright (C) 2019 Nicolas Fella <nicolas.fella@gmx.de> | ||||
4 | * | ||||
5 | * This program is free software; you can redistribute it and/or | ||||
6 | * modify it under the terms of the GNU General Public License as | ||||
7 | * published by the Free Software Foundation; either version 2 of | ||||
8 | * the License or (at your option) version 3 or any later version | ||||
9 | * accepted by the membership of KDE e.V. (or its successor approved | ||||
10 | * by the membership of KDE e.V.), which shall act as a proxy | ||||
11 | * defined in Section 14 of version 3 of the license. | ||||
12 | * | ||||
13 | * This program is distributed in the hope that it will be useful, | ||||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
16 | * GNU General Public License for more details. | ||||
17 | * | ||||
18 | * You should have received a copy of the GNU General Public License | ||||
19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
20 | */ | ||||
21 | | ||||
22 | #pragma once | ||||
23 | | ||||
24 | #include <KDEDModule> | ||||
25 | | ||||
26 | #include "configeditor.h" | ||||
27 | #include "configvalueprovider.h" | ||||
28 | | ||||
29 | class Q_DECL_EXPORT GtkConfig : public KDEDModule | ||||
30 | { | ||||
31 | Q_OBJECT | ||||
32 | | ||||
33 | enum class SettingsChangeType { | ||||
34 | Palette = 0, | ||||
35 | Font, | ||||
36 | Style, | ||||
37 | Settings, | ||||
38 | Icon, | ||||
39 | Cursor, | ||||
40 | ToolbarStyle, | ||||
41 | BlockShortcuts, | ||||
42 | NaturalSorting | ||||
43 | }; | ||||
44 | | ||||
45 | enum class SettingsCategory { | ||||
46 | Mouse, | ||||
47 | Completion, | ||||
48 | Paths, | ||||
49 | Popupmenu, | ||||
50 | Qt, | ||||
51 | Shortcuts, | ||||
52 | Locale, | ||||
53 | Style | ||||
54 | }; | ||||
55 | | ||||
56 | public: | ||||
57 | GtkConfig(QObject *parent, const QVariantList& args); | ||||
58 | | ||||
59 | void setFont() const; | ||||
60 | void setIconTheme(int iconGroup) const; | ||||
61 | void setCursorTheme() const; | ||||
62 | void setIconsOnButtons() const; | ||||
63 | void setIconsInMenus() const; | ||||
64 | void setToolbarStyle() const; | ||||
65 | | ||||
66 | void applyAllSettings() const; | ||||
67 | | ||||
68 | public Q_SLOTS: | ||||
69 | void onGlobalSettingsChange(int settingsChangeType, int arg) const; | ||||
70 | | ||||
71 | private: | ||||
72 | QScopedPointer<ConfigValueProvider> configValueProvider; | ||||
73 | }; |