-rw-r--r-- | noncore/styles/flat/flat.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/noncore/styles/flat/flat.h b/noncore/styles/flat/flat.h index e446800..ebea95b 100644 --- a/noncore/styles/flat/flat.h +++ b/noncore/styles/flat/flat.h | |||
@@ -12,30 +12,31 @@ | |||
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #ifndef FLATSTYLE_H | 21 | #ifndef FLATSTYLE_H |
22 | #define FLATSTYLE_H | 22 | #define FLATSTYLE_H |
23 | 23 | ||
24 | #include <qcolor.h> | ||
24 | #include <qwindowsstyle.h> | 25 | #include <qwindowsstyle.h> |
25 | #include <qpe/styleinterface.h> | 26 | #include <qpe/styleinterface.h> |
26 | 27 | ||
27 | class FlatStylePrivate; | 28 | class FlatStylePrivate; |
28 | 29 | ||
29 | class Q_EXPORT FlatStyle : public QWindowsStyle | 30 | class FlatStyle : public QWindowsStyle |
30 | { | 31 | { |
31 | public: | 32 | public: |
32 | FlatStyle(); | 33 | FlatStyle(); |
33 | virtual ~FlatStyle(); | 34 | virtual ~FlatStyle(); |
34 | virtual void polish( QPalette &p ); | 35 | virtual void polish( QPalette &p ); |
35 | virtual void polish( QWidget *w ); | 36 | virtual void polish( QWidget *w ); |
36 | virtual void unPolish( QWidget *w ); | 37 | virtual void unPolish( QWidget *w ); |
37 | 38 | ||
38 | int defaultFrameWidth () const; | 39 | int defaultFrameWidth () const; |
39 | void drawItem( QPainter *p, int x, int y, int w, int h, | 40 | void drawItem( QPainter *p, int x, int y, int w, int h, |
40 | int flags, const QColorGroup &g, bool enabled, | 41 | int flags, const QColorGroup &g, bool enabled, |
41 | const QPixmap *pixmap, const QString& text, int len, const QColor* penColor ); | 42 | const QPixmap *pixmap, const QString& text, int len, const QColor* penColor ); |
@@ -64,37 +65,40 @@ public: | |||
64 | ScrollControl scrollBarPointOver( const QScrollBar* sb, int sliderStart, const QPoint& p ); | 65 | ScrollControl scrollBarPointOver( const QScrollBar* sb, int sliderStart, const QPoint& p ); |
65 | void drawRiffles( QPainter* p, int x, int y, int w, int h, | 66 | void drawRiffles( QPainter* p, int x, int y, int w, int h, |
66 | const QColorGroup &g, bool horizontal ); | 67 | const QColorGroup &g, bool horizontal ); |
67 | int sliderLength() const; | 68 | int sliderLength() const; |
68 | void drawSlider( QPainter *p, int x, int y, int w, int h, | 69 | void drawSlider( QPainter *p, int x, int y, int w, int h, |
69 | const QColorGroup &g, Orientation, bool tickAbove, bool tickBelow ); | 70 | const QColorGroup &g, Orientation, bool tickAbove, bool tickBelow ); |
70 | void drawSliderMask( QPainter *p, int x, int y, int w, int h, | 71 | void drawSliderMask( QPainter *p, int x, int y, int w, int h, |
71 | Orientation, bool tickAbove, bool tickBelow ); | 72 | Orientation, bool tickAbove, bool tickBelow ); |
72 | void drawSliderGrooveMask( QPainter *p, int x, int y, int w, int h, | 73 | void drawSliderGrooveMask( QPainter *p, int x, int y, int w, int h, |
73 | const QColorGroup& , QCOORD c, Orientation orient ); | 74 | const QColorGroup& , QCOORD c, Orientation orient ); |
74 | void drawSliderGroove ( QPainter * p, int x, int y, int w, int h, const QColorGroup & g, QCOORD c, Orientation ); | 75 | void drawSliderGroove ( QPainter * p, int x, int y, int w, int h, const QColorGroup & g, QCOORD c, Orientation ); |
75 | void drawTab( QPainter *, const QTabBar *, QTab *, bool selected ); | 76 | void drawTab( QPainter *, const QTabBar *, QTab *, bool selected ); |
77 | void polishPopupMenu ( QPopupMenu * ); | ||
76 | int extraPopupMenuItemWidth( bool checkable, int maxpmw, QMenuItem*, const QFontMetrics& ); | 78 | int extraPopupMenuItemWidth( bool checkable, int maxpmw, QMenuItem*, const QFontMetrics& ); |
77 | int popupMenuItemHeight( bool checkable, QMenuItem*, const QFontMetrics& ); | 79 | int popupMenuItemHeight( bool checkable, QMenuItem*, const QFontMetrics& ); |
78 | void drawPopupMenuItem( QPainter* p, bool checkable, int maxpmw, int tab, QMenuItem* mi, | 80 | void drawPopupMenuItem( QPainter* p, bool checkable, int maxpmw, int tab, QMenuItem* mi, |
79 | const QPalette& pal, | 81 | const QPalette& pal, |
80 | bool act, bool enabled, int x, int y, int w, int h); | 82 | bool act, bool enabled, int x, int y, int w, int h); |
81 | 83 | ||
82 | int buttonMargin() const; | 84 | int buttonMargin() const; |
83 | QSize scrollBarExtent() const; | 85 | QSize scrollBarExtent() const; |
84 | void getButtonShift( int &x, int &y ); | 86 | void getButtonShift( int &x, int &y ); |
85 | 87 | ||
86 | private: | 88 | private: |
87 | FlatStylePrivate *d; | 89 | FlatStylePrivate *d; |
88 | bool revItem; | 90 | bool revItem; |
91 | bool fillBtnBorder; | ||
92 | QColor btnBg; | ||
89 | // Disabled copy constructor and operator= | 93 | // Disabled copy constructor and operator= |
90 | #if defined(Q_DISABLE_COPY) | 94 | #if defined(Q_DISABLE_COPY) |
91 | FlatStyle( const FlatStyle & ); | 95 | FlatStyle( const FlatStyle & ); |
92 | FlatStyle& operator=( const FlatStyle & ); | 96 | FlatStyle& operator=( const FlatStyle & ); |
93 | #endif | 97 | #endif |
94 | }; | 98 | }; |
95 | 99 | ||
96 | 100 | ||
97 | class FlatStyleImpl : public StyleInterface | 101 | class FlatStyleImpl : public StyleInterface |
98 | { | 102 | { |
99 | public: | 103 | public: |
100 | FlatStyleImpl(); | 104 | FlatStyleImpl(); |