summaryrefslogtreecommitdiff
path: root/noncore/styles/webstyle.h
Unidiff
Diffstat (limited to 'noncore/styles/webstyle.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/styles/webstyle.h299
1 files changed, 299 insertions, 0 deletions
diff --git a/noncore/styles/webstyle.h b/noncore/styles/webstyle.h
new file mode 100644
index 0000000..83ab784
--- a/dev/null
+++ b/noncore/styles/webstyle.h
@@ -0,0 +1,299 @@
1/*
2 * Copyright (C) 2001 Rik Hemsley (rikkus) <rik@kde.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library 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 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
18 */
19
20#ifndef WEB_STYLE_H
21#define WEB_STYLE_H
22
23#include <qstyle.h>
24#include <qwindowsstyle.h>
25#include <qpalette.h>
26
27class QPainter;
28class QScrollBar;
29class QPushButton;
30class QWidget;
31
32class WebStyle : public QWindowsStyle {
33 public:
34
35 WebStyle();
36
37 ~WebStyle();
38
39 void polish(QApplication *);
40
41 void unPolish(QWidget *);
42
43 void polish(QWidget *);
44
45 void polish(QPalette &);
46
47 void unPolish(QApplication *);
48
49 void drawButton
50 (
51 QPainter * p,
52 int x,
53 int y,
54 int w,
55 int h,
56 const QColorGroup & g,
57 bool sunken = false,
58 const QBrush * fill = 0
59 );
60
61 QRect buttonRect(int x, int y, int w, int h);
62
63 void drawBevelButton
64 (
65 QPainter *,
66 int x,
67 int y,
68 int w,
69 int h,
70 const QColorGroup &,
71 bool sunken = false,
72 const QBrush * fill = 0
73 );
74
75 void drawPushButton(QPushButton *, QPainter *);
76
77 virtual void drawPushButtonLabel(QPushButton *, QPainter *);
78
79 void drawScrollBarControls
80 (
81 QPainter *,
82 const QScrollBar *,
83 int sliderStart,
84 uint controls,
85 uint activeControl
86 );
87
88 QStyle::ScrollControl scrollBarPointOver
89 (
90 const QScrollBar *,
91 int sliderStart,
92 const QPoint &
93 );
94
95 void scrollBarMetrics
96 (
97 const QScrollBar *,
98 int & sliderMin,
99 int & sliderMax,
100 int & sliderLength,
101 int & buttonDim
102 );
103
104 QSize indicatorSize() const;
105
106 void drawIndicator
107 (
108 QPainter *,
109 int x,
110 int y,
111 int w,
112 int h,
113 const QColorGroup &,
114 int state,
115 bool down = false,
116 bool enabled = true
117 );
118
119 QSize exclusiveIndicatorSize() const;
120
121 void drawExclusiveIndicator
122 (
123 QPainter *,
124 int x,
125 int y,
126 int w,
127 int h,
128 const QColorGroup &,
129 bool on,
130 bool down = false,
131 bool enabled = true
132 );
133
134 void drawIndicatorMask
135 (
136 QPainter *,
137 int x,
138 int y,
139 int w,
140 int h,
141 int state
142 );
143
144 void drawExclusiveIndicatorMask
145 (
146 QPainter *,
147 int x,
148 int y,
149 int w,
150 int h,
151 bool on
152 );
153
154 void drawComboButton
155 (
156 QPainter *,
157 int x,
158 int y,
159 int w,
160 int h,
161 const QColorGroup &,
162 bool sunken = false,
163 bool editable = false,
164 bool enabled = true,
165 const QBrush * fill = 0
166 );
167
168 QRect comboButtonRect(int x, int y, int w, int h);
169
170 QRect comboButtonFocusRect(int x, int y, int w, int h);
171
172 int sliderLength() const;
173
174 void drawSliderGroove
175 (
176 QPainter *,
177 int x,
178 int y,
179 int w,
180 int h,
181 const QColorGroup &,
182 QCOORD,
183 Orientation
184 );
185
186 void drawArrow
187 (
188 QPainter *,
189 Qt::ArrowType,
190 bool down,
191 int x,
192 int y,
193 int w,
194 int h,
195 const QColorGroup &,
196 bool enabled = true,
197 const QBrush * fill = 0
198 );
199
200 void drawSlider
201 (
202 QPainter *,
203 int x,
204 int y,
205 int w,
206 int h,
207 const QColorGroup &,
208 Orientation,
209 bool tickAbove,
210 bool tickBelow
211 );
212
213 void drawPopupMenuItem
214 (
215 QPainter *,
216 bool checkable,
217 int maxpmw,
218 int tab,
219 QMenuItem *,
220 const QPalette &,
221 bool act,
222 bool enabled,
223 int x,
224 int y,
225 int w,
226 int h
227 );
228
229 void drawFocusRect
230 (
231 QPainter *,
232 const QRect &,
233 const QColorGroup &,
234 const QColor * pen,
235 bool atBorder
236 );
237
238 void drawPanel
239 (
240 QPainter *,
241 int x,
242 int y,
243 int w,
244 int h,
245 const QColorGroup &,
246 bool sunken,
247 int lineWidth = 1,
248 const QBrush * = 0
249 );
250
251 void drawPopupPanel
252 (
253 QPainter *,
254 int x,
255 int y,
256 int w,
257 int h,
258 const QColorGroup &,
259 int lineWidth = 2,
260 const QBrush * = 0
261 );
262
263 void drawSeparator
264 (
265 QPainter *,
266 int x,
267 int y,
268 int w,
269 int h,
270 const QColorGroup &,
271 bool sunken = true,
272 int lineWidth = 1,
273 int midLineWidth = 0
274 );
275
276 void drawTab
277 (
278 QPainter * p,
279 const QTabBar * tabBar,
280 QTab * tab,
281 bool selected
282 );
283
284 void drawTabMask
285 (
286 QPainter * p,
287 const QTabBar *,
288 QTab * tab,
289 bool
290 );
291
292 int popupMenuItemHeight(bool, QMenuItem *, const QFontMetrics &);
293
294 GUIStyle guiStyle() const { return Qt::MotifStyle; }
295
296 bool eventFilter(QObject *, QEvent *);
297};
298
299#endif