Changeset View
Changeset View
Standalone View
Standalone View
kded/kwin_bridge/decorationpalette.h
- This file was added.
1 | /******************************************************************** | ||||
---|---|---|---|---|---|
2 | KWin - the KDE window manager | ||||
3 | This file is part of the KDE project. | ||||
4 | | ||||
5 | Copyright 2014 Martin Gräßlin <mgraesslin@kde.org> | ||||
6 | Copyright 2014 Hugo Pereira Da Costa <hugo.pereira@free.fr> | ||||
7 | Copyright 2015 Mika Allan Rauhala <mika.allan.rauhala@gmail.com> | ||||
8 | | ||||
9 | This program is free software; you can redistribute it and/or modify | ||||
10 | it under the terms of the GNU General Public License as published by | ||||
11 | the Free Software Foundation; either version 2 of the License, or | ||||
12 | (at your option) any later version. | ||||
13 | | ||||
14 | This program is distributed in the hope that it will be useful, | ||||
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
17 | GNU General Public License for more details. | ||||
18 | | ||||
19 | You should have received a copy of the GNU General Public License | ||||
20 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
21 | *********************************************************************/ | ||||
22 | | ||||
23 | #ifndef KWIN_DECORATION_PALETTE_H | ||||
24 | #define KWIN_DECORATION_PALETTE_H | ||||
25 | | ||||
26 | #include <KDecoration2/DecorationSettings> | ||||
27 | #include <QFileSystemWatcher> | ||||
28 | #include <QPalette> | ||||
29 | | ||||
30 | namespace KWin | ||||
31 | { | ||||
32 | namespace Decoration | ||||
33 | { | ||||
34 | | ||||
35 | class DecorationPalette : public QObject | ||||
36 | { | ||||
37 | Q_OBJECT | ||||
38 | public: | ||||
39 | DecorationPalette(const QString &colorScheme); | ||||
40 | | ||||
41 | bool isValid() const; | ||||
42 | | ||||
43 | QColor color(KDecoration2::ColorGroup group, KDecoration2::ColorRole role) const; | ||||
44 | QPalette palette() const; | ||||
45 | | ||||
46 | Q_SIGNALS: | ||||
47 | void changed(); | ||||
48 | private: | ||||
49 | void update(); | ||||
50 | | ||||
51 | QString m_colorScheme; | ||||
52 | QFileSystemWatcher m_watcher; | ||||
53 | | ||||
54 | QPalette m_palette; | ||||
55 | | ||||
56 | QColor m_activeTitleBarColor; | ||||
57 | QColor m_inactiveTitleBarColor; | ||||
58 | | ||||
59 | QColor m_activeFrameColor; | ||||
60 | QColor m_inactiveFrameColor; | ||||
61 | | ||||
62 | QColor m_activeForegroundColor; | ||||
63 | QColor m_inactiveForegroundColor; | ||||
64 | QColor m_warningForegroundColor; | ||||
65 | }; | ||||
66 | | ||||
67 | } | ||||
68 | } | ||||
69 | | ||||
70 | #endif |