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

« back to all changes in this revision

Viewing changes to kwin/kcmkwin/kwinoptions/windows.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
 * windows.h
 
3
 *
 
4
 * Copyright (c) 1997 Patrick Dowler dowler@morgul.fsh.uvic.ca
 
5
 * Copyright (c) 2001 Waldo Bastian bastian@kde.org
 
6
 *
 
7
 *  This program is free software; you can redistribute it and/or modify
 
8
 *  it under the terms of the GNU General Public License as published by
 
9
 *  the Free Software Foundation; either version 2 of the License, or
 
10
 *  (at your option) any later version.
 
11
 *
 
12
 *  This program is distributed in the hope that it will be useful,
 
13
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
 *  GNU General Public License for more details.
 
16
 *
 
17
 *  You should have received a copy of the GNU General Public License
 
18
 *  along with this program; if not, write to the Free Software
 
19
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
20
 */
 
21
 
 
22
#ifndef KKWMWINDOWS_H
 
23
#define KKWMWINDOWS_H
 
24
 
 
25
#include <QWidget>
 
26
#include <kcmodule.h>
 
27
#include <config-workspace.h>
 
28
 
 
29
class QRadioButton;
 
30
class QCheckBox;
 
31
class QPushButton;
 
32
class KComboBox;
 
33
class QGroupBox;
 
34
class QLabel;
 
35
class QSlider;
 
36
class KButtonGroup;
 
37
// class QSpinBox;
 
38
 
 
39
class KColorButton;
 
40
class KIntNumInput;
 
41
 
 
42
#define TRANSPARENT 0
 
43
#define OPAQUE      1
 
44
 
 
45
#define CLICK_TO_FOCUS     0
 
46
#define FOCUS_FOLLOW_MOUSE 1
 
47
 
 
48
#define TITLEBAR_PLAIN  0
 
49
#define TITLEBAR_SHADED 1
 
50
 
 
51
#define RESIZE_TRANSPARENT  0
 
52
#define RESIZE_OPAQUE       1
 
53
 
 
54
#define SMART_PLACEMENT        0
 
55
#define MAXIMIZING_PLACEMENT   1
 
56
#define CASCADE_PLACEMENT      2
 
57
#define RANDOM_PLACEMENT       3
 
58
#define CENTERED_PLACEMENT     4
 
59
#define ZEROCORNERED_PLACEMENT 5
 
60
#define INTERACTIVE_PLACEMENT  6
 
61
#define MANUAL_PLACEMENT       7
 
62
 
 
63
#define  CLICK_TO_FOCUS               0
 
64
#define  FOCUS_FOLLOWS_MOUSE          1
 
65
#define  FOCUS_UNDER_MOUSE            2
 
66
#define  FOCUS_STRICTLY_UNDER_MOUSE   3
 
67
 
 
68
class KFocusConfig : public KCModule
 
69
{
 
70
    Q_OBJECT
 
71
public:
 
72
    KFocusConfig(bool _standAlone, KConfig *_config, const KComponentData &inst, QWidget *parent);
 
73
    ~KFocusConfig();
 
74
 
 
75
    void load();
 
76
    void save();
 
77
    void defaults();
 
78
 
 
79
protected:
 
80
    void showEvent(QShowEvent *ev);
 
81
 
 
82
private slots:
 
83
    void setDelayFocusEnabled();
 
84
    void focusPolicyChanged();
 
85
    void autoRaiseOnTog(bool);//CT 23Oct1998
 
86
    void delayFocusOnTog(bool);
 
87
    void clickRaiseOnTog(bool);
 
88
    void updateActiveMouseScreen();
 
89
    void changed() {
 
90
        emit KCModule::changed(true);
 
91
    }
 
92
 
 
93
 
 
94
private:
 
95
 
 
96
    int getFocus(void);
 
97
    int getAutoRaiseInterval(void);
 
98
    int getDelayFocusInterval(void);
 
99
 
 
100
    void setFocus(int);
 
101
    void setAutoRaiseInterval(int);
 
102
    void setAutoRaise(bool);
 
103
    void setDelayFocusInterval(int);
 
104
    void setDelayFocus(bool);
 
105
    void setClickRaise(bool);
 
106
    void setSeparateScreenFocus(bool);
 
107
    void setActiveMouseScreen(bool);
 
108
 
 
109
    void setFocusStealing(int);
 
110
    KComboBox* focusStealing;
 
111
 
 
112
    //QGroupBox *fcsBox;
 
113
    QWidget* fcsBox;
 
114
    KComboBox *focusCombo;
 
115
    QLabel *autoRaiseOnLabel;
 
116
    QCheckBox *autoRaiseOn;
 
117
    QLabel *delayFocusOnLabel;
 
118
    QCheckBox *delayFocusOn;
 
119
    QCheckBox *clickRaiseOn;
 
120
    KIntNumInput *autoRaise;
 
121
    KIntNumInput *delayFocus;
 
122
    QCheckBox *separateScreenFocus;
 
123
    QCheckBox *activeMouseScreen;
 
124
 
 
125
    KConfig *config;
 
126
    bool     standAlone;
 
127
};
 
