Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / runtime / kstyles / web / webstyle.h
blobc3e41437bebaa21093a2c3c145bcca55da234a3a
1 /*
2 * Copyright (C) 2001 Rik Hemsley (rikkus) <rik@kde.org>
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.
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.
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., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
20 #ifndef WEB_STYLE_H
21 #define WEB_STYLE_H
23 #include <kstyle.h>
24 #include <QtGui/QPalette>
26 class QPainter;
27 class QScrollBar;
28 class QPushButton;
29 class QWidget;
31 class WebStyle : public KStyle
33 public:
35 WebStyle();
37 ~WebStyle();
39 void polish(QApplication *);
41 void unPolish(QWidget *);
43 void polish(QWidget *);
45 void polish(QPalette &);
47 void unPolish(QApplication *);
49 void drawButton
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
61 QRect buttonRect(int x, int y, int w, int h);
63 void drawBevelButton
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
75 void drawPushButton(QPushButton *, QPainter *);
77 virtual void drawPushButtonLabel(QPushButton *, QPainter *);
79 void drawScrollBarControls
81 QPainter *,
82 const QScrollBar *,
83 int sliderStart,
84 uint controls,
85 uint activeControl
88 QStyle::ScrollControl scrollBarPointOver
90 const QScrollBar *,
91 int sliderStart,
92 const QPoint &
95 void scrollBarMetrics
97 const QScrollBar *,
98 int & sliderMin,
99 int & sliderMax,
100 int & sliderLength,
101 int & buttonDim
104 QSize indicatorSize() const;
106 void drawIndicator
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
119 QSize exclusiveIndicatorSize() const;
121 void drawExclusiveIndicator
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
134 void drawIndicatorMask
136 QPainter *,
137 int x,
138 int y,
139 int w,
140 int h,
141 int state
144 void drawExclusiveIndicatorMask
146 QPainter *,
147 int x,
148 int y,
149 int w,
150 int h,
151 bool on
154 void drawComboButton
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
168 QRect comboButtonRect(int x, int y, int w, int h);
170 QRect comboButtonFocusRect(int x, int y, int w, int h);
172 int sliderLength() const;
174 void drawSliderGroove
176 QPainter *,
177 int x,
178 int y,
179 int w,
180 int h,
181 const QColorGroup &,
182 QCOORD,
183 Qt::Orientation
186 void drawArrow
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
200 void drawSlider
202 QPainter *,
203 int x,
204 int y,
205 int w,
206 int h,
207 const QColorGroup &,
208 Qt::Orientation,
209 bool tickAbove,
210 bool tickBelow
213 void drawKToolBar
215 QPainter *,
216 int x,
217 int y,
218 int w,
219 int h,
220 const QColorGroup &,
221 KToolBarPos,
222 QBrush * fill = 0
225 void drawKBarHandle
227 QPainter *,
228 int x,
229 int y,
230 int w,
231 int h,
232 const QColorGroup &,
233 KToolBarPos,
234 QBrush * fill = 0
237 void drawKMenuBar
239 QPainter *,
240 int x,
241 int y,
242 int w,
243 int h,
244 const QColorGroup &,
245 bool macMode,
246 QBrush * fill = 0
249 void drawKToolBarButton
251 QPainter * p,
252 int x,
253 int y,
254 int w,
255 int h,
256 const QColorGroup & g,
257 bool sunken = false,
258 bool raised = true,
259 bool enabled = true,
260 bool popup = false,
261 KToolButtonType = Icon,
262 const QString & btext = QString(),
263 const QPixmap * = 0,
264 QFont * = 0,
265 QWidget * button = 0
268 void drawKMenuItem
270 QPainter *,
271 int x,
272 int y,
273 int w,
274 int h,
275 const QColorGroup &,
276 bool active,
277 QMenuItem *,
278 QBrush * fill = 0
281 void drawPopupMenuItem
283 QPainter *,
284 bool checkable,
285 int maxpmw,
286 int tab,
287 QMenuItem *,
288 const QPalette &,
289 bool act,
290 bool enabled,
291 int x,
292 int y,
293 int w,
294 int h
297 void drawKProgressBlock
299 QPainter *,
300 int x,
301 int y,
302 int w,
303 int h,
304 const QColorGroup &,
305 QBrush * fill
308 void drawFocusRect
310 QPainter *,
311 const QRect &,
312 const QColorGroup &,
313 const QColor * pen,
314 bool atBorder
317 void drawPanel
319 QPainter *,
320 int x,
321 int y,
322 int w,
323 int h,
324 const QColorGroup &,
325 bool sunken,
326 int lineWidth = 1,
327 const QBrush * = 0
330 void drawPopupPanel
332 QPainter *,
333 int x,
334 int y,
335 int w,
336 int h,
337 const QColorGroup &,
338 int lineWidth = 2,
339 const QBrush * = 0
342 void drawSeparator
344 QPainter *,
345 int x,
346 int y,
347 int w,
348 int h,
349 const QColorGroup &,
350 bool sunken = true,
351 int lineWidth = 1,
352 int midLineWidth = 0
355 void drawTab
357 QPainter * p,
358 const QTabBar * tabBar,
359 QTab * tab,
360 bool selected
363 void drawTabMask
365 QPainter * p,
366 const QTabBar *,
367 QTab * tab,
368 bool
371 void drawKickerHandle
373 QPainter * p,
374 int x,
375 int y,
376 int w,
377 int h,
378 const QColorGroup & g,
379 QBrush *
382 void drawKickerAppletHandle
384 QPainter * p,
385 int x,
386 int y,
387 int w,
388 int h,
389 const QColorGroup & g,
390 QBrush *
393 void drawKickerTaskButton
395 QPainter * p,
396 int x,
397 int y,
398 int w,
399 int h,
400 const QColorGroup & g,
401 const QString & title,
402 bool active,
403 QPixmap * icon,
404 QBrush *
407 int popupMenuItemHeight(bool, QMenuItem *, const QFontMetrics &);
409 Qt::GUIStyle guiStyle() const { return Qt::MotifStyle; }
411 bool eventFilter(QObject *, QEvent *);
414 #endif