blob: 4056dd4f95134a29a0a3512754e3dd4798dd3910 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
|
//
// C++ Interface: komposesettings
//
// Description:
//
//
// Author: Hans Oischinger <hans.oischinger@kde-mail.net>, (C) 2004
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef KOMPOSESETTINGS_H
#define KOMPOSESETTINGS_H
#include <qobject.h>
#include <qcolor.h>
#include <qfont.h>
#define MAX_DESKTOPS 16
enum KomposeDisplay { KOMPOSEDISPLAY_WORLD, KOMPOSEDISPLAY_VIRTUALDESKS, KOMPOSEDISPLAY_CURRENTDESK };
class KGlobalAccel;
class QFontMetrics;
/**
@author Hans Oischinger
*/
class KomposeSettings : public QObject
{
Q_OBJECT
protected:
KomposeSettings(QObject *parent = 0, const char *name = 0);
~KomposeSettings();
public:
static KomposeSettings *instance();
void readConfig();
void writeConfig();
bool hasDialogOpen() { return dialogOpen; }
KGlobalAccel *getGlobalAccel() const { return globalAccel; }
bool getUseComposite() const { return useComposite; }
void setUseComposite( bool b ) { useComposite = b; }
bool getPassiveScreenshots() const { return passiveScreenshots; }
void setPassiveScreenshots( bool b ) { passiveScreenshots = b; }
uint getScreenshotGrabDelay() { return screenshotGrabDelay; }
void setScreenshotGrabDelay( uint val ) { screenshotGrabDelay=val; }
bool getDynamicVirtDeskLayout() const { return dynamicVirtDeskLayout; }
void setDynamicVirtDeskLayout( bool b ) { dynamicVirtDeskLayout = b; }
bool getImageEffects() const { return imageEffects; }
void setImageEffects( bool b ) { imageEffects = b; }
int getDefaultView() const { return defaultView; }
void setDefaultView( int d ) { defaultView = d; }
int getIconSize() { return iconSize; }
void setIconSize( int i ) { iconSize = i; }
int getShowIcons() { return showIcons; }
void setShowIcons( bool b ) { showIcons = b; }
int getIconSizePixels();
void setWindowTitleFont( QFont f ) { windowTitleFont = f; }
const QFont& getWindowTitleFont() const { return windowTitleFont; }
int getShowWindowTitles() { return showWindowTitles; }
void setShowWindowTitles( bool b ) { showWindowTitles = b; }
int getShowWindowTitleShadow() { return showWindowTitleShadow; }
void setShowWindowTitleShadow( bool b ) { showWindowTitleShadow = b; }
const QColor& getWindowTitleFontColor() const { return windowTitleFontColor; }
void setWindowTitleFontColor( QColor c ) { windowTitleFontColor = c; }
const QColor& getWindowTitleFontShadowColor() const { return windowTitleFontShadowColor; }
void setWindowTitleFontShadowColor( QColor c ) { windowTitleFontShadowColor = c; }
const QFontMetrics* getWindowTitleFontMetrics() { return windowTitleFontMetrics; }
int getWindowTitleFontAscent() { return windowTitleFontAscent; }
int getWindowTitleFontHeight() { return windowTitleFontHeight; }
void setDesktopTitleFont( QFont f ) { desktopTitleFont = f; }
const QFont& getDesktopTitleFont() const { return desktopTitleFont; }
const QColor& getDesktopTitleFontColor() const { return desktopTitleFontColor; }
void setDesktopTitleFontColor( QColor c ) { desktopTitleFontColor = c; }
const QColor& getDesktopTitleFontHighlightColor() const { return desktopTitleFontHighlightColor; }
void setDesktopTitleFontHighlightColor( QColor c ) { desktopTitleFontHighlightColor = c; }
bool getCacheScaledPixmaps() const { return cacheScaledPixmaps; }
void setCacheScaledPixmaps( bool b ) { cacheScaledPixmaps = b; }
bool getActivateOnTopLeftCorner() const { return activateOnTopLeftCorner; }
void setActivateOnTopLeftCorner( bool b ) { activateOnTopLeftCorner = b; }
bool getActivateOnTopRightCorner() const { return activateOnTopRightCorner; }
void setActivateOnTopRighCorner( bool b ) { activateOnTopRightCorner = b; }
bool getActivateOnBottomLeftCorner() const { return activateOnBottomLeftCorner; }
void setActivateOnBottomLeftCorner( bool b ) { activateOnBottomLeftCorner = b; }
bool getActivateOnBottomRightCorner() const { return activateOnBottomRightCorner; }
void setActivateOnBottomRightCorner( bool b ) { activateOnBottomRightCorner = b; }
bool getActivateOnTopEdge() const { return activateOnTopEdge; }
void setActivateOnTopEdge( bool b ) { activateOnTopEdge = b; }
bool getActivateOnLeftEdge() const { return activateOnLeftEdge; }
void setActivateOnLeftEdge( bool b ) { activateOnLeftEdge= b; }
bool getActivateOnBottomEdge() const { return activateOnBottomEdge; }
void setActivateOnBottomEdge( bool b ) { activateOnBottomEdge = b; }
bool getActivateOnRightEdge() const { return activateOnRightEdge; }
void setActivateOnRightEdge( bool b ) { activateOnRightEdge = b; }
uint getAutoLockDelay() { return autoLockDelay; }
void setAutoLockDelay( uint val ) { autoLockDelay=val; }
void setShowDesktopNum( bool b ) { showDesktopNum = b; }
bool getShowDesktopNum() const { return showDesktopNum; }
void setViewScreen( int screen ) { viewScreen = screen; }
int getViewScreen() const { return viewScreen; }
public slots:
void showPreferencesDlg();
protected slots:
void calcFontMetrics();
signals:
void settingsChanged();
private:
KGlobalAccel *globalAccel;
bool dialogOpen;
bool useComposite;
bool passiveScreenshots;
uint screenshotGrabDelay;
bool dynamicVirtDeskLayout;
bool imageEffects;
int defaultView;
int iconSize;
bool showIcons;
bool showWindowTitles;
QFont windowTitleFont;
QFontMetrics *windowTitleFontMetrics;
int windowTitleFontAscent;
int windowTitleFontHeight;
QColor windowTitleFontColor;
bool showWindowTitleShadow;
QColor windowTitleFontShadowColor;
QFont desktopTitleFont;
QColor desktopTitleFontColor;
QColor desktopTitleFontHighlightColor;
bool cacheScaledPixmaps;
bool activateOnTopLeftCorner;
bool activateOnTopRightCorner;
bool activateOnBottomLeftCorner;
bool activateOnBottomRightCorner;
bool activateOnTopEdge;
bool activateOnLeftEdge;
bool activateOnBottomEdge;
bool activateOnRightEdge;
uint autoLockDelay;
bool showDesktopNum;
int viewScreen;
};
#endif
|