42 #ifndef QSTYLEOPTION_H 43 #define QSTYLEOPTION_H 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> 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,
76 SO_Complex = 0xf0000, SO_Slider, SO_SpinBox,
SO_ToolButton, SO_ComboBox,
79 SO_CustomBase = 0xf00,
80 SO_ComplexCustomBase = 0xf000000
143 FrameFeatures features;
174 #ifndef QT_NO_TABWIDGET 259 NextAndPreviousAreSelected };
286 AutoDefaultButton = 0x08, CommandLinkButton = 0x10 };
289 ButtonFeatures features;
313 RightCornerWidget = 0x02 };
322 CornerWidgets cornerWidgets;
367 #ifndef QT_NO_TOOLBAR 380 ToolBarFeatures features;
470 ParentControl = 0x08 };
473 Q3ListViewItemFeatures features;
571 HasCheckIndicator = 0x04,
577 ViewItemFeatures features;
608 #ifndef QT_NO_ITEMVIEWS 668 #ifndef QT_NO_RUBBERBAND 684 #endif // QT_NO_RUBBERBAND 726 #endif // QT_NO_SLIDER 728 #ifndef QT_NO_SPINBOX 745 #endif // QT_NO_SPINBOX 778 ToolButtonFeatures features;
879 static qreal levelOfDetailFromTransform(
const QTransform &worldTransform);
884 template <
typename T>
887 if (opt && opt->
version >= static_cast<T>(0)->Version && (opt->
type == static_cast<T>(0)->Type
891 return static_cast<T
>(opt);
895 template <
typename T>
898 if (opt && opt->
version >= static_cast<T>(0)->Version && (opt->
type == static_cast<T>(0)->Type
902 return static_cast<T
>(opt);
910 SH_Default=0xf000, SH_Mask, SH_Variant
943 template <
typename T>
946 if (hint && hint->
version <= static_cast<T>(0)->Version &&
948 return static_cast<T
>(hint);
952 template <
typename T>
955 if (hint && hint->
version <= static_cast<T>(0)->Version &&
957 return static_cast<T
>(hint);
961 #if !defined(QT_NO_DEBUG_STREAM) 970 #endif // QSTYLEOPTION_H The QVariant class acts like a union for the most common Qt data types.
QStyleOptionViewItemV3 & operator=(const QStyleOptionViewItem &other)
Assigns the other style option to this style option.
int version
the version of the style option
QPalette viewportPalette
the palette of Q3ListView's viewport
qreal notchTarget
the number of pixel between notches
The QDebug class provides an output stream for debugging information.
The QColor class provides colors based on RGB, HSV or CMYK values.
QString text
the text of the group box
QStyleOptionSlider(const QStyleOptionSlider &other)
Constructs a copy of the other style option.
QStyleOptionRubberBand(const QStyleOptionRubberBand &other)
Constructs a copy of the other style option.
QString text
the text for the progress bar
The QStyleHintReturnVariant class provides style hints that return a QVariant.
TabPosition
This enum describes the position of the tab.
QFont font
the font used for the item
Qt::Alignment decorationAlignment
the alignment of the decoration for the item
The QStyleHintReturn class provides style hints that return more than basic data types.
bool rootIsDecorated
whether root items are decorated
int type
the option type of the style option
The QFontMetrics class provides font metrics information.
#define QT_END_NAMESPACE
This macro expands to.
QStyleOptionFrame(const QStyleOptionFrame &other)
Constructs a copy of the other style option.
QSize iconSize
the icon size for the current item of the combo box
int sliderValue
the value of the slider
int maximum
the maximum value for the progress bar
QStyleOptionViewItemV3(const QStyleOptionViewItemV3 &other)
Constructs a copy of other.
ColorRole
The ColorRole enum defines the different symbolic color roles used in current GUIs.
bool frame
whether the combo box has a frame
int itemMargin
the margin for items in the list view
The QStyleOptionTabV2 class is used to describe the parameters necessary for drawing a tabs in Qt 4...
#define Q_DECLARE_FLAGS(Flags, Enum)
The Q_DECLARE_FLAGS() macro expands to.
int type
the type of the style hint container
The QMatrix class specifies 2D transformations of a coordinate system.
QIcon icon
The icon (if any) to be drawn in the view item.
QStyleOptionTabV2(const QStyleOptionTabV2 &other)
Constructs a copy of the other style option.
QStyle::State state
the style flags that are used when drawing the control
CornerWidget
These flags indicate the corner widgets in a tab.
QStyleOptionSpinBox(const QStyleOptionSpinBox &other)
Constructs a copy of the other style option.
QIcon icon
the icon for the title bar
The QStyleOptionQ3ListView class is used to describe the parameters for drawing a Q3ListView...
QString currentText
the text for the current item of the combo box
QStyleOptionTitleBar(const QStyleOptionTitleBar &other)
Constructs a copy of the other style option.
SelectedPosition
This enum describes the position of the selected tab.
QBrush backgroundBrush
The QBrush that should be used to paint the view items background.
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.
Qt::Orientation orientation
the progress bar's orientation (horizontal or vertical); the default orentation is Qt::Horizontal ...
QStyleOptionFrameV2::FrameFeatures features
the features of the group box frame
The QStyleOptionTitleBar class is used to describe the parameters for drawing a title bar...
static qreal position(QGraphicsObject *item, QDeclarativeAnchorLine::AnchorLine anchorLine)
The QStyleOptionViewItemV4 class is used to describe the parameters necessary for drawing a frame in ...
Position decorationPosition
the position of the decoration for the item
Q_GUI_EXPORT QDebug operator<<(QDebug debug, const QStyleOption::OptionType &optionType)
int tickInterval
the interval that should be drawn between tick marks
QIcon currentIcon
the icon for the current item of the combo box
Qt::TextElideMode textElideMode
where ellipsis should be added for text that is too long to fit into an item
Position
This enum describes the position of the item's decoration.
bool bottomToTop
whether the text reads from bottom to top when the progress bar is vertical
QAbstractSpinBox::StepEnabled stepEnabled
which buttons of the spin box that are enabled
QString text
the text of the title bar
QSlider::TickPosition tickPosition
the position of the slider's tick marks, if any
TickPosition
This enum specifies where the tick marks are to be drawn relative to the slider's groove and the hand...
The QTabBar class provides a tab bar, e.g.
QStyle::SubControls activeSubControls
This variable holds a bitwise OR of the sub-controls that are active for the complex control...
QStyleOptionViewItemV4(const QStyleOptionViewItemV4 &other)
Constructs a copy of other.
qreal levelOfDetail
Use QStyleOptionGraphicsItem::levelOfDetailFromTransform() together with QPainter::worldTransform() i...
bool editable
whether or not the combobox is editable or not
The QString class provides a Unicode character string.
QFontMetrics fontMetrics
the font metrics that should be used when drawing text in the control
ViewItemPosition
This enum is used to represent the placement of the item on a row.
Qt::Alignment textAlignment
the alignment of the group box title
QStyleOptionTabV3(const QStyleOptionTabV2 &other)
Constructs a copy of the other style option.
Qt::Corner corner
The corner in which the size grip is located.
The QStyleOptionSizeGrip class is used to describe the parameter for drawing a size grip...
Shape
This enum type defines the shapes of frame available.
ButtonSymbols
This enum type describes the symbols that can be displayed on the buttons in a spin box...
Shape
This enum specifies what shape a QRubberBand should have.
bool frame
whether the spin box has a frame
QList< QStyleOptionQ3ListViewItem > items
a list of items in the Q3ListView
QStyleOptionTabV3(const QStyleOptionTabV3 &other)
Constructs a copy of the other style option.
T qstyleoption_cast(const QStyleOption *option)
QRect tabBarRect
the rectangle containing all the tabs
bool dialWrapping
whether the dial should wrap or not
The QStyleOptionViewItemV2 class is used to describe the parameters necessary for drawing a frame in ...
QColor backgroundColor
the background color on which the focus rectangle is being drawn
int sortColumn
the sort column of the list view
bool closeEnabled
whether the dock window has a close button
bool upsideDown
the slider control orientation
int lineWidth
the line width for drawing the frame
The QStyleOptionProgressBarV2 class is used to describe the parameters necessary for drawing a progre...
QStyleOptionTabBarBaseV2(const QStyleOptionTabBarBaseV2 &other)
Constructs a copy of other.
#define QT_BEGIN_NAMESPACE
This macro expands to.
QStyleOption & operator=(const QStyleOption &other)
Assign other to this QStyleOption.
The QRectF class defines a rectangle in the plane using floating point precision. ...
The QStyleOptionViewItemV3 class is used to describe the parameters necessary for drawing a frame in ...
Shape
This enum type lists the built-in shapes supported by QTabBar.
The QStyleOptionQ3ListViewItem class is used to describe an item drawn in a Q3ListView.
bool documentMode
whether the tabbar is in document mode.
QStyleOptionSizeGrip(const QStyleOptionSizeGrip &other)
Constructs a copy of the other style option.
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
The Q_DECLARE_OPERATORS_FOR_FLAGS() macro declares global operator|() functions for Flags...
The QStyleOption class stores the parameters used by QStyle functions.
The QStyleOptionSpinBox class is used to describe the parameters necessary for drawing a spin box...
void initFrom(const QWidget *w)
T qstyleoption_cast(const QStyleHintReturn *hint)
The QStyleOptionQ3DockWindow class is used to describe the parameters for drawing various parts of a ...
int progress
the current progress for the progress bar
The QStyleOptionFocusRect class is used to describe the parameters for drawing a focus rectangle with...
bool showDecorationSelected
whether the decoration should be highlighted on selected items
The QStyleOptionFrame class is used to describe the parameters for drawing a frame.
Qt::CheckState checkState
If this view item is checkable, i.
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
QStyleOptionQ3DockWindow(const QStyleOptionQ3DockWindow &other)
Constructs a copy of the other style option.
Qt::Alignment textAlignment
the text alignment for the text in the QProgressBar
int sliderPosition
the position of the slider handle
int minimum
the minimum value for the progress bar
The QRegion class specifies a clip region for a painter.
The QStyleOptionTabBarBase class is used to describe the base of a tab bar, i.e.
int version
the version of the style hint return container
bool opaque
whether the rubber band is required to be drawn in an opaque style
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
int treeStepSize
the number of pixel to offset children items from their parents
The QStyleOptionRubberBand class is used to describe the parameters needed for drawing a rubber band...
QStyleOptionViewItem(const QStyleOptionViewItem &other)
Constructs a copy of the other style option.
QStyleOptionGraphicsItem(const QStyleOptionGraphicsItem &other)
Constructs a copy of other.
QSize rightButtonSize
the size for the right widget on the tab.
QStyleOptionGroupBox(const QStyleOptionGroupBox &other)
Constructs a copy of the other style option.
bool documentMode
whether the tabbar is in document mode.
ViewItemPosition viewItemPosition
Gives the position of this view item relative to other items.
The QStyleOptionTabBarBaseV2 class is used to describe the base of a tab bar, i.e.
QPalette palette
the palette that should be used when painting the control
The QBrush class defines the fill pattern of shapes drawn by QPainter.
QAbstractSpinBox::ButtonSymbols buttonSymbols
the type of button symbols to draw for the spin box
The QStyleHintReturnMask class provides style hints that return a QRegion.
bool textVisible
a flag indicating whether or not text is visible
ViewItemFeature
This enum describes the different types of features an item can have.
int maximum
the maximum value for the slider
QStyleOptionTabBarBase(const QStyleOptionTabBarBase &other)
Constructs a copy of other.
int midLineWidth
the mid-line width for drawing the panel
The QFont class specifies a font used for drawing text.
QMatrix matrix
the complete transformation matrix for the item
int midLineWidth
the mid-line width for drawing the frame
QStyleOptionProgressBar(const QStyleOptionProgressBar &other)
Constructs a copy of the other style option.
int lineWidth
the line width for drawing the panel
int minimum
the minimum value for the slider
The QStyleOptionFrameV3 class is used to describe the parameters necessary for drawing a frame in Qt ...
QRect selectedTabRect
the rectangle containing the selected tab
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
QModelIndex index
The model index that is to be drawn.
Qt::Alignment displayAlignment
the alignment of the display value for the item
static const QStyle::SubControl SubControls[]
The QPoint class defines a point in the plane using integer precision.
The QModelIndex class is used to locate data in a data model.
QSize decorationSize
the size of the decoration for the item
OptionType
This enum is used internally by QStyleOption, its subclasses, and qstyleoption_cast() to determine th...
The QStyleOptionGroupBox class describes the parameters for drawing a group box.
The QStyleOptionComboBox class is used to describe the parameter for drawing a combobox.
QSize iconSize
the size for the icons
The QStyleOptionTabV3 class is used to describe the parameters necessary for drawing a tabs in Qt 4...
Qt::LayoutDirection direction
the text layout direction that should be used when drawing text in the control
The QRect class defines a rectangle in the plane using integer precision.
QTabBar::Shape shape
the shape of the tab bar
QRubberBand::Shape shape
the shape of the rubber band
The QStyleOptionFrameV2 class is used to describe the parameters necessary for drawing a frame in Qt ...
Q3ListViewItemFeature
This enum describes the features a list view item can have.
Qt::Orientation orientation
the slider's orientation (horizontal or vertical)
The QStyleOptionTab class is used to describe the parameters for drawing a tab bar.
bool docked
whether the dock window is currently docked
FrameFeature
This enum describes the different types of features a frame can have.
QColor textColor
the color of the group box title
QPalette::ColorRole viewportBGRole
the background role of Q3ListView's viewport
The QStyleOptionSlider class is used to describe the parameters needed for drawing a slider...
int pageStep
the size of the page step of the slider
int singleStep
the size of the single step of the slider
The QSize class defines the size of a two-dimensional object using integer point precision.
Qt::WindowFlags titleBarFlags
the widget flags for the title bar
The QStyleOptionComplex class is used to hold parameters that are common to all complex controls...
The QStyleOptionViewItem class is used to describe the parameters used to draw an item in a view widg...
QRegion region
the region for style hints that return a QRegion
QStyleOptionComboBox(const QStyleOptionComboBox &other)
Constructs a copy of the other style option.
QRect popupRect
the popup rectangle for the combobox
The QStyleOptionProgressBar class is used to describe the parameters necessary for drawing a progress...
QSize leftButtonSize
the size for the left widget on the tab.
QRectF exposedRect
the exposed rectangle, in item coordinates
bool invertedAppearance
whether the progress bar's appearance is inverted
int titleBarState
the state of the title bar
QStyleOptionFrameV3(const QStyleOptionFrameV3 &other)
Constructs a QStyleOptionFrameV3 copy of the other style option.
The QStyleOptionGraphicsItem class is used to describe the parameters needed to draw a QGraphicsItem...
virtual IFMETHOD End(void)=0
QRect rect
the area that should be used for various calculations and painting
QStyle::SubControls subControls
This variable holds a bitwise OR of the sub-controls to be drawn for the complex control.
QStyleOptionQ3ListView(const QStyleOptionQ3ListView &other)
Constructs a copy of the other style option.
QVariant variant
the variant for style hints that return a QVariant
QStyleOptionFocusRect(const QStyleOptionFocusRect &other)
Constructs a copy of the other style option.
QStyleOptionComplex(const QStyleOptionComplex &other)
Constructs a copy of the other style option.
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
QString text
The text (if any) to be drawn in the view item.
The QPalette class contains color groups for each widget state.
The QIcon class provides scalable icons in different modes and states.