128
 
 
129
class KMovingConfig : public KCModule
 
130
{
 
131
    Q_OBJECT
 
132
public:
 
133
    KMovingConfig(bool _standAlone, KConfig *config, const KComponentData &inst, QWidget *parent);
 
134
    ~KMovingConfig();
 
135
 
 
136
    void load();
 
137
    void save();
 
138
    void defaults();
 
139
 
 
140
protected:
 
141
    void showEvent(QShowEvent *ev);
 
142
 
 
143
private slots:
 
144
    void changed() {
 
145
        emit KCModule::changed(true);
 
146
    }
 
147
    void slotBrdrSnapChanged(int);
 
148
    void slotWndwSnapChanged(int);
 
149
    void slotCntrSnapChanged(int);
 
150
 
 
151
private:
 
152
    int getMove(void);
 
153
    int getResizeOpaque(void);
 
154
    bool getGeometryTip(void);   //KS
 
155
 
 
156
    void setMove(int);
 
157
    void setResizeOpaque(int);
 
158
    void setGeometryTip(bool); //KS
 
159
    void setMoveResizeMaximized(bool);
 
160
 
 
161
    KButtonGroup *windowsBox;
 
162
    QCheckBox *opaque;
 
163
    QCheckBox *resizeOpaqueOn;
 
164
    QCheckBox *geometryTipOn;
 
165
    QCheckBox *moveResizeMaximized;
 
166
 
 
167
    KConfig *config;
 
168
    bool     standAlone;
 
169
 
 
170
    int getBorderSnapZone();
 
171
    void setBorderSnapZone(int);
 
172
    int getWindowSnapZone();
 
173
    void setWindowSnapZone(int);
 
174
    int getCenterSnapZone();
 
175
    void setCenterSnapZone(int);
 
176
 
 
177
    KButtonGroup *MagicBox;
 
178
    QLabel *BrdrSnapLabel, *WndwSnapLabel, *CntrSnapLabel;
 
179
    KIntNumInput *BrdrSnap, *WndwSnap, *CntrSnap;
 
180
    QCheckBox *OverlapSnap;
 
181
 
 
182
};
 
183
 
 
184
class KAdvancedConfig : public KCModule
 
185
{
 
186
    Q_OBJECT
 
187
public:
 
188
    KAdvancedConfig(bool _standAlone, KConfig *config, const KComponentData &inst, QWidget *parent);
 
189
    ~KAdvancedConfig();
 
190
 
 
191
    void load();
 
192
    void save();
 
193
    void defaults();
 
194
 
 
195
protected:
 
196
    void showEvent(QShowEvent *ev);
 
197
 
 
198
private slots:
 
199
    void shadeHoverChanged(bool);
 
200
 
 
201
    void changed() {
 
202
        emit KCModule::changed(true);
 
203
    }
 
204
 
 
205
    void tilingOnChanged(bool a);
 
206
private:
 
207
 
 
208
    int getShadeHoverInterval(void);
 
209
    void setShadeHover(bool);
 
210
    void setShadeHoverInterval(int);
 
211
 
 
212
    KButtonGroup *shBox;
 
213
    KButtonGroup *wtBox;
 
214
    QCheckBox *shadeHoverOn;
 
215
    QLabel *shadeHoverLabel;
 
216
    KIntNumInput *shadeHover;
 
217
 
 
218
    KConfig *config;
 
219
    bool     standAlone;
 
220
 
 
221
    void setHideUtilityWindowsForInactive(bool);
 
222
    QCheckBox* hideUtilityWindowsForInactive;
 
223
 
 
224
    void setInactiveTabsSkipTaskbar(bool);
 
225
    QCheckBox* inactiveTabsSkipTaskbar;
 
226
 
 
227
    void setAutogroupSimilarWindows(bool);
 
228
    QCheckBox* autogroupSimilarWindows;
 
229
 
 
230
    void setAutogroupInForeground(bool);
 
231
    QCheckBox* autogroupInForeground;
 
232
 
 
233
    int getPlacement(void);   //CT
 
234
    void setPlacement(int); //CT
 
235
 
 
236
    KComboBox *placementCombo;
 
237
 
 
238
    // ------------------------------
 
239
    // Tiling related widgets/methods
 
240
    // ------------------------------
 
241
    KButtonGroup *tilBox;
 
242
    QCheckBox *tilingOn;
 
243
    QLabel *tilingLayoutLabel;
 
244
    QLabel *tilingRaiseLabel;
 
245
    KComboBox *tilingLayoutCombo;
 
246
    KComboBox *tilingRaiseCombo;
 
247
    void setTilingOn(bool);
 
248
    void setTilingLayout(int);
 
249
    void setTilingRaisePolicy(int);
 
250
};
 
251
 
 
252
#endif // KKWMWINDOWS_H