~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to kwin/clients/aurorae/src/lib/themeconfig.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/********************************************************************
 
2
Copyright (C) 2009 Martin Gräßlin <kde@martin-graesslin.com>
 
3
 
 
4
This program is free software; you can redistribute it and/or modify
 
5
it under the terms of the GNU General Public License as published by
 
6
the Free Software Foundation; either version 2 of the License, or
 
7
(at your option) any later version.
 
8
 
 
9
This program is distributed in the hope that it will be useful,
 
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
General Public License for more details.
 
13
 
 
14
You should have received a copy of the GNU General Public License
 
15
along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
16
*********************************************************************/
 
17
#ifndef THEMECONFIG_H
 
18
#define THEMECONFIG_H
 
19
// This class encapsulates all theme config values
 
20
// it's a separate class as it's needed by both deco and config dialog
 
21
 
 
22
#include <QString>
 
23
#include <QColor>
 
24
 
 
25
class KConfig;
 
26
 
 
27
namespace Aurorae
 
28
{
 
29
class ThemeConfig
 
30
{
 
31
public:
 
32
    ThemeConfig();
 
33
    void load(const KConfig &conf);
 
34
    ~ThemeConfig() {};
 
35
    // active window
 
36
    QColor activeTextColor(bool useTabs = false, bool focused = true) const;
 
37
    // inactive window
 
38
    QColor inactiveTextColor(bool useTabs = false, bool focused = true) const;
 
39
    QColor activeTextShadowColor() const {
 
40
        return m_activeTextShadowColor;
 
41
    }
 
42
    QColor inactiveTextShadowColor() const {
 
43
        return m_inactiveTextShadowColor;
 
44
    }
 
45
    int textShadowOffsetX() const {
 
46
        return m_textShadowOffsetX;
 
47
    }
 
48
    int textShadowOffsetY() const {
 
49
        return m_textShadowOffsetY;
 
50
    }
 
51
    bool useTextShadow() const {
 
52
        return m_useTextShadow;
 
53
    }
 
54
    bool haloActive() const {
 
55
        return m_haloActive;
 
56
    }
 
57
    bool haloInactive() const {
 
58
        return m_haloInactive;
 
59
    }
 
60
    // Alignment
 
61
    Qt::Alignment alignment() const {
 
62
        return m_alignment;
 
63
    };
 
64
    Qt::Alignment verticalAlignment() const {
 
65
        return m_verticalAlignment;
 
66
    }
 
67
    int animationTime() const {
 
68
        return m_animationTime;
 
69
    }
 
70
    // Borders
 
71
    int borderLeft() const {
 
72
        return m_borderLeft;
 
73
    }
 
74
    int borderRight() const {
 
75
        return m_borderRight;
 
76
    }
 
77
    int borderBottom() const {
 
78
        return m_borderBottom;
 
79
    }
 
80
    int borderTop() const {
 
81
        return m_borderTop;
 
82
    }
 
83
 
 
84
    int titleEdgeTop() const {
 
85
        return m_titleEdgeTop;
 
86
    }
 
87
    int titleEdgeBottom() const {
 
88
        return m_titleEdgeBottom;
 
89
    }
 
90
    int titleEdgeLeft() const {
 
91
        return m_titleEdgeLeft;
 
92
    }
 
93
    int titleEdgeRight() const {
 
94
        return m_titleEdgeRight;
 
95
    }
 
96
    int titleEdgeTopMaximized() const {
 
97
        return m_titleEdgeTopMaximized;
 
98
    }
 
99
    int titleEdgeBottomMaximized() const {
 
100
        return m_titleEdgeBottomMaximized;
 
101
    }
 
102
    int titleEdgeLeftMaximized() const {
 
103
        return m_titleEdgeLeftMaximized;
 
104
    }
 
105
    int titleEdgeRightMaximized() const {
 
106
        return m_titleEdgeRightMaximized;
 
107
    }
 
108
    int titleBorderLeft() const {
 
109
        return m_titleBorderLeft;
 
110
    }
 
111
    int titleBorderRight() const {
 
112
        return m_titleBorderRight;
 
113
    }
 
114
    int titleHeight() const {
 
115
        return m_titleHeight;
 
116
    }
 
117
 
 
118
    int buttonWidth() const {
 
119
        return m_buttonWidth;
 
120
    }
 
121
    int buttonWidthMinimize() const {
 
122
        return m_buttonWidthMinimize;
 
123
    }
 
124
    int buttonWidthMaximizeRestore() const {
 
125
        return m_buttonWidthMaximizeRestore;
 
126
    }
 
127
    int buttonWidthClose() const {
 
128
        return m_buttonWidthClose;
 
129
    }
 
130
    int buttonWidthAllDesktops() const {
 
131
        return m_buttonWidthAllDesktops;
 
132
    }
 
133
    int buttonWidthKeepAbove() const {
 
134
        return m_buttonWidthKeepAbove;
 
135
    }
 
136
    int buttonWidthKeepBelow() const {
 
137
        return m_buttonWidthKeepBelow;
 
138
    }
 
139
    int buttonWidthShade() const {
 
140
        return m_buttonWidthShade;
 
141
    }
 
142
    int buttonWidthHelp() const {
 
143
        return m_buttonWidthHelp;
 
144
    }
 
145
    int buttonWidthMenu() const {
 
146
        return m_buttonWidthMenu;
 
147
    }
 
148
    int buttonHeight() const {
 
149
        return m_buttonHeight;
 
150
    }
 
151
    int buttonSpacing() const {
 
152
        return m_buttonSpacing;
 
153
    }
 
154
    int buttonMarginTop() const {
 
155
        return m_buttonMarginTop;
 
156
    }
 
157
    int explicitButtonSpacer() const {
 
158
        return m_explicitButtonSpacer;
 
159
    }
 
160
 
 
161
    int paddingLeft() const {
 
162
        return m_paddingLeft;
 
163
    }
 
164
    int paddingRight() const {
 
165
        return m_paddingRight;
 
166
    }
 
167
    int paddingTop() const {
 
168
        return m_paddingTop;
 
169
    }
 
170
    int paddingBottom() const {
 
171
        return m_paddingBottom;
 
172
    }
 
173
 
 
174
    QString defaultButtonsLeft() const {
 
175
        return m_defaultButtonsLeft;
 
176
    }
 
177
    QString defaultButtonsRight() const {
 
178
        return m_defaultButtonsRight;
 
179
    }
 
180
    bool shadow() const {
 
181
        return m_shadow;
 
182
    }
 
183
 
 
184
    int decorationPosition() const {
 
185
        return m_decorationPosition;
 
186
    }
 
187
 
 
188
private:
 
189
    QColor m_activeTextColor;
 
190
    QColor m_activeFocusedTextColor;
 
191
    QColor m_activeUnfocusedTextColor;
 
192
    QColor m_inactiveTextColor;
 
193
    QColor m_inactiveFocusedTextColor;
 
194
    QColor m_inactiveUnfocusedTextColor;
 
195
    QColor m_activeTextShadowColor;
 
196
    QColor m_inactiveTextShadowColor;
 
197
    int m_textShadowOffsetX;
 
198
    int m_textShadowOffsetY;
 
199
    bool m_useTextShadow;
 
200
    bool m_haloActive;
 
201
    bool m_haloInactive;
 
202
    Qt::Alignment m_alignment;
 
203
    Qt::Alignment m_verticalAlignment;
 
204
    // borders
 
205
    int m_borderLeft;
 
206
    int m_borderRight;
 
207
    int m_borderBottom;
 
208
    int m_borderTop;
 
209
 
 
210
    // title
 
211
    int m_titleEdgeTop;
 
212
    int m_titleEdgeBottom;
 
213
    int m_titleEdgeLeft;
 
214
    int m_titleEdgeRight;
 
215
    int m_titleEdgeTopMaximized;
 
216
    int m_titleEdgeBottomMaximized;
 
217
    int m_titleEdgeLeftMaximized;
 
218
    int m_titleEdgeRightMaximized;
 
219
    int m_titleBorderLeft;
 
220
    int m_titleBorderRight;
 
221
    int m_titleHeight;
 
222
 
 
223
    // buttons
 
224
    int m_buttonWidth;
 
225
    int m_buttonWidthMinimize;
 
226
    int m_buttonWidthMaximizeRestore;
 
227
    int m_buttonWidthClose;
 
228
    int m_buttonWidthAllDesktops;
 
229
    int m_buttonWidthKeepAbove;
 
230
    int m_buttonWidthKeepBelow;
 
231
    int m_buttonWidthShade;
 
232
    int m_buttonWidthHelp;
 
233
    int m_buttonWidthMenu;
 
234
    int m_buttonHeight;
 
235
    int m_buttonSpacing;
 
236
    int m_buttonMarginTop;
 
237
    int m_explicitButtonSpacer;
 
238
 
 
239
    // padding
 
240
    int m_paddingLeft;
 
241
    int m_paddingRight;
 
242
    int m_paddingTop;
 
243
    int m_paddingBottom;
 
244
 
 
245
    int m_animationTime;
 
246
 
 
247
    QString m_defaultButtonsLeft;
 
248
    QString m_defaultButtonsRight;
 
249
    bool m_shadow;
 
250
 
 
251
    int m_decorationPosition;
 
252
};
 
253
 
 
254
}
 
255
 
 
256
#endif