Changeset View
Changeset View
Standalone View
Standalone View
kded/kwin_bridge/dummydecorationsettings.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 <KDecoration2/Private/DecorationSettingsPrivate> | ||
24 | #include <KDecoration2/DecorationSettings> | ||||
24 | 25 | | |||
25 | class QString; | 26 | namespace KDecoration2 { | ||
26 | class QFont; | | |||
27 | 27 | | |||
28 | class ConfigValueProvider | 28 | class DummyDecorationSettings : public KDecoration2::DecorationSettingsPrivate | ||
29 | { | 29 | { | ||
30 | public: | 30 | public: | ||
31 | ConfigValueProvider(); | 31 | explicit DummyDecorationSettings(DecorationSettings *parent); | ||
32 | 32 | | |||
33 | QString fontName() const; | 33 | virtual bool isOnAllDesktopsAvailable() const override; | ||
34 | QString iconThemeName() const; | 34 | virtual bool isAlphaChannelSupported() const override; | ||
35 | QString cursorThemeName() const; | 35 | virtual bool isCloseOnDoubleClickOnMenu() const override; | ||
36 | bool iconsOnButtons() const; | 36 | virtual QVector<DecorationButtonType> decorationButtonsLeft() const override; | ||
37 | bool iconsInMenus() const; | 37 | virtual QVector<DecorationButtonType> decorationButtonsRight() const override; | ||
38 | int toolbarStyle() const; | 38 | virtual BorderSize borderSize() const override; | ||
39 | bool scrollbarBehavior() const; | | |||
40 | bool preferDarkTheme() const; | | |||
41 | QString windowDecorationsButtonsOrder() const; | | |||
42 | bool enableAnimations() const; | | |||
43 | QMap<QString, QColor> colors() const; | | |||
44 | | ||||
45 | private: | | |||
46 | QString fontStyleHelper(const QFont &font) const; | | |||
47 | QString windowDecorationButtonsOrderInGtkNotation(const QString &kdeConfigValue) const; | | |||
48 | | ||||
49 | KSharedConfigPtr kdeglobalsConfig; | | |||
50 | KSharedConfigPtr inputConfig; | | |||
51 | KSharedConfigPtr kwinConfig; | | |||
52 | }; | 39 | }; | ||
40 | | ||||
41 | } | ||||
42 | | ||||
43 | | ||||
44 | |