1 | /****************************************************************************
|
---|
2 | **
|
---|
3 | ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
---|
4 | ** Contact: Qt Software Information ([email protected])
|
---|
5 | **
|
---|
6 | ** This file is part of the QtGui module of the Qt Toolkit.
|
---|
7 | **
|
---|
8 | ** $QT_BEGIN_LICENSE:LGPL$
|
---|
9 | ** Commercial Usage
|
---|
10 | ** Licensees holding valid Qt Commercial licenses may use this file in
|
---|
11 | ** accordance with the Qt Commercial License Agreement provided with the
|
---|
12 | ** Software or, alternatively, in accordance with the terms contained in
|
---|
13 | ** a written agreement between you and Nokia.
|
---|
14 | **
|
---|
15 | ** GNU Lesser General Public License Usage
|
---|
16 | ** Alternatively, this file may be used under the terms of the GNU Lesser
|
---|
17 | ** General Public License version 2.1 as published by the Free Software
|
---|
18 | ** Foundation and appearing in the file LICENSE.LGPL included in the
|
---|
19 | ** packaging of this file. Please review the following information to
|
---|
20 | ** ensure the GNU Lesser General Public License version 2.1 requirements
|
---|
21 | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
---|
22 | **
|
---|
23 | ** In addition, as a special exception, Nokia gives you certain
|
---|
24 | ** additional rights. These rights are described in the Nokia Qt LGPL
|
---|
25 | ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
|
---|
26 | ** package.
|
---|
27 | **
|
---|
28 | ** GNU General Public License Usage
|
---|
29 | ** Alternatively, this file may be used under the terms of the GNU
|
---|
30 | ** General Public License version 3.0 as published by the Free Software
|
---|
31 | ** Foundation and appearing in the file LICENSE.GPL included in the
|
---|
32 | ** packaging of this file. Please review the following information to
|
---|
33 | ** ensure the GNU General Public License version 3.0 requirements will be
|
---|
34 | ** met: http://www.gnu.org/copyleft/gpl.html.
|
---|
35 | **
|
---|
36 | ** If you are unsure which license is appropriate for your use, please
|
---|
37 | ** contact the sales department at [email protected].
|
---|
38 | ** $QT_END_LICENSE$
|
---|
39 | **
|
---|
40 | ****************************************************************************/
|
---|
41 |
|
---|
42 | #ifndef QSTYLEOPTION_H
|
---|
43 | #define QSTYLEOPTION_H
|
---|
44 |
|
---|
45 | #include <QtCore/qvariant.h>
|
---|
46 | #include <QtGui/qabstractspinbox.h>
|
---|
47 | #include <QtGui/qicon.h>
|
---|
48 | #include <QtGui/qmatrix.h>
|
---|
49 | #include <QtGui/qslider.h>
|
---|
50 | #include <QtGui/qstyle.h>
|
---|
51 | #include <QtGui/qtabbar.h>
|
---|
52 | #include <QtGui/qtabwidget.h>
|
---|
53 | #include <QtGui/qrubberband.h>
|
---|
54 | #include <QtGui/qframe.h>
|
---|
55 | #ifndef QT_NO_ITEMVIEWS
|
---|
56 | # include <QtCore/qabstractitemmodel.h>
|
---|
57 | #endif
|
---|
58 |
|
---|
59 | QT_BEGIN_HEADER
|
---|
60 |
|
---|
61 | QT_BEGIN_NAMESPACE
|
---|
62 |
|
---|
63 | QT_MODULE(Gui)
|
---|
64 |
|
---|
65 | class QDebug;
|
---|
66 |
|
---|
67 | class Q_GUI_EXPORT QStyleOption
|
---|
68 | {
|
---|
69 | public:
|
---|
70 | enum OptionType {
|
---|
71 | SO_Default, SO_FocusRect, SO_Button, SO_Tab, SO_MenuItem,
|
---|
72 | SO_Frame, SO_ProgressBar, SO_ToolBox, SO_Header, SO_Q3DockWindow,
|
---|
73 | SO_DockWidget, SO_Q3ListViewItem, SO_ViewItem, SO_TabWidgetFrame,
|
---|
74 | SO_TabBarBase, SO_RubberBand, SO_ToolBar, SO_GraphicsItem,
|
---|
75 |
|
---|
76 | SO_Complex = 0xf0000, SO_Slider, SO_SpinBox, SO_ToolButton, SO_ComboBox,
|
---|
77 | SO_Q3ListView, SO_TitleBar, SO_GroupBox, SO_SizeGrip,
|
---|
78 |
|
---|
79 | SO_CustomBase = 0xf00,
|
---|
80 | SO_ComplexCustomBase = 0xf000000
|
---|
81 | };
|
---|
82 |
|
---|
83 | enum StyleOptionType { Type = SO_Default };
|
---|
84 | enum StyleOptionVersion { Version = 1 };
|
---|
85 |
|
---|
86 | int version;
|
---|
87 | int type;
|
---|
88 | QStyle::State state;
|
---|
89 | Qt::LayoutDirection direction;
|
---|
90 | QRect rect;
|
---|
91 | QFontMetrics fontMetrics;
|
---|
92 | QPalette palette;
|
---|
93 |
|
---|
94 | QStyleOption(int version = QStyleOption::Version, int type = SO_Default);
|
---|
95 | QStyleOption(const QStyleOption &other);
|
---|
96 | ~QStyleOption();
|
---|
97 |
|
---|
98 | void init(const QWidget *w);
|
---|
99 | inline void initFrom(const QWidget *w) { init(w); }
|
---|
100 | QStyleOption &operator=(const QStyleOption &other);
|
---|
101 | };
|
---|
102 |
|
---|
103 | class Q_GUI_EXPORT QStyleOptionFocusRect : public QStyleOption
|
---|
104 | {
|
---|
105 | public:
|
---|
106 | enum StyleOptionType { Type = SO_FocusRect };
|
---|
107 | enum StyleOptionVersion { Version = 1 };
|
---|
108 |
|
---|
109 | QColor backgroundColor;
|
---|
110 |
|
---|
111 | QStyleOptionFocusRect();
|
---|
112 | QStyleOptionFocusRect(const QStyleOptionFocusRect &other) : QStyleOption(Version, Type) { *this = other; }
|
---|
113 |
|
---|
114 | protected:
|
---|
115 | QStyleOptionFocusRect(int version);
|
---|
116 | };
|
---|
117 |
|
---|
118 | class Q_GUI_EXPORT QStyleOptionFrame : public QStyleOption
|
---|
119 | {
|
---|
120 | public:
|
---|
121 | enum StyleOptionType { Type = SO_Frame };
|
---|
122 | enum StyleOptionVersion { Version = 1 };
|
---|
123 |
|
---|
124 | int lineWidth;
|
---|
125 | int midLineWidth;
|
---|
126 |
|
---|
127 | QStyleOptionFrame();
|
---|
128 | QStyleOptionFrame(const QStyleOptionFrame &other) : QStyleOption(Version, Type) { *this = other; }
|
---|
129 |
|
---|
130 | protected:
|
---|
131 | QStyleOptionFrame(int version);
|
---|
132 | };
|
---|
133 |
|
---|
134 | class Q_GUI_EXPORT QStyleOptionFrameV2 : public QStyleOptionFrame
|
---|
135 | {
|
---|
136 | public:
|
---|
137 | enum StyleOptionVersion { Version = 2 };
|
---|
138 | enum FrameFeature {
|
---|
139 | None = 0x00,
|
---|
140 | Flat = 0x01
|
---|
141 | };
|
---|
142 | Q_DECLARE_FLAGS(FrameFeatures, FrameFeature)
|
---|
143 | FrameFeatures features;
|
---|
144 |
|
---|
145 | QStyleOptionFrameV2();
|
---|
146 | QStyleOptionFrameV2(const QStyleOptionFrameV2 &other) : QStyleOptionFrame(Version) { *this = other; }
|
---|
147 | QStyleOptionFrameV2(const QStyleOptionFrame &other);
|
---|
148 | QStyleOptionFrameV2 &operator=(const QStyleOptionFrame &other);
|
---|
149 |
|
---|
150 | protected:
|
---|
151 | QStyleOptionFrameV2(int version);
|
---|
152 | };
|
---|
153 |
|
---|
154 | Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionFrameV2::FrameFeatures)
|
---|
155 |
|
---|
156 |
|
---|
157 | class Q_GUI_EXPORT QStyleOptionFrameV3 : public QStyleOptionFrameV2
|
---|
158 | {
|
---|
159 | public:
|
---|
160 | enum StyleOptionVersion { Version = 3 };
|
---|
161 | QFrame::Shape frameShape : 4;
|
---|
162 | uint unused : 28;
|
---|
163 |
|
---|
164 | QStyleOptionFrameV3();
|
---|
165 | QStyleOptionFrameV3(const QStyleOptionFrameV3 &other) : QStyleOptionFrameV2(Version) { *this = other; }
|
---|
166 | QStyleOptionFrameV3(const QStyleOptionFrame &other);
|
---|
167 | QStyleOptionFrameV3 &operator=(const QStyleOptionFrame &other);
|
---|
168 |
|
---|
169 | protected:
|
---|
170 | QStyleOptionFrameV3(int version);
|
---|
171 | };
|
---|
172 |
|
---|
173 |
|
---|
174 | #ifndef QT_NO_TABWIDGET
|
---|
175 | class Q_GUI_EXPORT QStyleOptionTabWidgetFrame : public QStyleOption
|
---|
176 | {
|
---|
177 | public:
|
---|
178 | enum StyleOptionType { Type = SO_TabWidgetFrame };
|
---|
179 | enum StyleOptionVersion { Version = 1 };
|
---|
180 |
|
---|
181 | int lineWidth;
|
---|
182 | int midLineWidth;
|
---|
183 | QTabBar::Shape shape;
|
---|
184 | QSize tabBarSize;
|
---|
185 | QSize rightCornerWidgetSize;
|
---|
186 | QSize leftCornerWidgetSize;
|
---|
187 |
|
---|
188 | QStyleOptionTabWidgetFrame();
|
---|
189 | inline QStyleOptionTabWidgetFrame(const QStyleOptionTabWidgetFrame &other)
|
---|
190 | : QStyleOption(Version, Type) { *this = other; }
|
---|
191 |
|
---|
192 | protected:
|
---|
193 | QStyleOptionTabWidgetFrame(int version);
|
---|
194 | };
|
---|
195 | #endif
|
---|
196 |
|
---|
197 | #ifndef QT_NO_TABBAR
|
---|
198 | class Q_GUI_EXPORT QStyleOptionTabBarBase : public QStyleOption
|
---|
199 | {
|
---|
200 | public:
|
---|
201 | enum StyleOptionType { Type = SO_TabBarBase };
|
---|
202 | enum StyleOptionVersion { Version = 1 };
|
---|
203 |
|
---|
204 | QTabBar::Shape shape;
|
---|
205 | QRect tabBarRect;
|
---|
206 | QRect selectedTabRect;
|
---|
207 |
|
---|
208 | QStyleOptionTabBarBase();
|
---|
209 | QStyleOptionTabBarBase(const QStyleOptionTabBarBase &other) : QStyleOption(Version, Type) { *this = other; }
|
---|
210 |
|
---|
211 | protected:
|
---|
212 | QStyleOptionTabBarBase(int version);
|
---|
213 | };
|
---|
214 |
|
---|
215 | class Q_GUI_EXPORT QStyleOptionTabBarBaseV2 : public QStyleOptionTabBarBase
|
---|
216 | {
|
---|
217 | public:
|
---|
218 | enum StyleOptionVersion { Version = 2 };
|
---|
219 | bool documentMode;
|
---|
220 | QStyleOptionTabBarBaseV2();
|
---|
221 | QStyleOptionTabBarBaseV2(const QStyleOptionTabBarBaseV2 &other) : QStyleOptionTabBarBase(Version) { *this = other; }
|
---|
222 | QStyleOptionTabBarBaseV2(const QStyleOptionTabBarBase &other);
|
---|
223 | QStyleOptionTabBarBaseV2 &operator=(const QStyleOptionTabBarBase &other);
|
---|
224 |
|
---|
225 | protected:
|
---|
226 | QStyleOptionTabBarBaseV2(int version);
|
---|
227 | };
|
---|
228 |
|
---|
229 | #endif
|
---|
230 |
|
---|
231 | class Q_GUI_EXPORT QStyleOptionHeader : public QStyleOption
|
---|
232 | {
|
---|
233 | public:
|
---|
234 | enum StyleOptionType { Type = SO_Header };
|
---|
235 | enum StyleOptionVersion { Version = 1 };
|
---|
236 |
|
---|
237 | enum SectionPosition { Beginning, Middle, End, OnlyOneSection };
|
---|
238 | enum SelectedPosition { NotAdjacent, NextIsSelected, PreviousIsSelected,
|
---|
239 | NextAndPreviousAreSelected };
|
---|
240 | enum SortIndicator { None, SortUp, SortDown };
|
---|
241 |
|
---|
242 | int section;
|
---|
243 | QString text;
|
---|
244 | Qt::Alignment textAlignment;
|
---|
245 | QIcon icon;
|
---|
246 | Qt::Alignment iconAlignment;
|
---|
247 | SectionPosition position;
|
---|
248 | SelectedPosition selectedPosition;
|
---|
249 | SortIndicator sortIndicator;
|
---|
250 | Qt::Orientation orientation;
|
---|
251 |
|
---|
252 | QStyleOptionHeader();
|
---|
253 | QStyleOptionHeader(const QStyleOptionHeader &other) : QStyleOption(Version, Type) { *this = other; }
|
---|
254 |
|
---|
255 | protected:
|
---|
256 | QStyleOptionHeader(int version);
|
---|
257 | };
|
---|
258 |
|
---|
259 | class Q_GUI_EXPORT QStyleOptionButton : public QStyleOption
|
---|
260 | {
|
---|
261 | public:
|
---|
262 | enum StyleOptionType { Type = SO_Button };
|
---|
263 | enum StyleOptionVersion { Version = 1 };
|
---|
264 |
|
---|
265 | enum ButtonFeature { None = 0x00, Flat = 0x01, HasMenu = 0x02, DefaultButton = 0x04,
|
---|
266 | AutoDefaultButton = 0x08, CommandLinkButton = 0x10 };
|
---|
267 | Q_DECLARE_FLAGS(ButtonFeatures, ButtonFeature)
|
---|
268 |
|
---|
269 | ButtonFeatures features;
|
---|
270 | QString text;
|
---|
271 | QIcon icon;
|
---|
272 | QSize iconSize;
|
---|
273 |
|
---|
274 | QStyleOptionButton();
|
---|
275 | QStyleOptionButton(const QStyleOptionButton &other) : QStyleOption(Version, Type) { *this = other; }
|
---|
276 |
|
---|
277 | protected:
|
---|
278 | QStyleOptionButton(int version);
|
---|
279 | };
|
---|
280 |
|
---|
281 | Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionButton::ButtonFeatures)
|
---|
282 |
|
---|
283 | #ifndef QT_NO_TABBAR
|
---|
284 | class Q_GUI_EXPORT QStyleOptionTab : public QStyleOption
|
---|
285 | {
|
---|
286 | public:
|
---|
287 | enum StyleOptionType { Type = SO_Tab };
|
---|
288 | enum StyleOptionVersion { Version = 1 };
|
---|
289 |
|
---|
290 | enum TabPosition { Beginning, Middle, End, OnlyOneTab };
|
---|
291 | enum SelectedPosition { NotAdjacent, NextIsSelected, PreviousIsSelected };
|
---|
292 | enum CornerWidget { NoCornerWidgets = 0x00, LeftCornerWidget = 0x01,
|
---|
293 | RightCornerWidget = 0x02 };
|
---|
294 | Q_DECLARE_FLAGS(CornerWidgets, CornerWidget)
|
---|
295 |
|
---|
296 | QTabBar::Shape shape;
|
---|
297 | QString text;
|
---|
298 | QIcon icon;
|
---|
299 | int row;
|
---|
300 | TabPosition position;
|
---|
301 | SelectedPosition selectedPosition;
|
---|
302 | CornerWidgets cornerWidgets;
|
---|
303 |
|
---|
304 | QStyleOptionTab();
|
---|
305 | QStyleOptionTab(const QStyleOptionTab &other) : QStyleOption(Version, Type) { *this = other; }
|
---|
306 |
|
---|
307 | protected:
|
---|
308 | QStyleOptionTab(int version);
|
---|
309 | };
|
---|
310 |
|
---|
311 | Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionTab::CornerWidgets)
|
---|
312 |
|
---|
313 | class Q_GUI_EXPORT QStyleOptionTabV2 : public QStyleOptionTab
|
---|
314 | {
|
---|
315 | public:
|
---|
316 | enum StyleOptionVersion { Version = 2 };
|
---|
317 | QSize iconSize;
|
---|
318 | QStyleOptionTabV2();
|
---|
319 | QStyleOptionTabV2(const QStyleOptionTabV2 &other) : QStyleOptionTab(Version) { *this = other; }
|
---|
320 | QStyleOptionTabV2(const QStyleOptionTab &other);
|
---|
321 | QStyleOptionTabV2 &operator=(const QStyleOptionTab &other);
|
---|
322 |
|
---|
323 | protected:
|
---|
324 | QStyleOptionTabV2(int version);
|
---|
325 | };
|
---|
326 |
|
---|
327 | class Q_GUI_EXPORT QStyleOptionTabV3 : public QStyleOptionTabV2
|
---|
328 | {
|
---|
329 | public:
|
---|
330 | enum StyleOptionVersion { Version = 3 };
|
---|
331 | bool documentMode;
|
---|
332 | QSize leftButtonSize;
|
---|
333 | QSize rightButtonSize;
|
---|
334 | QStyleOptionTabV3();
|
---|
335 | QStyleOptionTabV3(const QStyleOptionTabV3 &other) : QStyleOptionTabV2(Version) { *this = other; }
|
---|
336 | QStyleOptionTabV3(const QStyleOptionTabV2 &other) : QStyleOptionTabV2(Version) { *this = other; }
|
---|
337 | QStyleOptionTabV3(const QStyleOptionTab &other);
|
---|
338 | QStyleOptionTabV3 &operator=(const QStyleOptionTab &other);
|
---|
339 |
|
---|
340 | protected:
|
---|
341 | QStyleOptionTabV3(int version);
|
---|
342 | };
|
---|
343 |
|
---|
344 | #endif
|
---|
345 |
|
---|
346 |
|
---|
347 | #ifndef QT_NO_TOOLBAR
|
---|
348 |
|
---|
349 | class Q_GUI_EXPORT QStyleOptionToolBar : public QStyleOption
|
---|
350 | {
|
---|
351 | public:
|
---|
352 | enum StyleOptionType { Type = SO_ToolBar };
|
---|
353 | enum StyleOptionVersion { Version = 1 };
|
---|
354 | enum ToolBarPosition { Beginning, Middle, End, OnlyOne };
|
---|
355 | enum ToolBarFeature { None = 0x0, Movable = 0x1 };
|
---|
356 | Q_DECLARE_FLAGS(ToolBarFeatures, ToolBarFeature)
|
---|
357 | ToolBarPosition positionOfLine; // The toolbar line position
|
---|
358 | ToolBarPosition positionWithinLine; // The position within a toolbar
|
---|
359 | Qt::ToolBarArea toolBarArea; // The toolbar docking area
|
---|
360 | ToolBarFeatures features;
|
---|
361 | int lineWidth;
|
---|
362 | int midLineWidth;
|
---|
363 | QStyleOptionToolBar();
|
---|
364 | QStyleOptionToolBar(const QStyleOptionToolBar &other) : QStyleOption(Version, Type) { *this = other; }
|
---|
365 |
|
---|
366 | protected:
|
---|
367 | QStyleOptionToolBar(int version);
|
---|
368 | };
|
---|
369 |
|
---|
370 | Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionToolBar::ToolBarFeatures)
|
---|
371 |
|
---|
372 | #endif
|
---|
373 |
|
---|
374 |
|
---|
375 |
|
---|
376 | class Q_GUI_EXPORT QStyleOptionProgressBar : public QStyleOption
|
---|
377 | {
|
---|
378 | public:
|
---|
379 | enum StyleOptionType { Type = SO_ProgressBar };
|
---|
380 | enum StyleOptionVersion { Version = 1 };
|
---|
381 |
|
---|
382 | int minimum;
|
---|
383 | int maximum;
|
---|
384 | int progress;
|
---|
385 | QString text;
|
---|
386 | Qt::Alignment textAlignment;
|
---|
387 | bool textVisible;
|
---|
388 |
|
---|
389 | QStyleOptionProgressBar();
|
---|
390 | QStyleOptionProgressBar(const QStyleOptionProgressBar &other) : QStyleOption(Version, Type) { *this = other; }
|
---|
391 |
|
---|
392 | protected:
|
---|
393 | QStyleOptionProgressBar(int version);
|
---|
394 | };
|
---|
395 |
|
---|
396 | // Adds style info for vertical progress bars
|
---|
397 | class Q_GUI_EXPORT QStyleOptionProgressBarV2 : public QStyleOptionProgressBar
|
---|
398 | {
|
---|
399 | public:
|
---|
400 | enum StyleOptionType { Type = SO_ProgressBar };
|
---|
401 | enum StyleOptionVersion { Version = 2 };
|
---|
402 | Qt::Orientation orientation;
|
---|
403 | bool invertedAppearance;
|
---|
404 | bool bottomToTop;
|
---|
405 |
|
---|
406 | QStyleOptionProgressBarV2();
|
---|
407 | QStyleOptionProgressBarV2(const QStyleOptionProgressBar &other);
|
---|
408 | QStyleOptionProgressBarV2(const QStyleOptionProgressBarV2 &other);
|
---|
409 | QStyleOptionProgressBarV2 &operator=(const QStyleOptionProgressBar &other);
|
---|
410 |
|
---|
411 | protected:
|
---|
412 | QStyleOptionProgressBarV2(int version);
|
---|
413 | };
|
---|
414 |
|
---|
415 | class Q_GUI_EXPORT QStyleOptionMenuItem : public QStyleOption
|
---|
416 | {
|
---|
417 | public:
|
---|
418 | enum StyleOptionType { Type = SO_MenuItem };
|
---|
419 | enum StyleOptionVersion { Version = 1 };
|
---|
420 |
|
---|
421 | enum MenuItemType { Normal, DefaultItem, Separator, SubMenu, Scroller, TearOff, Margin,
|
---|
422 | EmptyArea };
|
---|
423 | enum CheckType { NotCheckable, Exclusive, NonExclusive };
|
---|
424 |
|
---|
425 | MenuItemType menuItemType;
|
---|
426 | CheckType checkType;
|
---|
427 | bool checked;
|
---|
428 | bool menuHasCheckableItems;
|
---|
429 | QRect menuRect;
|
---|
430 | QString text;
|
---|
431 | QIcon icon;
|
---|
432 | int maxIconWidth;
|
---|
433 | int tabWidth;
|
---|
434 | QFont font;
|
---|
435 |
|
---|
436 | QStyleOptionMenuItem();
|
---|
437 | QStyleOptionMenuItem(const QStyleOptionMenuItem &other) : QStyleOption(Version, Type) { *this = other; }
|
---|
438 |
|
---|
439 | protected:
|
---|
440 | QStyleOptionMenuItem(int version);
|
---|
441 | };
|
---|
442 |
|
---|
443 | class Q_GUI_EXPORT QStyleOptionQ3ListViewItem : public QStyleOption
|
---|
444 | {
|
---|
445 | public:
|
---|
446 | enum StyleOptionType { Type = SO_Q3ListViewItem };
|
---|
447 | enum StyleOptionVersion { Version = 1 };
|
---|
448 |
|
---|
449 | enum Q3ListViewItemFeature { None = 0x00, Expandable = 0x01, MultiLine = 0x02, Visible = 0x04,
|
---|
450 | ParentControl = 0x08 };
|
---|
451 | Q_DECLARE_FLAGS(Q3ListViewItemFeatures, Q3ListViewItemFeature)
|
---|
452 |
|
---|
453 | Q3ListViewItemFeatures features;
|
---|
454 | int height;
|
---|
455 | int totalHeight;
|
---|
456 | int itemY;
|
---|
457 | int childCount;
|
---|
458 |
|
---|
459 | QStyleOptionQ3ListViewItem();
|
---|
460 | QStyleOptionQ3ListViewItem(const QStyleOptionQ3ListViewItem &other) : QStyleOption(Version, Type) { *this = other; }
|
---|
461 |
|
---|
462 | protected:
|
---|
463 | QStyleOptionQ3ListViewItem(int version);
|
---|
464 | };
|
---|
465 |
|
---|
466 | Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionQ3ListViewItem::Q3ListViewItemFeatures)
|
---|
467 |
|
---|
468 | class Q_GUI_EXPORT QStyleOptionQ3DockWindow : public QStyleOption
|
---|
469 | {
|
---|
470 | public:
|
---|
471 | enum StyleOptionType { Type = SO_Q3DockWindow };
|
---|
472 | enum StyleOptionVersion { Version = 1 };
|
---|
473 |
|
---|
474 | bool docked;
|
---|
475 | bool closeEnabled;
|
---|
476 |
|
---|
477 | QStyleOptionQ3DockWindow();
|
---|
478 | QStyleOptionQ3DockWindow(const QStyleOptionQ3DockWindow &other) : QStyleOption(Version, Type) { *this = other; }
|
---|
479 |
|
---|
480 | protected:
|
---|
481 | QStyleOptionQ3DockWindow(int version);
|
---|
482 | };
|
---|
483 |
|
---|
484 | class Q_GUI_EXPORT QStyleOptionDockWidget : public QStyleOption
|
---|
485 | {
|
---|
486 | public:
|
---|
487 | enum StyleOptionType { Type = SO_DockWidget };
|
---|
488 | enum StyleOptionVersion { Version = 1 };
|
---|
489 |
|
---|
490 | QString title;
|
---|
491 | bool closable;
|
---|
492 | bool movable;
|
---|
493 | bool floatable;
|
---|
494 |
|
---|
495 | QStyleOptionDockWidget();
|
---|
496 | QStyleOptionDockWidget(const QStyleOptionDockWidget &other) : QStyleOption(Version, Type) { *this = other; }
|
---|
497 |
|
---|
498 | protected:
|
---|
499 | QStyleOptionDockWidget(int version);
|
---|
500 | };
|
---|
501 |
|
---|
502 | class Q_GUI_EXPORT QStyleOptionDockWidgetV2 : public QStyleOptionDockWidget
|
---|
503 | {
|
---|
504 | public:
|
---|
505 | enum StyleOptionVersion { Version = 2 };
|
---|
506 |
|
---|
507 | bool verticalTitleBar;
|
---|
508 |
|
---|
509 | QStyleOptionDockWidgetV2();
|
---|
510 | QStyleOptionDockWidgetV2(const QStyleOptionDockWidgetV2 &other)
|
---|
511 | : QStyleOptionDockWidget(Version) { *this = other; }
|
---|
512 | QStyleOptionDockWidgetV2(const QStyleOptionDockWidget &other);
|
---|
513 | QStyleOptionDockWidgetV2 &operator = (const QStyleOptionDockWidget &other);
|
---|
514 |
|
---|
515 | protected:
|
---|
516 | QStyleOptionDockWidgetV2(int version);
|
---|
517 | };
|
---|
518 |
|
---|
519 | class Q_GUI_EXPORT QStyleOptionViewItem : public QStyleOption
|
---|
520 | {
|
---|
521 | public:
|
---|
522 | enum StyleOptionType { Type = SO_ViewItem };
|
---|
523 | enum StyleOptionVersion { Version = 1 };
|
---|
524 |
|
---|
525 | enum Position { Left, Right, Top, Bottom };
|
---|
526 |
|
---|
527 | Qt::Alignment displayAlignment;
|
---|
528 | Qt::Alignment decorationAlignment;
|
---|
529 | Qt::TextElideMode textElideMode;
|
---|
530 | Position decorationPosition;
|
---|
531 | QSize decorationSize;
|
---|
532 | QFont font;
|
---|
533 | bool showDecorationSelected;
|
---|
534 |
|
---|
535 | QStyleOptionViewItem();
|
---|
536 | QStyleOptionViewItem(const QStyleOptionViewItem &other) : QStyleOption(Version, Type) { *this = other; }
|
---|
537 |
|
---|
538 | protected:
|
---|
539 | QStyleOptionViewItem(int version);
|
---|
540 | };
|
---|
541 |
|
---|
542 | class Q_GUI_EXPORT QStyleOptionViewItemV2 : public QStyleOptionViewItem
|
---|
543 | {
|
---|
544 | public:
|
---|
545 | enum StyleOptionVersion { Version = 2 };
|
---|
546 |
|
---|
547 | enum ViewItemFeature {
|
---|
548 | None = 0x00,
|
---|
549 | WrapText = 0x01,
|
---|
550 | Alternate = 0x02,
|
---|
551 | HasCheckIndicator = 0x04,
|
---|
552 | HasDisplay = 0x08,
|
---|
553 | HasDecoration = 0x10
|
---|
554 | };
|
---|
555 | Q_DECLARE_FLAGS(ViewItemFeatures, ViewItemFeature)
|
---|
556 |
|
---|
557 | ViewItemFeatures features;
|
---|
558 |
|
---|
559 | QStyleOptionViewItemV2();
|
---|
560 | QStyleOptionViewItemV2(const QStyleOptionViewItemV2 &other) : QStyleOptionViewItem(Version) { *this = other; }
|
---|
561 | QStyleOptionViewItemV2(const QStyleOptionViewItem &other);
|
---|
562 | QStyleOptionViewItemV2 &operator=(const QStyleOptionViewItem &other);
|
---|
563 |
|
---|
564 | protected:
|
---|
565 | QStyleOptionViewItemV2(int version);
|
---|
566 | };
|
---|
567 |
|
---|
568 | Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionViewItemV2::ViewItemFeatures)
|
---|
569 |
|
---|
570 | class Q_GUI_EXPORT QStyleOptionViewItemV3 : public QStyleOptionViewItemV2
|
---|
571 | {
|
---|
572 | public:
|
---|
573 | enum StyleOptionVersion { Version = 3 };
|
---|
574 |
|
---|
575 | QLocale locale;
|
---|
576 | const QWidget *widget;
|
---|
577 |
|
---|
578 | QStyleOptionViewItemV3();
|
---|
579 | QStyleOptionViewItemV3(const QStyleOptionViewItemV3 &other)
|
---|
580 | : QStyleOptionViewItemV2(Version) { *this = other; }
|
---|
581 | QStyleOptionViewItemV3(const QStyleOptionViewItem &other);
|
---|
582 | QStyleOptionViewItemV3 &operator = (const QStyleOptionViewItem &other);
|
---|
583 |
|
---|
584 | protected:
|
---|
585 | QStyleOptionViewItemV3(int version);
|
---|
586 | };
|
---|
587 |
|
---|
588 | #ifndef QT_NO_ITEMVIEWS
|
---|
589 | class Q_GUI_EXPORT QStyleOptionViewItemV4 : public QStyleOptionViewItemV3
|
---|
590 | {
|
---|
591 | public:
|
---|
592 | enum StyleOptionVersion { Version = 4 };
|
---|
593 | enum ViewItemPosition { Invalid, Beginning, Middle, End, OnlyOne };
|
---|
594 |
|
---|
595 | QModelIndex index;
|
---|
596 | Qt::CheckState checkState;
|
---|
597 | QIcon icon;
|
---|
598 | QString text;
|
---|
599 | ViewItemPosition viewItemPosition;
|
---|
600 | QBrush backgroundBrush;
|
---|
601 |
|
---|
602 | QStyleOptionViewItemV4();
|
---|
603 | QStyleOptionViewItemV4(const QStyleOptionViewItemV4 &other)
|
---|
604 | : QStyleOptionViewItemV3(Version) { *this = other; }
|
---|
605 | QStyleOptionViewItemV4(const QStyleOptionViewItem &other);
|
---|
606 | QStyleOptionViewItemV4 &operator = (const QStyleOptionViewItem &other);
|
---|
607 |
|
---|
608 | protected:
|
---|
609 | QStyleOptionViewItemV4(int version);
|
---|
610 | };
|
---|
611 | #endif
|
---|
612 |
|
---|
613 | class Q_GUI_EXPORT QStyleOptionToolBox : public QStyleOption
|
---|
614 | {
|
---|
615 | public:
|
---|
616 | enum StyleOptionType { Type = SO_ToolBox };
|
---|
617 | enum StyleOptionVersion { Version = 1 };
|
---|
618 |
|
---|
619 | QString text;
|
---|
620 | QIcon icon;
|
---|
621 |
|
---|
622 | QStyleOptionToolBox();
|
---|
623 | QStyleOptionToolBox(const QStyleOptionToolBox &other) : QStyleOption(Version, Type) { *this = other; }
|
---|
624 |
|
---|
625 | protected:
|
---|
626 | QStyleOptionToolBox(int version);
|
---|
627 | };
|
---|
628 |
|
---|
629 | class Q_GUI_EXPORT QStyleOptionToolBoxV2 : public QStyleOptionToolBox
|
---|
630 | {
|
---|
631 | public:
|
---|
632 | enum StyleOptionVersion { Version = 2 };
|
---|
633 | enum TabPosition { Beginning, Middle, End, OnlyOneTab };
|
---|
634 | enum SelectedPosition { NotAdjacent, NextIsSelected, PreviousIsSelected };
|
---|
635 |
|
---|
636 | TabPosition position;
|
---|
637 | SelectedPosition selectedPosition;
|
---|
638 |
|
---|
639 | QStyleOptionToolBoxV2();
|
---|
640 | QStyleOptionToolBoxV2(const QStyleOptionToolBoxV2 &other) : QStyleOptionToolBox(Version) { *this = other; }
|
---|
641 | QStyleOptionToolBoxV2(const QStyleOptionToolBox &other);
|
---|
642 | QStyleOptionToolBoxV2 &operator=(const QStyleOptionToolBox &other);
|
---|
643 |
|
---|
644 | protected:
|
---|
645 | QStyleOptionToolBoxV2(int version);
|
---|
646 | };
|
---|
647 |
|
---|
648 | #ifndef QT_NO_RUBBERBAND
|
---|
649 | class Q_GUI_EXPORT QStyleOptionRubberBand : public QStyleOption
|
---|
650 | {
|
---|
651 | public:
|
---|
652 | enum StyleOptionType { Type = SO_RubberBand };
|
---|
653 | enum StyleOptionVersion { Version = 1 };
|
---|
654 |
|
---|
655 | QRubberBand::Shape shape;
|
---|
656 | bool opaque;
|
---|
657 |
|
---|
658 | QStyleOptionRubberBand();
|
---|
659 | QStyleOptionRubberBand(const QStyleOptionRubberBand &other) : QStyleOption(Version, Type) { *this = other; }
|
---|
660 |
|
---|
661 | protected:
|
---|
662 | QStyleOptionRubberBand(int version);
|
---|
663 | };
|
---|
664 | #endif // QT_NO_RUBBERBAND
|
---|
665 |
|
---|
666 | // -------------------------- Complex style options -------------------------------
|
---|
667 | class Q_GUI_EXPORT QStyleOptionComplex : public QStyleOption
|
---|
668 | {
|
---|
669 | public:
|
---|
670 | enum StyleOptionType { Type = SO_Complex };
|
---|
671 | enum StyleOptionVersion { Version = 1 };
|
---|
672 |
|
---|
673 | QStyle::SubControls subControls;
|
---|
674 | QStyle::SubControls activeSubControls;
|
---|
675 |
|
---|
676 | QStyleOptionComplex(int version = QStyleOptionComplex::Version, int type = SO_Complex);
|
---|
677 | QStyleOptionComplex(const QStyleOptionComplex &other) : QStyleOption(Version, Type) { *this = other; }
|
---|
678 | };
|
---|
679 |
|
---|
680 | #ifndef QT_NO_SLIDER
|
---|
681 | class Q_GUI_EXPORT QStyleOptionSlider : public QStyleOptionComplex
|
---|
682 | {
|
---|
683 | public:
|
---|
684 | enum StyleOptionType { Type = SO_Slider };
|
---|
685 | enum StyleOptionVersion { Version = 1 };
|
---|
686 |
|
---|
687 | Qt::Orientation orientation;
|
---|
688 | int minimum;
|
---|
689 | int maximum;
|
---|
690 | QSlider::TickPosition tickPosition;
|
---|
691 | int tickInterval;
|
---|
692 | bool upsideDown;
|
---|
693 | int sliderPosition;
|
---|
694 | int sliderValue;
|
---|
695 | int singleStep;
|
---|
696 | int pageStep;
|
---|
697 | qreal notchTarget;
|
---|
698 | bool dialWrapping;
|
---|
699 |
|
---|
700 | QStyleOptionSlider();
|
---|
701 | QStyleOptionSlider(const QStyleOptionSlider &other) : QStyleOptionComplex(Version, Type) { *this = other; }
|
---|
702 |
|
---|
703 | protected:
|
---|
704 | QStyleOptionSlider(int version);
|
---|
705 | };
|
---|
706 | #endif // QT_NO_SLIDER
|
---|
707 |
|
---|
708 | #ifndef QT_NO_SPINBOX
|
---|
709 | class Q_GUI_EXPORT QStyleOptionSpinBox : public QStyleOptionComplex
|
---|
710 | {
|
---|
711 | public:
|
---|
712 | enum StyleOptionType { Type = SO_SpinBox };
|
---|
713 | enum StyleOptionVersion { Version = 1 };
|
---|
714 |
|
---|
715 | QAbstractSpinBox::ButtonSymbols buttonSymbols;
|
---|
716 | QAbstractSpinBox::StepEnabled stepEnabled;
|
---|
717 | bool frame;
|
---|
718 |
|
---|
719 | QStyleOptionSpinBox();
|
---|
720 | QStyleOptionSpinBox(const QStyleOptionSpinBox &other) : QStyleOptionComplex(Version, Type) { *this = other; }
|
---|
721 |
|
---|
722 | protected:
|
---|
723 | QStyleOptionSpinBox(int version);
|
---|
724 | };
|
---|
725 | #endif // QT_NO_SPINBOX
|
---|
726 |
|
---|
727 | class Q_GUI_EXPORT QStyleOptionQ3ListView : public QStyleOptionComplex
|
---|
728 | {
|
---|
729 | public:
|
---|
730 | enum StyleOptionType { Type = SO_Q3ListView };
|
---|
731 | enum StyleOptionVersion { Version = 1 };
|
---|
732 |
|
---|
733 | QList<QStyleOptionQ3ListViewItem> items;
|
---|
734 | QPalette viewportPalette;
|
---|
735 | QPalette::ColorRole viewportBGRole;
|
---|
736 | int sortColumn;
|
---|
737 | int itemMargin;
|
---|
738 | int treeStepSize;
|
---|
739 | bool rootIsDecorated;
|
---|
740 |
|
---|
741 | QStyleOptionQ3ListView();
|
---|
742 | QStyleOptionQ3ListView(const QStyleOptionQ3ListView &other) : QStyleOptionComplex(Version, Type) { *this = other; }
|
---|
743 |
|
---|
744 | protected:
|
---|
745 | QStyleOptionQ3ListView(int version);
|
---|
746 | };
|
---|
747 |
|
---|
748 | class Q_GUI_EXPORT QStyleOptionToolButton : public QStyleOptionComplex
|
---|
749 | {
|
---|
750 | public:
|
---|
751 | enum StyleOptionType { Type = SO_ToolButton };
|
---|
752 | enum StyleOptionVersion { Version = 1 };
|
---|
753 |
|
---|
754 | enum ToolButtonFeature { None = 0x00, Arrow = 0x01, Menu = 0x04, MenuButtonPopup = Menu, PopupDelay = 0x08,
|
---|
755 | HasMenu = 0x10 };
|
---|
756 | Q_DECLARE_FLAGS(ToolButtonFeatures, ToolButtonFeature)
|
---|
757 |
|
---|
758 | ToolButtonFeatures features;
|
---|
759 | QIcon icon;
|
---|
760 | QSize iconSize;
|
---|
761 | QString text;
|
---|
762 | Qt::ArrowType arrowType;
|
---|
763 | Qt::ToolButtonStyle toolButtonStyle;
|
---|
764 | QPoint pos;
|
---|
765 | QFont font;
|
---|
766 |
|
---|
767 | QStyleOptionToolButton();
|
---|
768 | QStyleOptionToolButton(const QStyleOptionToolButton &other) : QStyleOptionComplex(Version, Type) { *this = other; }
|
---|
769 |
|
---|
770 | protected:
|
---|
771 | QStyleOptionToolButton(int version);
|
---|
772 | };
|
---|
773 |
|
---|
774 | Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionToolButton::ToolButtonFeatures)
|
---|
775 |
|
---|
776 | class Q_GUI_EXPORT QStyleOptionComboBox : public QStyleOptionComplex
|
---|
777 | {
|
---|
778 | public:
|
---|
779 | enum StyleOptionType { Type = SO_ComboBox };
|
---|
780 | enum StyleOptionVersion { Version = 1 };
|
---|
781 |
|
---|
782 | bool editable;
|
---|
783 | QRect popupRect;
|
---|
784 | bool frame;
|
---|
785 | QString currentText;
|
---|
786 | QIcon currentIcon;
|
---|
787 | QSize iconSize;
|
---|
788 |
|
---|
789 | QStyleOptionComboBox();
|
---|
790 | QStyleOptionComboBox(const QStyleOptionComboBox &other) : QStyleOptionComplex(Version, Type) { *this = other; }
|
---|
791 |
|
---|
792 | protected:
|
---|
793 | QStyleOptionComboBox(int version);
|
---|
794 | };
|
---|
795 |
|
---|
796 | class Q_GUI_EXPORT QStyleOptionTitleBar : public QStyleOptionComplex
|
---|
797 | {
|
---|
798 | public:
|
---|
799 | enum StyleOptionType { Type = SO_TitleBar };
|
---|
800 | enum StyleOptionVersion { Version = 1 };
|
---|
801 |
|
---|
802 | QString text;
|
---|
803 | QIcon icon;
|
---|
804 | int titleBarState;
|
---|
805 | Qt::WindowFlags titleBarFlags;
|
---|
806 |
|
---|
807 | QStyleOptionTitleBar();
|
---|
808 | QStyleOptionTitleBar(const QStyleOptionTitleBar &other) : QStyleOptionComplex(Version, Type) { *this = other; }
|
---|
809 |
|
---|
810 | protected:
|
---|
811 | QStyleOptionTitleBar(int version);
|
---|
812 | };
|
---|
813 |
|
---|
814 | class Q_GUI_EXPORT QStyleOptionGroupBox : public QStyleOptionComplex
|
---|
815 | {
|
---|
816 | public:
|
---|
817 | enum StyleOptionType { Type = SO_GroupBox };
|
---|
818 | enum StyleOptionVersion { Version = 1 };
|
---|
819 |
|
---|
820 | QStyleOptionFrameV2::FrameFeatures features;
|
---|
821 | QString text;
|
---|
822 | Qt::Alignment textAlignment;
|
---|
823 | QColor textColor;
|
---|
824 | int lineWidth;
|
---|
825 | int midLineWidth;
|
---|
826 |
|
---|
827 | QStyleOptionGroupBox();
|
---|
828 | QStyleOptionGroupBox(const QStyleOptionGroupBox &other) : QStyleOptionComplex(Version, Type) { *this = other; }
|
---|
829 | protected:
|
---|
830 | QStyleOptionGroupBox(int version);
|
---|
831 | };
|
---|
832 |
|
---|
833 | class Q_GUI_EXPORT QStyleOptionSizeGrip : public QStyleOptionComplex
|
---|
834 | {
|
---|
835 | public:
|
---|
836 | enum StyleOptionType { Type = SO_SizeGrip };
|
---|
837 | enum StyleOptionVersion { Version = 1 };
|
---|
838 |
|
---|
839 | Qt::Corner corner;
|
---|
840 |
|
---|
841 | QStyleOptionSizeGrip();
|
---|
842 | QStyleOptionSizeGrip(const QStyleOptionSizeGrip &other) : QStyleOptionComplex(Version, Type) { *this = other; }
|
---|
843 | protected:
|
---|
844 | QStyleOptionSizeGrip(int version);
|
---|
845 | };
|
---|
846 |
|
---|
847 | class Q_GUI_EXPORT QStyleOptionGraphicsItem : public QStyleOption
|
---|
848 | {
|
---|
849 | public:
|
---|
850 | enum StyleOptionType { Type = SO_GraphicsItem };
|
---|
851 | enum StyleOptionVersion { Version = 1 };
|
---|
852 |
|
---|
853 | QRectF exposedRect;
|
---|
854 | QMatrix matrix;
|
---|
855 | qreal levelOfDetail;
|
---|
856 |
|
---|
857 | QStyleOptionGraphicsItem();
|
---|
858 | QStyleOptionGraphicsItem(const QStyleOptionGraphicsItem &other) : QStyleOption(Version, Type) { *this = other; }
|
---|
859 | protected:
|
---|
860 | QStyleOptionGraphicsItem(int version);
|
---|
861 | };
|
---|
862 |
|
---|
863 | template <typename T>
|
---|
864 | T qstyleoption_cast(const QStyleOption *opt)
|
---|
865 | {
|
---|
866 | if (opt && opt->version >= static_cast<T>(0)->Version && (opt->type == static_cast<T>(0)->Type
|
---|
867 | || int(static_cast<T>(0)->Type) == QStyleOption::SO_Default
|
---|
868 | || (int(static_cast<T>(0)->Type) == QStyleOption::SO_Complex
|
---|
869 | && opt->type > QStyleOption::SO_Complex)))
|
---|
870 | return static_cast<T>(opt);
|
---|
871 | return 0;
|
---|
872 | }
|
---|
873 |
|
---|
874 | template <typename T>
|
---|
875 | T qstyleoption_cast(QStyleOption *opt)
|
---|
876 | {
|
---|
877 | if (opt && opt->version >= static_cast<T>(0)->Version && (opt->type == static_cast<T>(0)->Type
|
---|
878 | || int(static_cast<T>(0)->Type) == QStyleOption::SO_Default
|
---|
879 | || (int(static_cast<T>(0)->Type) == QStyleOption::SO_Complex
|
---|
880 | && opt->type > QStyleOption::SO_Complex)))
|
---|
881 | return static_cast<T>(opt);
|
---|
882 | return 0;
|
---|
883 | }
|
---|
884 |
|
---|
885 | // -------------------------- QStyleHintReturn -------------------------------
|
---|
886 | class Q_GUI_EXPORT QStyleHintReturn {
|
---|
887 | public:
|
---|
888 | enum HintReturnType {
|
---|
889 | SH_Default=0xf000, SH_Mask, SH_Variant
|
---|
890 | };
|
---|
891 |
|
---|
892 | enum StyleOptionType { Type = SH_Default };
|
---|
893 | enum StyleOptionVersion { Version = 1 };
|
---|
894 |
|
---|
895 | QStyleHintReturn(int version = QStyleOption::Version, int type = SH_Default);
|
---|
896 | ~QStyleHintReturn();
|
---|
897 |
|
---|
898 | int version;
|
---|
899 | int type;
|
---|
900 | };
|
---|
901 |
|
---|
902 | class Q_GUI_EXPORT QStyleHintReturnMask : public QStyleHintReturn {
|
---|
903 | public:
|
---|
904 | enum StyleOptionType { Type = SH_Mask };
|
---|
905 | enum StyleOptionVersion { Version = 1 };
|
---|
906 |
|
---|
907 | QStyleHintReturnMask();
|
---|
908 |
|
---|
909 | QRegion region;
|
---|
910 | };
|
---|
911 |
|
---|
912 | class Q_GUI_EXPORT QStyleHintReturnVariant : public QStyleHintReturn {
|
---|
913 | public:
|
---|
914 | enum StyleOptionType { Type = SH_Variant };
|
---|
915 | enum StyleOptionVersion { Version = 1 };
|
---|
916 |
|
---|
917 | QStyleHintReturnVariant();
|
---|
918 |
|
---|
919 | QVariant variant;
|
---|
920 | };
|
---|
921 |
|
---|
922 | template <typename T>
|
---|
923 | T qstyleoption_cast(const QStyleHintReturn *hint)
|
---|
924 | {
|
---|
925 | if (hint && hint->version <= static_cast<T>(0)->Version &&
|
---|
926 | (hint->type == static_cast<T>(0)->Type || int(static_cast<T>(0)->Type) == QStyleHintReturn::SH_Default))
|
---|
927 | return static_cast<T>(hint);
|
---|
928 | return 0;
|
---|
929 | }
|
---|
930 |
|
---|
931 | template <typename T>
|
---|
932 | T qstyleoption_cast(QStyleHintReturn *hint)
|
---|
933 | {
|
---|
934 | if (hint && hint->version <= static_cast<T>(0)->Version &&
|
---|
935 | (hint->type == static_cast<T>(0)->Type || int(static_cast<T>(0)->Type) == QStyleHintReturn::SH_Default))
|
---|
936 | return static_cast<T>(hint);
|
---|
937 | return 0;
|
---|
938 | }
|
---|
939 |
|
---|
940 | #if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_NO_DEBUG)
|
---|
941 | Q_GUI_EXPORT QDebug operator<<(QDebug debug, const QStyleOption::OptionType &optionType);
|
---|
942 | Q_GUI_EXPORT QDebug operator<<(QDebug debug, const QStyleOption &option);
|
---|
943 | #endif
|
---|
944 |
|
---|
945 | QT_END_NAMESPACE
|
---|
946 |
|
---|
947 | QT_END_HEADER
|
---|
948 |
|
---|
949 | #endif // QSTYLEOPTION_H
|
---|