Qt 4.8
qstyleoption.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtGui module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
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 
60 
62 
63 QT_MODULE(Gui)
64 
65 class QDebug;
66 
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;
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 
104 {
105 public:
106  enum StyleOptionType { Type = SO_FocusRect };
107  enum StyleOptionVersion { Version = 1 };
108 
110 
112  QStyleOptionFocusRect(const QStyleOptionFocusRect &other) : QStyleOption(Version, Type) { *this = other; }
113 
114 protected:
115  QStyleOptionFocusRect(int version);
116 };
117 
119 {
120 public:
121  enum StyleOptionType { Type = SO_Frame };
122  enum StyleOptionVersion { Version = 1 };
123 
126 
128  QStyleOptionFrame(const QStyleOptionFrame &other) : QStyleOption(Version, Type) { *this = other; }
129 
130 protected:
131  QStyleOptionFrame(int version);
132 };
133 
135 {
136 public:
137  enum StyleOptionVersion { Version = 2 };
139  None = 0x00,
140  Flat = 0x01
141  };
142  Q_DECLARE_FLAGS(FrameFeatures, FrameFeature)
143  FrameFeatures features;
144 
146  QStyleOptionFrameV2(const QStyleOptionFrameV2 &other) : QStyleOptionFrame(Version) { *this = other; }
149 
150 protected:
151  QStyleOptionFrameV2(int version);
152 };
153 
154 Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionFrameV2::FrameFeatures)
155 
156 
158 {
159 public:
160  enum StyleOptionVersion { Version = 3 };
162  uint unused : 28;
163 
165  QStyleOptionFrameV3(const QStyleOptionFrameV3 &other) : QStyleOptionFrameV2(Version) { *this = other; }
168 
169 protected:
170  QStyleOptionFrameV3(int version);
171 };
172 
173 
174 #ifndef QT_NO_TABWIDGET
176 {
177 public:
178  enum StyleOptionType { Type = SO_TabWidgetFrame };
179  enum StyleOptionVersion { Version = 1 };
180 
187 
190  : QStyleOption(Version, Type) { *this = other; }
191 
192 protected:
193  QStyleOptionTabWidgetFrame(int version);
194 };
195 
197 {
198 public:
199  enum StyleOptionVersion { Version = 2 };
200 
203 
206  QStyleOptionTabWidgetFrame(Version) { *this = other; }
209 
210 protected:
211  QStyleOptionTabWidgetFrameV2(int version);
212 };
213 
214 #endif
215 
216 
217 #ifndef QT_NO_TABBAR
219 {
220 public:
221  enum StyleOptionType { Type = SO_TabBarBase };
222  enum StyleOptionVersion { Version = 1 };
223 
227 
229  QStyleOptionTabBarBase(const QStyleOptionTabBarBase &other) : QStyleOption(Version, Type) { *this = other; }
230 
231 protected:
232  QStyleOptionTabBarBase(int version);
233 };
234 
236 {
237 public:
238  enum StyleOptionVersion { Version = 2 };
244 
245 protected:
246  QStyleOptionTabBarBaseV2(int version);
247 };
248 
249 #endif
250 
252 {
253 public:
254  enum StyleOptionType { Type = SO_Header };
255  enum StyleOptionVersion { Version = 1 };
256 
257  enum SectionPosition { Beginning, Middle, End, OnlyOneSection };
258  enum SelectedPosition { NotAdjacent, NextIsSelected, PreviousIsSelected,
259  NextAndPreviousAreSelected };
260  enum SortIndicator { None, SortUp, SortDown };
261 
262  int section;
264  Qt::Alignment textAlignment;
266  Qt::Alignment iconAlignment;
271 
273  QStyleOptionHeader(const QStyleOptionHeader &other) : QStyleOption(Version, Type) { *this = other; }
274 
275 protected:
276  QStyleOptionHeader(int version);
277 };
278 
280 {
281 public:
282  enum StyleOptionType { Type = SO_Button };
283  enum StyleOptionVersion { Version = 1 };
284 
285  enum ButtonFeature { None = 0x00, Flat = 0x01, HasMenu = 0x02, DefaultButton = 0x04,
286  AutoDefaultButton = 0x08, CommandLinkButton = 0x10 };
287  Q_DECLARE_FLAGS(ButtonFeatures, ButtonFeature)
288 
289  ButtonFeatures features;
291  QIcon icon;
292  QSize iconSize;
293 
295  QStyleOptionButton(const QStyleOptionButton &other) : QStyleOption(Version, Type) { *this = other; }
296 
297 protected:
298  QStyleOptionButton(int version);
299 };
300 
301 Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionButton::ButtonFeatures)
302 
303 #ifndef QT_NO_TABBAR
305 {
306 public:
307  enum StyleOptionType { Type = SO_Tab };
308  enum StyleOptionVersion { Version = 1 };
309 
310  enum TabPosition { Beginning, Middle, End, OnlyOneTab };
311  enum SelectedPosition { NotAdjacent, NextIsSelected, PreviousIsSelected };
312  enum CornerWidget { NoCornerWidgets = 0x00, LeftCornerWidget = 0x01,
313  RightCornerWidget = 0x02 };
314  Q_DECLARE_FLAGS(CornerWidgets, CornerWidget)
315 
316  QTabBar::Shape shape;
318  QIcon icon;
319  int row;
321  SelectedPosition selectedPosition;
322  CornerWidgets cornerWidgets;
323 
324  QStyleOptionTab();
325  QStyleOptionTab(const QStyleOptionTab &other) : QStyleOption(Version, Type) { *this = other; }
326 
327 protected:
328  QStyleOptionTab(int version);
329 };
330 
331 Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionTab::CornerWidgets)
332 
334 {
335 public:
336  enum StyleOptionVersion { Version = 2 };
339  QStyleOptionTabV2(const QStyleOptionTabV2 &other) : QStyleOptionTab(Version) { *this = other; }
340  QStyleOptionTabV2(const QStyleOptionTab &other);
342 
343 protected:
344  QStyleOptionTabV2(int version);
345 };
346 
348 {
349 public:
350  enum StyleOptionVersion { Version = 3 };
355  QStyleOptionTabV3(const QStyleOptionTabV3 &other) : QStyleOptionTabV2(Version) { *this = other; }
356  QStyleOptionTabV3(const QStyleOptionTabV2 &other) : QStyleOptionTabV2(Version) { *this = other; }
357  QStyleOptionTabV3(const QStyleOptionTab &other);
359 
360 protected:
361  QStyleOptionTabV3(int version);
362 };
363 
364 #endif
365 
366 
367 #ifndef QT_NO_TOOLBAR
368 
370 {
371 public:
372  enum StyleOptionType { Type = SO_ToolBar };
373  enum StyleOptionVersion { Version = 1 };
374  enum ToolBarPosition { Beginning, Middle, End, OnlyOne };
375  enum ToolBarFeature { None = 0x0, Movable = 0x1 };
376  Q_DECLARE_FLAGS(ToolBarFeatures, ToolBarFeature)
377  ToolBarPosition positionOfLine; // The toolbar line position
378  ToolBarPosition positionWithinLine; // The position within a toolbar
379  Qt::ToolBarArea toolBarArea; // The toolbar docking area
380  ToolBarFeatures features;
381  int lineWidth;
382  int midLineWidth;
384  QStyleOptionToolBar(const QStyleOptionToolBar &other) : QStyleOption(Version, Type) { *this = other; }
385 
386 protected:
387  QStyleOptionToolBar(int version);
388 };
389 
390 Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionToolBar::ToolBarFeatures)
391 
392 #endif
393 
394 
395 
397 {
398 public:
399  enum StyleOptionType { Type = SO_ProgressBar };
400  enum StyleOptionVersion { Version = 1 };
401 
402  int minimum;
403  int maximum;
404  int progress;
406  Qt::Alignment textAlignment;
408 
410  QStyleOptionProgressBar(const QStyleOptionProgressBar &other) : QStyleOption(Version, Type) { *this = other; }
411 
412 protected:
413  QStyleOptionProgressBar(int version);
414 };
415 
416 // Adds style info for vertical progress bars
418 {
419 public:
420  enum StyleOptionType { Type = SO_ProgressBar };
421  enum StyleOptionVersion { Version = 2 };
425 
430 
431 protected:
432  QStyleOptionProgressBarV2(int version);
433 };
434 
436 {
437 public:
438  enum StyleOptionType { Type = SO_MenuItem };
439  enum StyleOptionVersion { Version = 1 };
440 
441  enum MenuItemType { Normal, DefaultItem, Separator, SubMenu, Scroller, TearOff, Margin,
442  EmptyArea };
443  enum CheckType { NotCheckable, Exclusive, NonExclusive };
444 
447  bool checked;
453  int tabWidth;
455 
457  QStyleOptionMenuItem(const QStyleOptionMenuItem &other) : QStyleOption(Version, Type) { *this = other; }
458 
459 protected:
460  QStyleOptionMenuItem(int version);
461 };
462 
464 {
465 public:
466  enum StyleOptionType { Type = SO_Q3ListViewItem };
467  enum StyleOptionVersion { Version = 1 };
468 
469  enum Q3ListViewItemFeature { None = 0x00, Expandable = 0x01, MultiLine = 0x02, Visible = 0x04,
470  ParentControl = 0x08 };
471  Q_DECLARE_FLAGS(Q3ListViewItemFeatures, Q3ListViewItemFeature)
472 
473  Q3ListViewItemFeatures features;
474  int height;
475  int totalHeight;
476  int itemY;
477  int childCount;
478 
480  QStyleOptionQ3ListViewItem(const QStyleOptionQ3ListViewItem &other) : QStyleOption(Version, Type) { *this = other; }
481 
482 protected:
483  QStyleOptionQ3ListViewItem(int version);
484 };
485 
486 Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionQ3ListViewItem::Q3ListViewItemFeatures)
487 
489 {
490 public:
491  enum StyleOptionType { Type = SO_Q3DockWindow };
492  enum StyleOptionVersion { Version = 1 };
493 
494  bool docked;
496 
498  QStyleOptionQ3DockWindow(const QStyleOptionQ3DockWindow &other) : QStyleOption(Version, Type) { *this = other; }
499 
500 protected:
501  QStyleOptionQ3DockWindow(int version);
502 };
503 
505 {
506 public:
507  enum StyleOptionType { Type = SO_DockWidget };
508  enum StyleOptionVersion { Version = 1 };
509 
511  bool closable;
512  bool movable;
513  bool floatable;
514 
516  QStyleOptionDockWidget(const QStyleOptionDockWidget &other) : QStyleOption(Version, Type) { *this = other; }
517 
518 protected:
519  QStyleOptionDockWidget(int version);
520 };
521 
523 {
524 public:
525  enum StyleOptionVersion { Version = 2 };
526 
528 
531  : QStyleOptionDockWidget(Version) { *this = other; }
534 
535 protected:
536  QStyleOptionDockWidgetV2(int version);
537 };
538 
540 {
541 public:
542  enum StyleOptionType { Type = SO_ViewItem };
543  enum StyleOptionVersion { Version = 1 };
544 
545  enum Position { Left, Right, Top, Bottom };
546 
547  Qt::Alignment displayAlignment;
548  Qt::Alignment decorationAlignment;
554 
556  QStyleOptionViewItem(const QStyleOptionViewItem &other) : QStyleOption(Version, Type) { *this = other; }
557 
558 protected:
559  QStyleOptionViewItem(int version);
560 };
561 
563 {
564 public:
565  enum StyleOptionVersion { Version = 2 };
566 
568  None = 0x00,
569  WrapText = 0x01,
570  Alternate = 0x02,
571  HasCheckIndicator = 0x04,
572  HasDisplay = 0x08,
573  HasDecoration = 0x10
574  };
575  Q_DECLARE_FLAGS(ViewItemFeatures, ViewItemFeature)
576 
577  ViewItemFeatures features;
578 
580  QStyleOptionViewItemV2(const QStyleOptionViewItemV2 &other) : QStyleOptionViewItem(Version) { *this = other; }
583 
584 protected:
585  QStyleOptionViewItemV2(int version);
586 };
587 
588 Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionViewItemV2::ViewItemFeatures)
589 
591 {
592 public:
593  enum StyleOptionVersion { Version = 3 };
594 
596  const QWidget *widget;
597 
600  : QStyleOptionViewItemV2(Version) { *this = other; }
603 
604 protected:
605  QStyleOptionViewItemV3(int version);
606 };
607 
608 #ifndef QT_NO_ITEMVIEWS
610 {
611 public:
612  enum StyleOptionVersion { Version = 4 };
613  enum ViewItemPosition { Invalid, Beginning, Middle, End, OnlyOne };
614 
621 
624  : QStyleOptionViewItemV3(Version) { *this = other; }
627 
628 protected:
629  QStyleOptionViewItemV4(int version);
630 };
631 #endif
632 
634 {
635 public:
636  enum StyleOptionType { Type = SO_ToolBox };
637  enum StyleOptionVersion { Version = 1 };
638 
641 
643  QStyleOptionToolBox(const QStyleOptionToolBox &other) : QStyleOption(Version, Type) { *this = other; }
644 
645 protected:
646  QStyleOptionToolBox(int version);
647 };
648 
650 {
651 public:
652  enum StyleOptionVersion { Version = 2 };
653  enum TabPosition { Beginning, Middle, End, OnlyOneTab };
654  enum SelectedPosition { NotAdjacent, NextIsSelected, PreviousIsSelected };
655 
658 
660  QStyleOptionToolBoxV2(const QStyleOptionToolBoxV2 &other) : QStyleOptionToolBox(Version) { *this = other; }
663 
664 protected:
665  QStyleOptionToolBoxV2(int version);
666 };
667 
668 #ifndef QT_NO_RUBBERBAND
670 {
671 public:
672  enum StyleOptionType { Type = SO_RubberBand };
673  enum StyleOptionVersion { Version = 1 };
674 
676  bool opaque;
677 
679  QStyleOptionRubberBand(const QStyleOptionRubberBand &other) : QStyleOption(Version, Type) { *this = other; }
680 
681 protected:
682  QStyleOptionRubberBand(int version);
683 };
684 #endif // QT_NO_RUBBERBAND
685 
686 // -------------------------- Complex style options -------------------------------
688 {
689 public:
690  enum StyleOptionType { Type = SO_Complex };
691  enum StyleOptionVersion { Version = 1 };
692 
695 
696  QStyleOptionComplex(int version = QStyleOptionComplex::Version, int type = SO_Complex);
697  QStyleOptionComplex(const QStyleOptionComplex &other) : QStyleOption(Version, Type) { *this = other; }
698 };
699 
700 #ifndef QT_NO_SLIDER
702 {
703 public:
704  enum StyleOptionType { Type = SO_Slider };
705  enum StyleOptionVersion { Version = 1 };
706 
708  int minimum;
709  int maximum;
716  int pageStep;
719 
721  QStyleOptionSlider(const QStyleOptionSlider &other) : QStyleOptionComplex(Version, Type) { *this = other; }
722 
723 protected:
724  QStyleOptionSlider(int version);
725 };
726 #endif // QT_NO_SLIDER
727 
728 #ifndef QT_NO_SPINBOX
730 {
731 public:
732  enum StyleOptionType { Type = SO_SpinBox };
733  enum StyleOptionVersion { Version = 1 };
734 
736  QAbstractSpinBox::StepEnabled stepEnabled;
737  bool frame;
738 
740  QStyleOptionSpinBox(const QStyleOptionSpinBox &other) : QStyleOptionComplex(Version, Type) { *this = other; }
741 
742 protected:
743  QStyleOptionSpinBox(int version);
744 };
745 #endif // QT_NO_SPINBOX
746 
748 {
749 public:
750  enum StyleOptionType { Type = SO_Q3ListView };
751  enum StyleOptionVersion { Version = 1 };
752 
760 
762  QStyleOptionQ3ListView(const QStyleOptionQ3ListView &other) : QStyleOptionComplex(Version, Type) { *this = other; }
763 
764 protected:
765  QStyleOptionQ3ListView(int version);
766 };
767 
769 {
770 public:
771  enum StyleOptionType { Type = SO_ToolButton };
772  enum StyleOptionVersion { Version = 1 };
773 
774  enum ToolButtonFeature { None = 0x00, Arrow = 0x01, Menu = 0x04, MenuButtonPopup = Menu, PopupDelay = 0x08,
775  HasMenu = 0x10 };
776  Q_DECLARE_FLAGS(ToolButtonFeatures, ToolButtonFeature)
777 
778  ToolButtonFeatures features;
779  QIcon icon;
780  QSize iconSize;
782  Qt::ArrowType arrowType;
783  Qt::ToolButtonStyle toolButtonStyle;
784  QPoint pos;
785  QFont font;
786 
788  QStyleOptionToolButton(const QStyleOptionToolButton &other) : QStyleOptionComplex(Version, Type) { *this = other; }
789 
790 protected:
791  QStyleOptionToolButton(int version);
792 };
793 
794 Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionToolButton::ToolButtonFeatures)
795 
797 {
798 public:
799  enum StyleOptionType { Type = SO_ComboBox };
800  enum StyleOptionVersion { Version = 1 };
801 
802  bool editable;
804  bool frame;
808 
810  QStyleOptionComboBox(const QStyleOptionComboBox &other) : QStyleOptionComplex(Version, Type) { *this = other; }
811 
812 protected:
813  QStyleOptionComboBox(int version);
814 };
815 
817 {
818 public:
819  enum StyleOptionType { Type = SO_TitleBar };
820  enum StyleOptionVersion { Version = 1 };
821 
825  Qt::WindowFlags titleBarFlags;
826 
828  QStyleOptionTitleBar(const QStyleOptionTitleBar &other) : QStyleOptionComplex(Version, Type) { *this = other; }
829 
830 protected:
831  QStyleOptionTitleBar(int version);
832 };
833 
835 {
836 public:
837  enum StyleOptionType { Type = SO_GroupBox };
838  enum StyleOptionVersion { Version = 1 };
839 
840  QStyleOptionFrameV2::FrameFeatures features;
842  Qt::Alignment textAlignment;
846 
848  QStyleOptionGroupBox(const QStyleOptionGroupBox &other) : QStyleOptionComplex(Version, Type) { *this = other; }
849 protected:
850  QStyleOptionGroupBox(int version);
851 };
852 
854 {
855 public:
856  enum StyleOptionType { Type = SO_SizeGrip };
857  enum StyleOptionVersion { Version = 1 };
858 
860 
862  QStyleOptionSizeGrip(const QStyleOptionSizeGrip &other) : QStyleOptionComplex(Version, Type) { *this = other; }
863 protected:
864  QStyleOptionSizeGrip(int version);
865 };
866 
868 {
869 public:
870  enum StyleOptionType { Type = SO_GraphicsItem };
871  enum StyleOptionVersion { Version = 1 };
872 
876 
878  QStyleOptionGraphicsItem(const QStyleOptionGraphicsItem &other) : QStyleOption(Version, Type) { *this = other; }
879  static qreal levelOfDetailFromTransform(const QTransform &worldTransform);
880 protected:
881  QStyleOptionGraphicsItem(int version);
882 };
883 
884 template <typename T>
886 {
887  if (opt && opt->version >= static_cast<T>(0)->Version && (opt->type == static_cast<T>(0)->Type
888  || int(static_cast<T>(0)->Type) == QStyleOption::SO_Default
889  || (int(static_cast<T>(0)->Type) == QStyleOption::SO_Complex
890  && opt->type > QStyleOption::SO_Complex)))
891  return static_cast<T>(opt);
892  return 0;
893 }
894 
895 template <typename T>
897 {
898  if (opt && opt->version >= static_cast<T>(0)->Version && (opt->type == static_cast<T>(0)->Type
899  || int(static_cast<T>(0)->Type) == QStyleOption::SO_Default
900  || (int(static_cast<T>(0)->Type) == QStyleOption::SO_Complex
901  && opt->type > QStyleOption::SO_Complex)))
902  return static_cast<T>(opt);
903  return 0;
904 }
905 
906 // -------------------------- QStyleHintReturn -------------------------------
908 public:
910  SH_Default=0xf000, SH_Mask, SH_Variant
911  };
912 
913  enum StyleOptionType { Type = SH_Default };
914  enum StyleOptionVersion { Version = 1 };
915 
916  QStyleHintReturn(int version = QStyleOption::Version, int type = SH_Default);
917  ~QStyleHintReturn();
918 
919  int version;
920  int type;
921 };
922 
924 public:
925  enum StyleOptionType { Type = SH_Mask };
926  enum StyleOptionVersion { Version = 1 };
927 
929 
931 };
932 
934 public:
935  enum StyleOptionType { Type = SH_Variant };
936  enum StyleOptionVersion { Version = 1 };
937 
939 
941 };
942 
943 template <typename T>
945 {
946  if (hint && hint->version <= static_cast<T>(0)->Version &&
947  (hint->type == static_cast<T>(0)->Type || int(static_cast<T>(0)->Type) == QStyleHintReturn::SH_Default))
948  return static_cast<T>(hint);
949  return 0;
950 }
951 
952 template <typename T>
954 {
955  if (hint && hint->version <= static_cast<T>(0)->Version &&
956  (hint->type == static_cast<T>(0)->Type || int(static_cast<T>(0)->Type) == QStyleHintReturn::SH_Default))
957  return static_cast<T>(hint);
958  return 0;
959 }
960 
961 #if !defined(QT_NO_DEBUG_STREAM)
963 Q_GUI_EXPORT QDebug operator<<(QDebug debug, const QStyleOption &option);
964 #endif
965 
967 
969 
970 #endif // QSTYLEOPTION_H
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:92
ToolBarPosition
This enum is used to describe the position of a toolbar line, as well as the toolbar&#39;s position withi...
Definition: qstyleoption.h:374
QStyleOptionViewItemV3 & operator=(const QStyleOptionViewItem &other)
Assigns the other style option to this style option.
int version
the version of the style option
Definition: qstyleoption.h:86
QPalette viewportPalette
the palette of Q3ListView&#39;s viewport
Definition: qstyleoption.h:754
qreal notchTarget
the number of pixel between notches
Definition: qstyleoption.h:717
The QDebug class provides an output stream for debugging information.
Definition: qdebug.h:62
QRect menuRect
the rectangle for the entire menu
Definition: qstyleoption.h:449
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition: qcolor.h:67
QString text
the text of the group box
Definition: qstyleoption.h:841
QStyleOptionSlider(const QStyleOptionSlider &other)
Constructs a copy of the other style option.
Definition: qstyleoption.h:721
QStyleOptionRubberBand(const QStyleOptionRubberBand &other)
Constructs a copy of the other style option.
Definition: qstyleoption.h:679
QString text
the text for the progress bar
Definition: qstyleoption.h:405
The QStyleHintReturnVariant class provides style hints that return a QVariant.
Definition: qstyleoption.h:933
CheckState
Definition: qnamespace.h:1607
QStyleOptionDockWidget(const QStyleOptionDockWidget &other)
Constructs a copy of the other style option.
Definition: qstyleoption.h:516
The QStyleOptionToolBoxV2 class is used to describe the parameters necessary for drawing a frame in Q...
Definition: qstyleoption.h:649
TabPosition
This enum describes the position of the tab.
Definition: qstyleoption.h:310
int type
Definition: qmetatype.cpp:239
QFont font
the font used for the item
Definition: qstyleoption.h:552
double qreal
Definition: qglobal.h:1193
Qt::Alignment decorationAlignment
the alignment of the decoration for the item
Definition: qstyleoption.h:548
The QStyleHintReturn class provides style hints that return more than basic data types.
Definition: qstyleoption.h:907
QString text
the text for the tool box tab
Definition: qstyleoption.h:639
bool rootIsDecorated
whether root items are decorated
Definition: qstyleoption.h:759
QSize leftCornerWidgetSize
the size of the left-corner widget
Definition: qstyleoption.h:186
int type
the option type of the style option
Definition: qstyleoption.h:87
The QFontMetrics class provides font metrics information.
Definition: qfontmetrics.h:65
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
The QStyleOptionDockWidget class is used to describe the parameters for drawing a dock widget...
Definition: qstyleoption.h:504
QStyleOptionFrame(const QStyleOptionFrame &other)
Constructs a copy of the other style option.
Definition: qstyleoption.h:128
QSize iconSize
the icon size for the current item of the combo box
Definition: qstyleoption.h:807
int sliderValue
the value of the slider
Definition: qstyleoption.h:714
int maximum
the maximum value for the progress bar
Definition: qstyleoption.h:403
QStyleOptionViewItemV3(const QStyleOptionViewItemV3 &other)
Constructs a copy of other.
Definition: qstyleoption.h:599
#define QT_MODULE(x)
Definition: qglobal.h:2783
QRect tabBarRect
the rectangle containing all the tabs
Definition: qstyleoption.h:201
ColorRole
The ColorRole enum defines the different symbolic color roles used in current GUIs.
Definition: qpalette.h:93
bool frame
whether the combo box has a frame
Definition: qstyleoption.h:804
int itemMargin
the margin for items in the list view
Definition: qstyleoption.h:757
The QStyleOptionTabV2 class is used to describe the parameters necessary for drawing a tabs in Qt 4...
Definition: qstyleoption.h:333
QStyleOptionToolBoxV2(const QStyleOptionToolBoxV2 &other)
Constructs a QStyleOptionToolBoxV2 copy of the other style option.
Definition: qstyleoption.h:660
#define QT_BEGIN_HEADER
Definition: qglobal.h:136
#define Q_DECLARE_FLAGS(Flags, Enum)
The Q_DECLARE_FLAGS() macro expands to.
Definition: qglobal.h:2348
int type
the type of the style hint container
Definition: qstyleoption.h:920
ToolButtonFeature
Describes the various features that a tool button can have.
Definition: qstyleoption.h:774
The QMatrix class specifies 2D transformations of a coordinate system.
Definition: qmatrix.h:61
QIcon icon
The icon (if any) to be drawn in the view item.
Definition: qstyleoption.h:617
QStyleOptionTabV2(const QStyleOptionTabV2 &other)
Constructs a copy of the other style option.
Definition: qstyleoption.h:339
QStyle::State state
the style flags that are used when drawing the control
Definition: qstyleoption.h:88
The QStyleOptionMenuItem class is used to describe the parameter necessary for drawing a menu item...
Definition: qstyleoption.h:435
CornerWidget
These flags indicate the corner widgets in a tab.
Definition: qstyleoption.h:312
The QStyleOptionHeader class is used to describe the parameters for drawing a header.
Definition: qstyleoption.h:251
QIcon icon
the icon for the menu item
Definition: qstyleoption.h:451
QStyleOptionToolBox(const QStyleOptionToolBox &other)
Constructs a copy of the other style option.
Definition: qstyleoption.h:643
QStyleOptionSpinBox(const QStyleOptionSpinBox &other)
Constructs a copy of the other style option.
Definition: qstyleoption.h:740
QIcon icon
the icon for the title bar
Definition: qstyleoption.h:823
QFont font
the font used for the menu item text
Definition: qstyleoption.h:454
#define Q_GUI_EXPORT
Definition: qglobal.h:1450
bool closable
whether the dock window is closable
Definition: qstyleoption.h:511
The QStyleOptionQ3ListView class is used to describe the parameters for drawing a Q3ListView...
Definition: qstyleoption.h:747
QString currentText
the text for the current item of the combo box
Definition: qstyleoption.h:805
QStyleOptionTitleBar(const QStyleOptionTitleBar &other)
Constructs a copy of the other style option.
Definition: qstyleoption.h:828
SelectedPosition
This enum describes the position of the selected tab.
Definition: qstyleoption.h:311
QBrush backgroundBrush
The QBrush that should be used to paint the view items background.
Definition: qstyleoption.h:620
QStyleOptionTabV2 & operator=(const QStyleOptionTab &other)
Assigns the other style option to this QStyleOptionTabV2.
QFrame::Shape frameShape
This property holds the frame shape value of the frame.
Definition: qstyleoption.h:161
Qt::Orientation orientation
the progress bar&#39;s orientation (horizontal or vertical); the default orentation is Qt::Horizontal ...
Definition: qstyleoption.h:422
TextElideMode
Definition: qnamespace.h:263
QStyleOptionFrameV2::FrameFeatures features
the features of the group box frame
Definition: qstyleoption.h:840
The QStyleOptionTitleBar class is used to describe the parameters for drawing a title bar...
Definition: qstyleoption.h:816
static qreal position(QGraphicsObject *item, QDeclarativeAnchorLine::AnchorLine anchorLine)
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
The QStyleOptionViewItemV4 class is used to describe the parameters necessary for drawing a frame in ...
Definition: qstyleoption.h:609
Position decorationPosition
the position of the decoration for the item
Definition: qstyleoption.h:550
Q_GUI_EXPORT QDebug operator<<(QDebug debug, const QStyleOption::OptionType &optionType)
QSize tabBarSize
the size of the tab bar
Definition: qstyleoption.h:184
int tickInterval
the interval that should be drawn between tick marks
Definition: qstyleoption.h:711
int maxIconWidth
the maximum icon width for the icon in the menu item
Definition: qstyleoption.h:452
The QStyleOptionToolBar class is used to describe the parameters for drawing a toolbar.
Definition: qstyleoption.h:369
QIcon currentIcon
the icon for the current item of the combo box
Definition: qstyleoption.h:806
Qt::TextElideMode textElideMode
where ellipsis should be added for text that is too long to fit into an item
Definition: qstyleoption.h:549
Position
This enum describes the position of the item&#39;s decoration.
Definition: qstyleoption.h:545
bool bottomToTop
whether the text reads from bottom to top when the progress bar is vertical
Definition: qstyleoption.h:424
QAbstractSpinBox::StepEnabled stepEnabled
which buttons of the spin box that are enabled
Definition: qstyleoption.h:736
QString text
the text of the title bar
Definition: qstyleoption.h:822
SortIndicator sortIndicator
the direction the sort indicator should be drawn
Definition: qstyleoption.h:269
QSlider::TickPosition tickPosition
the position of the slider&#39;s tick marks, if any
Definition: qstyleoption.h:710
int midLineWidth
the mid-line width for drawing the panel
Definition: qstyleoption.h:182
TickPosition
This enum specifies where the tick marks are to be drawn relative to the slider&#39;s groove and the hand...
Definition: qslider.h:66
The QTabBar class provides a tab bar, e.g.
Definition: qtabbar.h:59
QStyle::SubControls activeSubControls
This variable holds a bitwise OR of the sub-controls that are active for the complex control...
Definition: qstyleoption.h:694
QStyleOptionViewItemV4(const QStyleOptionViewItemV4 &other)
Constructs a copy of other.
Definition: qstyleoption.h:623
qreal levelOfDetail
Use QStyleOptionGraphicsItem::levelOfDetailFromTransform() together with QPainter::worldTransform() i...
Definition: qstyleoption.h:875
bool editable
whether or not the combobox is editable or not
Definition: qstyleoption.h:802
QString text
the text of the header
Definition: qstyleoption.h:263
The QString class provides a Unicode character string.
Definition: qstring.h:83
QFontMetrics fontMetrics
the font metrics that should be used when drawing text in the control
Definition: qstyleoption.h:91
ViewItemPosition
This enum is used to represent the placement of the item on a row.
Definition: qstyleoption.h:613
The QStyleOptionToolBox class is used to describe the parameters needed for drawing a tool box...
Definition: qstyleoption.h:633
Qt::Alignment textAlignment
the alignment of the group box title
Definition: qstyleoption.h:842
QStyleOptionTabV3(const QStyleOptionTabV2 &other)
Constructs a copy of the other style option.
Definition: qstyleoption.h:356
Qt::Corner corner
The corner in which the size grip is located.
Definition: qstyleoption.h:859
The QStyleOptionSizeGrip class is used to describe the parameter for drawing a size grip...
Definition: qstyleoption.h:853
Qt::Orientation orientation
the header&#39;s orientation (horizontal or vertical)
Definition: qstyleoption.h:270
Shape
This enum type defines the shapes of frame available.
Definition: qframe.h:78
ButtonSymbols
This enum type describes the symbols that can be displayed on the buttons in a spin box...
Qt::Alignment textAlignment
the alignment flags for the text of the header
Definition: qstyleoption.h:264
Shape
This enum specifies what shape a QRubberBand should have.
Definition: qrubberband.h:63
QString text
the text for the menu item
Definition: qstyleoption.h:450
The QStyleOptionToolButton class is used to describe the parameters for drawing a tool button...
Definition: qstyleoption.h:768
bool frame
whether the spin box has a frame
Definition: qstyleoption.h:737
QList< QStyleOptionQ3ListViewItem > items
a list of items in the Q3ListView
Definition: qstyleoption.h:753
QStyleOptionTabV3(const QStyleOptionTabV3 &other)
Constructs a copy of the other style option.
Definition: qstyleoption.h:355
T qstyleoption_cast(const QStyleOption *option)
Definition: qstyleoption.h:885
QRect tabBarRect
the rectangle containing all the tabs
Definition: qstyleoption.h:225
bool dialWrapping
whether the dial should wrap or not
Definition: qstyleoption.h:718
The QStyleOptionViewItemV2 class is used to describe the parameters necessary for drawing a frame in ...
Definition: qstyleoption.h:562
QRect selectedTabRect
the rectangle containing the selected tab
Definition: qstyleoption.h:202
QColor backgroundColor
the background color on which the focus rectangle is being drawn
Definition: qstyleoption.h:109
QStyleOptionDockWidgetV2(const QStyleOptionDockWidgetV2 &other)
Definition: qstyleoption.h:530
int sortColumn
the sort column of the list view
Definition: qstyleoption.h:756
bool closeEnabled
whether the dock window has a close button
Definition: qstyleoption.h:495
bool movable
whether the dock window is movable
Definition: qstyleoption.h:512
CheckType
This enum is used to indicate whether or not a check mark should be drawn for the item...
Definition: qstyleoption.h:443
bool upsideDown
the slider control orientation
Definition: qstyleoption.h:712
int lineWidth
the line width for drawing the frame
Definition: qstyleoption.h:124
The QStyleOptionProgressBarV2 class is used to describe the parameters necessary for drawing a progre...
Definition: qstyleoption.h:417
QStyleOptionTabBarBaseV2(const QStyleOptionTabBarBaseV2 &other)
Constructs a copy of other.
Definition: qstyleoption.h:241
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
QStyleOption & operator=(const QStyleOption &other)
Assign other to this QStyleOption.
The QRectF class defines a rectangle in the plane using floating point precision. ...
Definition: qrect.h:511
The QStyleOptionViewItemV3 class is used to describe the parameters necessary for drawing a frame in ...
Definition: qstyleoption.h:590
Shape
This enum type lists the built-in shapes supported by QTabBar.
Definition: qtabbar.h:81
The QStyleOptionQ3ListViewItem class is used to describe an item drawn in a Q3ListView.
Definition: qstyleoption.h:463
bool documentMode
whether the tabbar is in document mode.
Definition: qstyleoption.h:239
SelectedPosition selectedPosition
the position of the selected tab in relation to this tab
Definition: qstyleoption.h:657
QStyleOptionSizeGrip(const QStyleOptionSizeGrip &other)
Constructs a copy of the other style option.
Definition: qstyleoption.h:862
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
The Q_DECLARE_OPERATORS_FOR_FLAGS() macro declares global operator|() functions for Flags...
Definition: qglobal.h:2355
The QStyleOption class stores the parameters used by QStyle functions.
Definition: qstyleoption.h:67
static bool init
The QStyleOptionSpinBox class is used to describe the parameters necessary for drawing a spin box...
Definition: qstyleoption.h:729
void initFrom(const QWidget *w)
Definition: qstyleoption.h:99
QIcon icon
the icon for the tool box tab
Definition: qstyleoption.h:640
bool checked
whether the menu item is checked or not
Definition: qstyleoption.h:447
T qstyleoption_cast(const QStyleHintReturn *hint)
Definition: qstyleoption.h:944
The QStyleOptionQ3DockWindow class is used to describe the parameters for drawing various parts of a ...
Definition: qstyleoption.h:488
LayoutDirection
Definition: qnamespace.h:1580
int progress
the current progress for the progress bar
Definition: qstyleoption.h:404
The QStyleOptionFocusRect class is used to describe the parameters for drawing a focus rectangle with...
Definition: qstyleoption.h:103
bool menuHasCheckableItems
whether the menu as a whole has checkable items or not
Definition: qstyleoption.h:448
QStyleOptionTabWidgetFrame(const QStyleOptionTabWidgetFrame &other)
Constructs a copy of other.
Definition: qstyleoption.h:189
bool showDecorationSelected
whether the decoration should be highlighted on selected items
Definition: qstyleoption.h:553
The QStyleOptionFrame class is used to describe the parameters for drawing a frame.
Definition: qstyleoption.h:118
unsigned int uint
Definition: qglobal.h:996
Qt::CheckState checkState
If this view item is checkable, i.
Definition: qstyleoption.h:616
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
Definition: qstyleoption.h:914
QStyleOptionQ3DockWindow(const QStyleOptionQ3DockWindow &other)
Constructs a copy of the other style option.
Definition: qstyleoption.h:498
Qt::Alignment textAlignment
the text alignment for the text in the QProgressBar
Definition: qstyleoption.h:406
The QStyleOptionTabWidgetFrame class is used to describe the parameters for drawing the frame around ...
Definition: qstyleoption.h:175
int sliderPosition
the position of the slider handle
Definition: qstyleoption.h:713
int minimum
the minimum value for the progress bar
Definition: qstyleoption.h:402
The QRegion class specifies a clip region for a painter.
Definition: qregion.h:68
The QStyleOptionTabBarBase class is used to describe the base of a tab bar, i.e.
Definition: qstyleoption.h:218
int version
the version of the style hint return container
Definition: qstyleoption.h:919
MenuItemType menuItemType
the type of menu item
Definition: qstyleoption.h:445
bool opaque
whether the rubber band is required to be drawn in an opaque style
Definition: qstyleoption.h:676
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
Definition: qstyleoption.h:84
int lineWidth
the line width for drawing the panel
Definition: qstyleoption.h:181
int treeStepSize
the number of pixel to offset children items from their parents
Definition: qstyleoption.h:758
The QStyleOptionRubberBand class is used to describe the parameters needed for drawing a rubber band...
Definition: qstyleoption.h:669
QStyleOptionViewItem(const QStyleOptionViewItem &other)
Constructs a copy of the other style option.
Definition: qstyleoption.h:556
QStyleOptionGraphicsItem(const QStyleOptionGraphicsItem &other)
Constructs a copy of other.
Definition: qstyleoption.h:878
#define None
QSize rightButtonSize
the size for the right widget on the tab.
Definition: qstyleoption.h:353
QIcon icon
the icon of the header
Definition: qstyleoption.h:265
ToolBarArea
Definition: qnamespace.h:1353
Corner
Definition: qnamespace.h:1456
QStyleOptionGroupBox(const QStyleOptionGroupBox &other)
Constructs a copy of the other style option.
Definition: qstyleoption.h:848
bool floatable
whether the dock window is floatable
Definition: qstyleoption.h:513
bool documentMode
whether the tabbar is in document mode.
Definition: qstyleoption.h:351
ViewItemPosition viewItemPosition
Gives the position of this view item relative to other items.
Definition: qstyleoption.h:619
The QStyleOptionTabBarBaseV2 class is used to describe the base of a tab bar, i.e.
Definition: qstyleoption.h:235
QPalette palette
the palette that should be used when painting the control
Definition: qstyleoption.h:92
The QBrush class defines the fill pattern of shapes drawn by QPainter.
Definition: qbrush.h:76
SectionPosition position
the section&#39;s position in relation to the other sections
Definition: qstyleoption.h:267
QAbstractSpinBox::ButtonSymbols buttonSymbols
the type of button symbols to draw for the spin box
Definition: qstyleoption.h:735
The QStyleHintReturnMask class provides style hints that return a QRegion.
Definition: qstyleoption.h:923
bool textVisible
a flag indicating whether or not text is visible
Definition: qstyleoption.h:407
ViewItemFeature
This enum describes the different types of features an item can have.
Definition: qstyleoption.h:567
int maximum
the maximum value for the slider
Definition: qstyleoption.h:709
ToolBarFeature
This enum is used to describe whether a toolbar is movable or not.
Definition: qstyleoption.h:375
ButtonFeature
This enum describes the different types of features a push button can have.
Definition: qstyleoption.h:285
QStyleOptionTabBarBase(const QStyleOptionTabBarBase &other)
Constructs a copy of other.
Definition: qstyleoption.h:229
const QWidget * widget
Definition: qstyleoption.h:596
int midLineWidth
the mid-line width for drawing the panel
Definition: qstyleoption.h:845
Qt::Alignment iconAlignment
the alignment flags for the icon of the header
Definition: qstyleoption.h:266
SelectedPosition selectedPosition
the section&#39;s position in relation to the selected section
Definition: qstyleoption.h:268
State
Definition: qaudio.h:59
The QFont class specifies a font used for drawing text.
Definition: qfont.h:64
SectionPosition
This enum lets you know where the section&#39;s position is in relation to the other sections.
Definition: qstyleoption.h:257
QMatrix matrix
the complete transformation matrix for the item
Definition: qstyleoption.h:874
int midLineWidth
the mid-line width for drawing the frame
Definition: qstyleoption.h:125
SortIndicator
Indicates which direction the sort indicator should be drawn.
Definition: qstyleoption.h:260
QSize rightCornerWidgetSize
the size of the right-corner widget
Definition: qstyleoption.h:185
QStyleOptionProgressBar(const QStyleOptionProgressBar &other)
Constructs a copy of the other style option.
Definition: qstyleoption.h:410
int lineWidth
the line width for drawing the panel
Definition: qstyleoption.h:844
int minimum
the minimum value for the slider
Definition: qstyleoption.h:708
int tabWidth
the tab width for the menu item
Definition: qstyleoption.h:453
The QStyleOptionFrameV3 class is used to describe the parameters necessary for drawing a frame in Qt ...
Definition: qstyleoption.h:157
QRect selectedTabRect
the rectangle containing the selected tab
Definition: qstyleoption.h:226
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
Definition: qstyleoption.h:913
QModelIndex index
The model index that is to be drawn.
Definition: qstyleoption.h:615
TabPosition
This enum describes tab positions relative to other tabs.
Definition: qstyleoption.h:653
Qt::Alignment displayAlignment
the alignment of the display value for the item
Definition: qstyleoption.h:547
static const QStyle::SubControl SubControls[]
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
The QModelIndex class is used to locate data in a data model.
QSize decorationSize
the size of the decoration for the item
Definition: qstyleoption.h:551
QStyleOptionTabWidgetFrameV2(const QStyleOptionTabWidgetFrameV2 &other)
Constructs a QStyleOptionTabWidgetFrameV2 copy of the other style option.
Definition: qstyleoption.h:205
OptionType
This enum is used internally by QStyleOption, its subclasses, and qstyleoption_cast() to determine th...
Definition: qstyleoption.h:70
The QStyleOptionGroupBox class describes the parameters for drawing a group box.
Definition: qstyleoption.h:834
The QStyleOptionComboBox class is used to describe the parameter for drawing a combobox.
Definition: qstyleoption.h:796
QSize iconSize
the size for the icons
Definition: qstyleoption.h:337
The QStyleOptionTabV3 class is used to describe the parameters necessary for drawing a tabs in Qt 4...
Definition: qstyleoption.h:347
Qt::LayoutDirection direction
the text layout direction that should be used when drawing text in the control
Definition: qstyleoption.h:89
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
SelectedPosition
This enum describes the position of the selected tab.
Definition: qstyleoption.h:654
Definition: qnamespace.h:54
QTabBar::Shape shape
the shape of the tab bar
Definition: qstyleoption.h:224
QRubberBand::Shape shape
the shape of the rubber band
Definition: qstyleoption.h:675
The QStyleOptionFrameV2 class is used to describe the parameters necessary for drawing a frame in Qt ...
Definition: qstyleoption.h:134
CheckType checkType
the type of checkmark of the menu item
Definition: qstyleoption.h:446
Q3ListViewItemFeature
This enum describes the features a list view item can have.
Definition: qstyleoption.h:469
QString title
the title of the dock window
Definition: qstyleoption.h:510
Qt::Orientation orientation
the slider&#39;s orientation (horizontal or vertical)
Definition: qstyleoption.h:707
The QStyleOptionTab class is used to describe the parameters for drawing a tab bar.
Definition: qstyleoption.h:304
bool docked
whether the dock window is currently docked
Definition: qstyleoption.h:494
MenuItemType
This enum indicates the type of menu item that the structure describes.
Definition: qstyleoption.h:441
FrameFeature
This enum describes the different types of features a frame can have.
Definition: qstyleoption.h:138
QColor textColor
the color of the group box title
Definition: qstyleoption.h:843
QPalette::ColorRole viewportBGRole
the background role of Q3ListView&#39;s viewport
Definition: qstyleoption.h:755
The QStyleOptionSlider class is used to describe the parameters needed for drawing a slider...
Definition: qstyleoption.h:701
int pageStep
the size of the page step of the slider
Definition: qstyleoption.h:716
QStyleOptionMenuItem(const QStyleOptionMenuItem &other)
Constructs a copy of the other style option.
Definition: qstyleoption.h:457
int singleStep
the size of the single step of the slider
Definition: qstyleoption.h:715
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:53
ToolButtonStyle
Definition: qnamespace.h:1572
int section
which section of the header is being painted
Definition: qstyleoption.h:262
Qt::WindowFlags titleBarFlags
the widget flags for the title bar
Definition: qstyleoption.h:825
The QStyleOptionComplex class is used to hold parameters that are common to all complex controls...
Definition: qstyleoption.h:687
The QStyleOptionViewItem class is used to describe the parameters used to draw an item in a view widg...
Definition: qstyleoption.h:539
QRegion region
the region for style hints that return a QRegion
Definition: qstyleoption.h:930
QStyleOptionComboBox(const QStyleOptionComboBox &other)
Constructs a copy of the other style option.
Definition: qstyleoption.h:810
QRect popupRect
the popup rectangle for the combobox
Definition: qstyleoption.h:803
The QStyleOptionProgressBar class is used to describe the parameters necessary for drawing a progress...
Definition: qstyleoption.h:396
QSize leftButtonSize
the size for the left widget on the tab.
Definition: qstyleoption.h:352
SelectedPosition
This enum lets you know where the section&#39;s position is in relation to the selected section...
Definition: qstyleoption.h:258
QRectF exposedRect
the exposed rectangle, in item coordinates
Definition: qstyleoption.h:873
#define class
bool invertedAppearance
whether the progress bar&#39;s appearance is inverted
Definition: qstyleoption.h:423
int titleBarState
the state of the title bar
Definition: qstyleoption.h:824
Orientation
Definition: qnamespace.h:174
#define QT_END_HEADER
Definition: qglobal.h:137
QStyleOptionHeader(const QStyleOptionHeader &other)
Constructs a copy of the other style option.
Definition: qstyleoption.h:273
QStyleOptionFrameV3(const QStyleOptionFrameV3 &other)
Constructs a QStyleOptionFrameV3 copy of the other style option.
Definition: qstyleoption.h:165
The QStyleOptionGraphicsItem class is used to describe the parameters needed to draw a QGraphicsItem...
Definition: qstyleoption.h:867
The QStyleOptionButton class is used to describe the parameters for drawing buttons.
Definition: qstyleoption.h:279
virtual IFMETHOD End(void)=0
The QStyleOptionTabWidgetFrameV2 class is used to describe the parameters for drawing the frame aroun...
Definition: qstyleoption.h:196
QRect rect
the area that should be used for various calculations and painting
Definition: qstyleoption.h:90
QStyle::SubControls subControls
This variable holds a bitwise OR of the sub-controls to be drawn for the complex control.
Definition: qstyleoption.h:693
QStyleOptionQ3ListView(const QStyleOptionQ3ListView &other)
Constructs a copy of the other style option.
Definition: qstyleoption.h:762
QVariant variant
the variant for style hints that return a QVariant
Definition: qstyleoption.h:940
QTabBar::Shape shape
the tab shape used to draw the tabs
Definition: qstyleoption.h:183
QStyleOptionFocusRect(const QStyleOptionFocusRect &other)
Constructs a copy of the other style option.
Definition: qstyleoption.h:112
QStyleOptionComplex(const QStyleOptionComplex &other)
Constructs a copy of the other style option.
Definition: qstyleoption.h:697
#define text
Definition: qobjectdefs.h:80
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
Definition: qstyleoption.h:83
ArrowType
Definition: qnamespace.h:1126
QString text
The text (if any) to be drawn in the view item.
Definition: qstyleoption.h:618
The QTransform class specifies 2D transformations of a coordinate system.
Definition: qtransform.h:65
The QPalette class contains color groups for each widget state.
Definition: qpalette.h:61
The QIcon class provides scalable icons in different modes and states.
Definition: qicon.h:60