1 | /****************************************************************************
|
---|
2 | ** $Id: qcommonstyle.h 2 2005-11-16 15:49:26Z dmik $
|
---|
3 | **
|
---|
4 | ** Definition of QCommonStyle class
|
---|
5 | **
|
---|
6 | ** Created : 980616
|
---|
7 | **
|
---|
8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
|
---|
9 | **
|
---|
10 | ** This file is part of the widgets module of the Qt GUI Toolkit.
|
---|
11 | **
|
---|
12 | ** This file may be distributed under the terms of the Q Public License
|
---|
13 | ** as defined by Trolltech AS of Norway and appearing in the file
|
---|
14 | ** LICENSE.QPL included in the packaging of this file.
|
---|
15 | **
|
---|
16 | ** This file may be distributed and/or modified under the terms of the
|
---|
17 | ** GNU General Public License version 2 as published by the Free Software
|
---|
18 | ** Foundation and appearing in the file LICENSE.GPL included in the
|
---|
19 | ** packaging of this file.
|
---|
20 | **
|
---|
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
|
---|
22 | ** licenses may use this file in accordance with the Qt Commercial License
|
---|
23 | ** Agreement provided with the Software.
|
---|
24 | **
|
---|
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
---|
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
---|
27 | **
|
---|
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
|
---|
29 | ** information about Qt Commercial License Agreements.
|
---|
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information.
|
---|
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information.
|
---|
32 | **
|
---|
33 | ** Contact info@trolltech.com if any conditions of this licensing are
|
---|
34 | ** not clear to you.
|
---|
35 | **
|
---|
36 | **********************************************************************/
|
---|
37 |
|
---|
38 | #ifndef QCOMMONSTYLE_H
|
---|
39 | #define QCOMMONSTYLE_H
|
---|
40 |
|
---|
41 | #ifndef QT_H
|
---|
42 | #include "qstyle.h"
|
---|
43 | #endif // QT_H
|
---|
44 |
|
---|
45 | #ifndef QT_NO_STYLE
|
---|
46 |
|
---|
47 | class Q_EXPORT QCommonStyle: public QStyle
|
---|
48 | {
|
---|
49 | Q_OBJECT
|
---|
50 |
|
---|
51 | public:
|
---|
52 | QCommonStyle();
|
---|
53 | ~QCommonStyle();
|
---|
54 |
|
---|
55 | void drawPrimitive( PrimitiveElement pe,
|
---|
56 | QPainter *p,
|
---|
57 | const QRect &r,
|
---|
58 | const QColorGroup &cg,
|
---|
59 | SFlags flags = Style_Default,
|
---|
60 | const QStyleOption& = QStyleOption::Default ) const;
|
---|
61 |
|
---|
62 | void drawControl( ControlElement element,
|
---|
63 | QPainter *p,
|
---|
64 | const QWidget *widget,
|
---|
65 | const QRect &r,
|
---|
66 | const QColorGroup &cg,
|
---|
67 | SFlags how = Style_Default,
|
---|
68 | const QStyleOption& = QStyleOption::Default ) const;
|
---|
69 |
|
---|
70 | void drawControlMask( ControlElement element,
|
---|
71 | QPainter *p,
|
---|
72 | const QWidget *widget,
|
---|
73 | const QRect &r,
|
---|
74 | const QStyleOption& = QStyleOption::Default ) const;
|
---|
75 |
|
---|
76 | QRect subRect( SubRect r, const QWidget *widget ) const;
|
---|
77 |
|
---|
78 | void drawComplexControl( ComplexControl control,
|
---|
79 | QPainter *p,
|
---|
80 | const QWidget *widget,
|
---|
81 | const QRect &r,
|
---|
82 | const QColorGroup &cg,
|
---|
83 | SFlags how = Style_Default,
|
---|
84 | SCFlags sub = (uint)SC_All,
|
---|
85 | SCFlags subActive = SC_None,
|
---|
86 | const QStyleOption& = QStyleOption::Default ) const;
|
---|
87 |
|
---|
88 | void drawComplexControlMask( ComplexControl control,
|
---|
89 | QPainter *p,
|
---|
90 | const QWidget *widget,
|
---|
91 | const QRect &r,
|
---|
92 | const QStyleOption& = QStyleOption::Default ) const;
|
---|
93 |
|
---|
94 | QRect querySubControlMetrics( ComplexControl control,
|
---|
95 | const QWidget *widget,
|
---|
96 | SubControl sc,
|
---|
97 | const QStyleOption& = QStyleOption::Default ) const;
|
---|
98 |
|
---|
99 | SubControl querySubControl( ComplexControl control,
|
---|
100 | const QWidget *widget,
|
---|
101 | const QPoint &pos,
|
---|
102 | const QStyleOption& = QStyleOption::Default ) const;
|
---|
103 |
|
---|
104 | int pixelMetric( PixelMetric m, const QWidget *widget = 0 ) const;
|
---|
105 |
|
---|
106 | QSize sizeFromContents( ContentsType s,
|
---|
107 | const QWidget *widget,
|
---|
108 | const QSize &contentsSize,
|
---|
109 | const QStyleOption& = QStyleOption::Default ) const;
|
---|
110 |
|
---|
111 | int styleHint(StyleHint sh, const QWidget *, const QStyleOption &, QStyleHintReturn *) const;
|
---|
112 |
|
---|
113 | QPixmap stylePixmap( StylePixmap sp,
|
---|
114 | const QWidget *widget = 0,
|
---|
115 | const QStyleOption& = QStyleOption::Default ) const;
|
---|
116 |
|
---|
117 |
|
---|
118 | private:
|
---|
119 | // Disabled copy constructor and operator=
|
---|
120 | #if defined(Q_DISABLE_COPY)
|
---|
121 | QCommonStyle( const QCommonStyle & );
|
---|
122 | QCommonStyle &operator=( const QCommonStyle & );
|
---|
123 | #endif
|
---|
124 | };
|
---|
125 |
|
---|
126 |
|
---|
127 |
|
---|
128 | #endif // QT_NO_STYLE
|
---|
129 |
|
---|
130 | #endif // QCOMMONSTYLE_H
|
---|