Changeset View
Changeset View
Standalone View
Standalone View
kded/kwin_bridge/dummydecorationbridge.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/DecorationBridge> | ||
24 | #include <KDecoration2/Decoration> | ||||
24 | 25 | | |||
25 | class QString; | 26 | namespace KDecoration2 | ||
26 | class QFont; | 27 | { | ||
28 | | ||||
29 | class DecorationSettings; | ||||
30 | class DecoratedClientPrivate; | ||||
31 | class DecorationSettingsPrivate; | ||||
27 | 32 | | |||
28 | class ConfigValueProvider | 33 | class DummyDecorationBridge : public DecorationBridge | ||
29 | { | 34 | { | ||
35 | Q_OBJECT | ||||
30 | public: | 36 | public: | ||
31 | ConfigValueProvider(); | 37 | explicit DummyDecorationBridge(QObject* parent = nullptr); | ||
38 | ~DummyDecorationBridge() override = default; | ||||
32 | 39 | | |||
33 | QString fontName() const; | 40 | std::unique_ptr<KDecoration2::DecorationSettingsPrivate> settings(KDecoration2::DecorationSettings* parent) override; | ||
34 | QString iconThemeName() const; | 41 | void update(KDecoration2::Decoration* decoration, const QRect& geometry) override; | ||
35 | QString cursorThemeName() const; | 42 | std::unique_ptr<KDecoration2::DecoratedClientPrivate> createClient(KDecoration2::DecoratedClient* client, KDecoration2::Decoration* decoration) override; | ||
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 | | ||||
44 | private: | | |||
45 | QString fontStyleHelper(const QFont &font) const; | | |||
46 | QString windowDecorationButtonsOrderInGtkNotation(const QString &kdeConfigValue) const; | | |||
47 | | ||||
48 | KSharedConfigPtr kdeglobalsConfig; | | |||
49 | KSharedConfigPtr inputConfig; | | |||
50 | KSharedConfigPtr kwinConfig; | | |||
51 | }; | 43 | }; | ||
44 | | ||||
45 | } | ||||
46 | | ||||
47 | |