Changeset View
Changeset View
Standalone View
Standalone View
kded/kwin_bridge/auroraedecorationpainter.h
- This file was copied from kded/configvalueprovider.h.
1 | /* | 1 | /* | ||
---|---|---|---|---|---|
2 | * Copyright (C) 2019 Mikhail Zolotukhin <zomial@protonmail.com> | 2 | * Copyright 2020 Mikhail Zolotukhin <zomial@protonmail.com> | ||
3 | * | 3 | * | ||
4 | * This program is free software; you can redistribute it and/or | 4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License as | 5 | * modify it under the terms of the GNU General Public License as | ||
6 | * published by the Free Software Foundation; either version 2 of | 6 | * published by the Free Software Foundation; either version 2 of | ||
7 | * the License or (at your option) version 3 or any later version | 7 | * the License or (at your option) version 3 or any later version | ||
8 | * accepted by the membership of KDE e.V. (or its successor approved | 8 | * accepted by the membership of KDE e.V. (or its successor approved | ||
9 | * by the membership of KDE e.V.), which shall act as a proxy | 9 | * by the membership of KDE e.V.), which shall act as a proxy | ||
10 | * defined in Section 14 of version 3 of the license. | 10 | * defined in Section 14 of version 3 of the license. | ||
11 | * | 11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | 12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | 15 | * GNU General Public License for more details. | ||
16 | * | 16 | * | ||
17 | * You should have received a copy of the GNU General Public License | 17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | #pragma once | 21 | #pragma once | ||
22 | 22 | | |||
23 | #include <KSharedConfig> | 23 | #include <QString> | ||
24 | 24 | | |||
25 | class QString; | 25 | #include "decorationpainter.h" | ||
26 | class QFont; | | |||
27 | 26 | | |||
28 | class ConfigValueProvider | 27 | class AuroraeDecorationPainter : public DecorationPainter | ||
29 | { | 28 | { | ||
30 | public: | 29 | public: | ||
31 | ConfigValueProvider(); | 30 | AuroraeDecorationPainter(const QString &themeName); | ||
31 | ~AuroraeDecorationPainter() = default; | ||||
32 | 32 | | |||
33 | QString fontName() const; | 33 | void paintButton(QPainter &painter, const QString &buttonType, const QString &buttonState) const override; | ||
34 | QString iconThemeName() const; | | |||
35 | QString cursorThemeName() const; | | |||
36 | bool iconsOnButtons() const; | | |||
37 | bool iconsInMenus() const; | | |||
38 | int toolbarStyle() const; | | |||
39 | bool scrollbarBehavior() const; | | |||
40 | bool preferDarkTheme() const; | | |||
41 | QString windowDecorationsButtonsOrder() const; | | |||
42 | bool enableAnimations() const; | | |||
43 | QMap<QString, QColor> colors() const; | | |||
44 | 34 | | |||
45 | private: | 35 | private: | ||
46 | QString fontStyleHelper(const QFont &font) const; | 36 | QString buttonTypeToFileName(const QString &buttonType) const; | ||
47 | QString windowDecorationButtonsOrderInGtkNotation(const QString &kdeConfigValue) const; | 37 | QString buttonStateToElementId(const QString &buttonState) const; | ||
48 | 38 | | |||
49 | KSharedConfigPtr kdeglobalsConfig; | 39 | static const QString s_auroraeThemesPath; | ||
50 | KSharedConfigPtr inputConfig; | 40 | | ||
51 | KSharedConfigPtr kwinConfig; | 41 | const QString m_themeName; | ||
42 | const QString m_themePath; | ||||
52 | }; | 43 | }; |