Diffstat (limited to 'noncore/styles/theme/othemestyle.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/styles/theme/othemestyle.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/noncore/styles/theme/othemestyle.h b/noncore/styles/theme/othemestyle.h index 52445c4..406b35b 100644 --- a/noncore/styles/theme/othemestyle.h +++ b/noncore/styles/theme/othemestyle.h | |||
@@ -17,24 +17,26 @@ | |||
17 | */ | 17 | */ |
18 | #ifndef __KTHEMESTYLE_H | 18 | #ifndef __KTHEMESTYLE_H |
19 | #define __KTHEMESTYLE_H | 19 | #define __KTHEMESTYLE_H |
20 | 20 | ||
21 | #include "othemebase.h" | 21 | #include "othemebase.h" |
22 | #include <qwindowdefs.h> | 22 | #include <qwindowdefs.h> |
23 | #include <qobject.h> | 23 | #include <qobject.h> |
24 | #include <qbutton.h> | 24 | #include <qbutton.h> |
25 | #include <qpushbutton.h> | 25 | #include <qpushbutton.h> |
26 | #include <qscrollbar.h> | 26 | #include <qscrollbar.h> |
27 | #include <qstring.h> | 27 | #include <qstring.h> |
28 | 28 | ||
29 | class QProgressBar; | ||
30 | |||
29 | 31 | ||
30 | /** | 32 | /** |
31 | * KDE themed styles. | 33 | * KDE themed styles. |
32 | * | 34 | * |
33 | * It provides methods for | 35 | * It provides methods for |
34 | * drawing most widgets with user-specified borders, highlights, pixmaps, | 36 | * drawing most widgets with user-specified borders, highlights, pixmaps, |
35 | * etc. It also handles various other settings such as scrollbar types, | 37 | * etc. It also handles various other settings such as scrollbar types, |
36 | * rounded buttons, and shading types. For a full list of parameters this | 38 | * rounded buttons, and shading types. For a full list of parameters this |
37 | * class handles refer to the KDE theme configuration documentation. | 39 | * class handles refer to the KDE theme configuration documentation. |
38 | * | 40 | * |
39 | */ | 41 | */ |
40 | 42 | ||
@@ -54,24 +56,26 @@ public: | |||
54 | virtual void unPolish( QWidget* ); | 56 | virtual void unPolish( QWidget* ); |
55 | /** | 57 | /** |
56 | * By default this just sets the background brushes to the pixmapped | 58 | * By default this just sets the background brushes to the pixmapped |
57 | * background. | 59 | * background. |
58 | */ | 60 | */ |
59 | virtual void polish( QApplication *app ); | 61 | virtual void polish( QApplication *app ); |
60 | virtual void unPolish( QApplication* ); | 62 | virtual void unPolish( QApplication* ); |
61 | 63 | ||
62 | /// @internal | 64 | /// @internal |
63 | // to make it possible for derived classes to overload this function | 65 | // to make it possible for derived classes to overload this function |
64 | virtual void polish( QPalette& pal ); | 66 | virtual void polish( QPalette& pal ); |
65 | 67 | ||
68 | virtual bool eventFilter ( QObject *obj, QEvent *ev ); | ||
69 | |||
66 | /** | 70 | /** |
67 | * This is a convenience method for drawing widgets with | 71 | * This is a convenience method for drawing widgets with |
68 | * borders, highlights, pixmaps, colors, etc... | 72 | * borders, highlights, pixmaps, colors, etc... |
69 | * You specify the widget type and it will draw it according to the | 73 | * You specify the widget type and it will draw it according to the |
70 | * config file settings. | 74 | * config file settings. |
71 | * | 75 | * |
72 | * @param p The QPainter to draw on. | 76 | * @param p The QPainter to draw on. |
73 | * @param g The color group to use. | 77 | * @param g The color group to use. |
74 | * @param rounded @p true if the widget is rounded, @p false if rectangular. | 78 | * @param rounded @p true if the widget is rounded, @p false if rectangular. |
75 | * @param type The widget type to paint. | 79 | * @param type The widget type to paint. |
76 | * @param fill An optional fill brush. Currently ignored (the config file | 80 | * @param fill An optional fill brush. Currently ignored (the config file |
77 | * is used instead). | 81 | * is used instead). |
@@ -303,30 +307,27 @@ public: | |||
303 | /** | 307 | /** |
304 | * Draw a menubar. | 308 | * Draw a menubar. |
305 | */ | 309 | */ |
306 | #if 0 | 310 | #if 0 |
307 | 311 | ||
308 | void drawKMenuBar( QPainter *p, int x, int y, int w, int h, | 312 | void drawKMenuBar( QPainter *p, int x, int y, int w, int h, |
309 | const QColorGroup &g, bool macMode, | 313 | const QColorGroup &g, bool macMode, |
310 | QBrush *fill = NULL ); | 314 | QBrush *fill = NULL ); |
311 | #endif | 315 | #endif |
312 | /** | 316 | /** |
313 | * Draw a menubar item. | 317 | * Draw a menubar item. |
314 | */ | 318 | */ |
315 | #if 0 | 319 | virtual void drawMenuBarItem( QPainter *p, int x, int y, int w, int h, |
316 | 320 | QMenuItem *item, const QColorGroup &g, | |
317 | virtual void drawKMenuItem( QPainter *p, int x, int y, int w, int h, | 321 | bool enabled, bool active ); |
318 | const QColorGroup &g, bool active, | ||
319 | QMenuItem *item, QBrush *fill = NULL ); | ||
320 | #endif | ||
321 | /** | 322 | /** |
322 | * Return the width of the splitter as specified in the config file. | 323 | * Return the width of the splitter as specified in the config file. |
323 | */ | 324 | */ |
324 | virtual int splitterWidth() const; | 325 | virtual int splitterWidth() const; |
325 | /** | 326 | /** |
326 | * Draw a splitter widget. | 327 | * Draw a splitter widget. |
327 | */ | 328 | */ |
328 | virtual void drawSplitter( QPainter *p, int x, int y, int w, int h, | 329 | virtual void drawSplitter( QPainter *p, int x, int y, int w, int h, |
329 | const QColorGroup &g, Orientation ); | 330 | const QColorGroup &g, Orientation ); |
330 | /** | 331 | /** |
331 | * Draw a checkmark. | 332 | * Draw a checkmark. |
332 | */ | 333 | */ |
@@ -343,26 +344,25 @@ public: | |||
343 | bool act, bool enabled, int x, int y, int w, | 344 | bool act, bool enabled, int x, int y, int w, |
344 | int h ); | 345 | int h ); |
345 | int popupMenuItemHeight( bool checkable, QMenuItem *mi, | 346 | int popupMenuItemHeight( bool checkable, QMenuItem *mi, |
346 | const QFontMetrics &fm ); | 347 | const QFontMetrics &fm ); |
347 | /** | 348 | /** |
348 | * Draw the focus rectangle. | 349 | * Draw the focus rectangle. |
349 | */ | 350 | */ |
350 | void drawFocusRect( QPainter *p, const QRect &r, const QColorGroup &g, | 351 | void drawFocusRect( QPainter *p, const QRect &r, const QColorGroup &g, |
351 | const QColor *c = 0, bool atBorder = false ); | 352 | const QColor *c = 0, bool atBorder = false ); |
352 | /** | 353 | /** |
353 | * Draw a @ref KProgess bar. | 354 | * Draw a @ref KProgess bar. |
354 | */ | 355 | */ |
355 | // virtual void drawKProgressBlock(QPainter *p, int x, int y, int w, int h, | 356 | virtual void drawProgressBar (QPainter *, int , int , int , int , const QColorGroup &, int ); |
356 | // const QColorGroup &g, QBrush *fill); | ||
357 | /** | 357 | /** |
358 | * Return the background for @ref KProgress. | 358 | * Return the background for @ref KProgress. |
359 | */ | 359 | */ |
360 | // virtual void getKProgressBackground(const QColorGroup &g, QBrush &bg); | 360 | // virtual void getKProgressBackground(const QColorGroup &g, QBrush &bg); |
361 | virtual void tabbarMetrics( const QTabBar*, int&, int&, int& ); | 361 | virtual void tabbarMetrics( const QTabBar*, int&, int&, int& ); |
362 | virtual void drawTab( QPainter*, const QTabBar*, QTab*, bool selected ); | 362 | virtual void drawTab( QPainter*, const QTabBar*, QTab*, bool selected ); |
363 | virtual void drawTabMask( QPainter*, const QTabBar*, QTab*, bool selected ); | 363 | virtual void drawTabMask( QPainter*, const QTabBar*, QTab*, bool selected ); |
364 | protected: | 364 | protected: |
365 | QPalette oldPalette, popupPalette, indiPalette, exIndiPalette; | 365 | QPalette oldPalette, popupPalette, indiPalette, exIndiPalette; |
366 | 366 | ||
367 | class OThemeStylePrivate; | 367 | class OThemeStylePrivate; |
368 | OThemeStylePrivate *d; | 368 | OThemeStylePrivate *d; |