-rw-r--r-- | noncore/styles/fresh/fresh.h | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/noncore/styles/fresh/fresh.h b/noncore/styles/fresh/fresh.h new file mode 100644 index 0000000..b4be7f3 --- a/dev/null +++ b/noncore/styles/fresh/fresh.h | |||
@@ -0,0 +1,100 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of the Qtopia Environment. | ||
5 | ** | ||
6 | ** This file may be distributed and/or modified under the terms of the | ||
7 | ** GNU General Public License version 2 as published by the Free Software | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | |||
21 | #ifndef FRESHSTYLE_H | ||
22 | #define FRESHSTYLE_H | ||
23 | |||
24 | #include <qwindowsstyle.h> | ||
25 | #include <qpe/styleinterface.h> | ||
26 | |||
27 | class Q_EXPORT FreshStyle : public QWindowsStyle | ||
28 | { | ||
29 | public: | ||
30 | FreshStyle(); | ||
31 | virtual ~FreshStyle(); | ||
32 | virtual void polish( QPalette &p ); | ||
33 | virtual void polish( QWidget *w ); | ||
34 | virtual void unPolish( QWidget *w ); | ||
35 | |||
36 | int defaultFrameWidth () const; | ||
37 | void drawPanel ( QPainter * p, int x, int y, int w, int h, | ||
38 | const QColorGroup &, bool sunken=FALSE, int lineWidth = 1, const QBrush * fill = 0 ); | ||
39 | void drawButton( QPainter *p, int x, int y, int w, int h, | ||
40 | const QColorGroup &g, bool sunken, const QBrush* fill ); | ||
41 | void drawButtonMask ( QPainter * p, int x, int y, int w, int h ); | ||
42 | void drawBevelButton( QPainter *p, int x, int y, int w, int h, | ||
43 | const QColorGroup &g, bool sunken=FALSE, const QBrush* fill=0 ); | ||
44 | QRect comboButtonRect( int x, int y, int w, int h); | ||
45 | QRect comboButtonFocusRect( int x, int y, int w, int h); | ||
46 | void drawComboButton( QPainter *p, int x, int y, int w, int h, | ||
47 | const QColorGroup &g, bool sunken, bool, bool enabled, | ||
48 | const QBrush *fill ); | ||
49 | void drawExclusiveIndicator ( QPainter * p, int x, int y, int w, int h, | ||
50 | const QColorGroup & g, bool on, bool down = FALSE, bool enabled = TRUE ); | ||
51 | void drawIndicator ( QPainter * p, int x, int y, int w, int h, | ||
52 | const QColorGroup & g, int state, bool down = FALSE, bool enabled = TRUE ); | ||
53 | void scrollBarMetrics( const QScrollBar*, int&, int&, int&, int&); | ||
54 | void drawScrollBarControls( QPainter*, const QScrollBar*, int sliderStart, uint controls, uint activeControl ); | ||
55 | ScrollControl scrollBarPointOver( const QScrollBar* sb, int sliderStart, const QPoint& p ); | ||
56 | void drawRiffles( QPainter* p, int x, int y, int w, int h, | ||
57 | const QColorGroup &g, bool horizontal ); | ||
58 | int sliderLength() const; | ||
59 | void drawSlider( QPainter *p, int x, int y, int w, int h, | ||
60 | const QColorGroup &g, Orientation, bool tickAbove, bool tickBelow ); | ||
61 | void drawSliderMask( QPainter *p, int x, int y, int w, int h, | ||
62 | Orientation, bool tickAbove, bool tickBelow ); | ||
63 | void drawSliderGrooveMask( QPainter *p, int x, int y, int w, int h, | ||
64 | const QColorGroup& , QCOORD c, Orientation orient ); | ||
65 | void drawTab( QPainter *, const QTabBar *, QTab *, bool selected ); | ||
66 | int extraPopupMenuItemWidth( bool checkable, int maxpmw, QMenuItem*, const QFontMetrics& ); | ||
67 | int popupMenuItemHeight( bool checkable, QMenuItem*, const QFontMetrics& ); | ||
68 | void drawPopupMenuItem( QPainter* p, bool checkable, int maxpmw, int tab, QMenuItem* mi, | ||
69 | const QPalette& pal, | ||
70 | bool act, bool enabled, int x, int y, int w, int h); | ||
71 | |||
72 | int buttonMargin() const; | ||
73 | QSize scrollBarExtent() const; | ||
74 | |||
75 | private:// Disabled copy constructor and operator= | ||
76 | #if defined(Q_DISABLE_COPY) | ||
77 | FreshStyle( const FreshStyle & ); | ||
78 | FreshStyle& operator=( const FreshStyle & ); | ||
79 | #endif | ||
80 | }; | ||
81 | |||
82 | |||
83 | class FreshStyleImpl : public StyleInterface | ||
84 | { | ||
85 | public: | ||
86 | FreshStyleImpl(); | ||
87 | virtual ~FreshStyleImpl(); | ||
88 | |||
89 | QRESULT queryInterface( const QUuid&, QUnknownInterface** ); | ||
90 | Q_REFCOUNT | ||
91 | |||
92 | virtual QStyle *style(); | ||
93 | virtual QString name() const; | ||
94 | |||
95 | private: | ||
96 | FreshStyle *fresh; | ||
97 | ulong ref; | ||
98 | }; | ||
99 | |||
100 | #endif // FRESHSTYLE_H | ||