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);
|
---|
|
---|