Qt 4.8
|
The QStyleOption class stores the parameters used by QStyle functions. More...
#include <qstyleoption.h>
Public Types | |
enum | OptionType { SO_Default, SO_FocusRect, SO_Button, SO_Tab, SO_MenuItem, SO_Frame, SO_ProgressBar, SO_ToolBox, SO_Header, SO_Q3DockWindow, SO_DockWidget, SO_Q3ListViewItem, SO_ViewItem, SO_TabWidgetFrame, SO_TabBarBase, SO_RubberBand, SO_ToolBar, SO_GraphicsItem, SO_Complex = 0xf0000, SO_Slider, SO_SpinBox, SO_ToolButton, SO_ComboBox, SO_Q3ListView, SO_TitleBar, SO_GroupBox, SO_SizeGrip, SO_CustomBase = 0xf00, SO_ComplexCustomBase = 0xf000000 } |
This enum is used internally by QStyleOption, its subclasses, and qstyleoption_cast() to determine the type of style option. More... | |
enum | StyleOptionType { Type = SO_Default } |
This enum is used to hold information about the type of the style option, and is defined for each QStyleOption subclass. More... | |
enum | StyleOptionVersion { Version = 1 } |
This enum is used to hold information about the version of the style option, and is defined for each QStyleOption subclass. More... | |
Public Functions | |
void | init (const QWidget *w) |
Use initFrom(widget) instead. More... | |
void | initFrom (const QWidget *w) |
QStyleOption & | operator= (const QStyleOption &other) |
Assign other to this QStyleOption. More... | |
QStyleOption (int version=QStyleOption::Version, int type=SO_Default) | |
Constructs a QStyleOption with the specified version and type. More... | |
QStyleOption (const QStyleOption &other) | |
Constructs a copy of other. More... | |
~QStyleOption () | |
Destroys this style option object. More... | |
Public Variables | |
Qt::LayoutDirection | direction |
the text layout direction that should be used when drawing text in the control More... | |
QFontMetrics | fontMetrics |
the font metrics that should be used when drawing text in the control More... | |
QPalette | palette |
the palette that should be used when painting the control More... | |
QRect | rect |
the area that should be used for various calculations and painting More... | |
QStyle::State | state |
the style flags that are used when drawing the control More... | |
int | type |
the option type of the style option More... | |
int | version |
the version of the style option More... | |
Related Functions | |
(Note that these are not member functions.) | |
T | qstyleoption_cast (const QStyleOption *option) |
T | qstyleoption_cast (QStyleOption *option) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
The QStyleOption class stores the parameters used by QStyle functions.
QStyleOption and its subclasses contain all the information that QStyle functions need to draw a graphical element.
For performance reasons, there are few member functions and the access to the member variables is direct (i.e., using the . or
->
operator). This low-level feel makes the structures straightforward to use and emphasizes that these are simply parameters used by the style functions.
The caller of a QStyle function usually creates QStyleOption objects on the stack. This combined with Qt's extensive use of implicit sharing for types such as QString, QPalette, and QColor ensures that no memory allocation needlessly takes place.
The following code snippet shows how to use a specific QStyleOption subclass to paint a push button:
In our example, the control is a QStyle::CE_PushButton, and according to the QStyle::drawControl() documentation the corresponding class is QStyleOptionButton.
When reimplementing QStyle functions that take a QStyleOption parameter, you often need to cast the QStyleOption to a subclass. For safety, you can use qstyleoption_cast() to ensure that the pointer type is correct. For example:
The qstyleoption_cast() function will return 0 if the object to which option
points is not of the correct type.
For an example demonstrating how style options can be used, see the widgets/styles{Styles} example.
Definition at line 67 of file qstyleoption.h.
This enum is used internally by QStyleOption, its subclasses, and qstyleoption_cast() to determine the type of style option.
In general you do not need to worry about this unless you want to create your own QStyleOption subclass and your own styles.
The following values are used for custom controls:
Some style options are defined for various Qt3Support controls:
Definition at line 70 of file qstyleoption.h.
This enum is used to hold information about the type of the style option, and is defined for each QStyleOption subclass.
The type is used internally by QStyleOption, its subclasses, and qstyleoption_cast() to determine the type of style option. In general you do not need to worry about this unless you want to create your own QStyleOption subclass and your own styles.
Enumerator | |
---|---|
Type |
Definition at line 83 of file qstyleoption.h.
This enum is used to hold information about the version of the style option, and is defined for each QStyleOption subclass.
The version is used by QStyleOption subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast(), you normally do not need to check it.
Enumerator | |
---|---|
Version |
Definition at line 84 of file qstyleoption.h.
QStyleOption::QStyleOption | ( | int | version = QStyleOption::Version , |
int | type = SO_Default |
||
) |
Constructs a QStyleOption with the specified version and type.
The version has no special meaning for QStyleOption; it can be used by subclasses to distinguish between different version of the same option type.
The state member variable is initialized to QStyle::State_None.
Definition at line 167 of file qstyleoption.cpp.
QStyleOption::QStyleOption | ( | const QStyleOption & | other | ) |
Constructs a copy of other.
Definition at line 249 of file qstyleoption.cpp.
QStyleOption::~QStyleOption | ( | ) |
void QStyleOption::init | ( | const QWidget * | widget | ) |
Use initFrom(widget) instead.
Definition at line 203 of file qstyleoption.cpp.
Referenced by QFrame::drawFrame(), QMenuBar::heightForWidth(), QTabBarPrivate::initStyleBaseOption(), QAbstractScrollAreaPrivate::layoutChildren(), QTabBar::mouseMoveEvent(), QCalendarPopup::mousePressEvent(), QTabBar::mousePressEvent(), QDateTimeEditPrivate::newHoverControl(), QAbstractItemViewPrivate::paintDropIndicator(), QSizeGrip::paintEvent(), QDockWidget::paintEvent(), QDockWidgetTitleButton::paintEvent(), QTipLabel::paintEvent(), QComboBoxPrivateScroller::paintEvent(), QDateTimeEdit::paintEvent(), QHeaderView::paintEvent(), CloseButton::paintEvent(), QTableCornerButton::paintEvent(), QAccessibleToolButton::rect(), QTipLabel::resizeEvent(), QToolBarExtension::setOrientation(), QSizeGrip::sizeHint(), QMenu::sizeHint(), QSplitterHandle::sizeHint(), QMenuPrivate::updateActionRects(), QDateTimeEditPrivate::updateEditFieldGeometry(), and QAbstractItemView::viewOptions().
|
inline |
Initializes the state , direction , rect , palette , and fontMetrics member variables based on the specified widget.
This is a convenience function; the member variables can also be initialized manually.
Definition at line 99 of file qstyleoption.h.
Referenced by QComboBoxPrivateContainer::comboStyleOption(), QPlastiqueStylePrivate::drawPartialFrame(), QAbstractScrollArea::event(), QMenu::event(), QMdi::ControlLabel::event(), QGridLayoutEngine::fillRowData(), QTextControl::getPaintContext(), QFocusFrame::initStyleOption(), QRadioButton::initStyleOption(), QToolBarSeparator::initStyleOption(), QScrollBar::initStyleOption(), QToolBoxButton::initStyleOption(), QCheckBox::initStyleOption(), QRubberBand::initStyleOption(), QDial::initStyleOption(), QMDIControl::initStyleOption(), QPushButton::initStyleOption(), QGroupBox::initStyleOption(), QSlider::initStyleOption(), QProgressBar::initStyleOption(), QDockWidget::initStyleOption(), QToolButton::initStyleOption(), QToolBar::initStyleOption(), QAbstractSpinBox::initStyleOption(), QTabWidget::initStyleOption(), QMenu::initStyleOption(), QTabBar::initStyleOption(), QHeaderView::initStyleOption(), QLineEdit::initStyleOption(), QWorkspaceTitleBar::initStyleOption(), QComboBox::initStyleOption(), QMdi::ControllerWidget::initStyleOption(), QTreeViewPrivate::itemDecorationRect(), QAbstractScrollArea::minimumSizeHint(), QTabBar::mouseReleaseEvent(), QWidgetPrivate::paintBackground(), QColumnViewGrip::paintEvent(), QStatusBar::paintEvent(), QComboBoxListView::paintEvent(), QMdiSubWindow::paintEvent(), QLabel::paintEvent(), QListView::paintEvent(), QMenu::paintEvent(), QGraphicsView::paintEvent(), QLayoutStyleInfo::QLayoutStyleInfo(), QMdi::SimpleCascader::rearrange(), QAccessibleDoubleSpinBox::rect(), QAccessibleComboBox::rect(), QComboBoxPrivateContainer::resizeEvent(), QGraphicsViewPrivate::rubberBandRegion(), QWidgetPrivate::setLayoutItemMargins(), QLabelPrivate::sizeForWidth(), QMacStyle::sizeFromContents(), QGridLayoutEngine::spacing(), QMdiSubWindowPrivate::titleBarOptions(), and QFramePrivate::updateStyledFrameWidths().
QStyleOption & QStyleOption::operator= | ( | const QStyleOption & | other | ) |
Assign other to this QStyleOption.
Definition at line 259 of file qstyleoption.cpp.
Referenced by QStyleOptionFrameV2::operator=(), QStyleOptionTabWidgetFrameV2::operator=(), QStyleOptionTabBarBaseV2::operator=(), QStyleOptionTabV2::operator=(), QStyleOptionProgressBarV2::operator=(), QStyleOptionDockWidgetV2::operator=(), QStyleOptionViewItemV2::operator=(), QStyleOptionToolBoxV2::operator=(), QStyleOptionDockWidgetV2::QStyleOptionDockWidgetV2(), QStyleOptionFrameV2::QStyleOptionFrameV2(), QStyleOptionFrameV3::QStyleOptionFrameV3(), QStyleOptionTabBarBaseV2::QStyleOptionTabBarBaseV2(), QStyleOptionTabV2::QStyleOptionTabV2(), QStyleOptionTabWidgetFrameV2::QStyleOptionTabWidgetFrameV2(), QStyleOptionToolBoxV2::QStyleOptionToolBoxV2(), QStyleOptionViewItemV2::QStyleOptionViewItemV2(), and QStyleOptionViewItemV3::QStyleOptionViewItemV3().
|
related |
Returns a T or 0 depending on the type and version of the given option.
Example:
Definition at line 885 of file qstyleoption.h.
Referenced by QStyleOptionFrameV2::operator=(), QStyleOptionFrameV3::operator=(), QStyleOptionTabBarBaseV2::operator=(), QStyleOptionProgressBarV2::operator=(), QStyleOptionDockWidgetV2::operator=(), QStyleOptionViewItemV2::operator=(), QStyleOptionViewItemV3::operator=(), QStyleOptionToolBoxV2::operator=(), QStyleOptionFrameV2::QStyleOptionFrameV2(), QStyleOptionProgressBarV2::QStyleOptionProgressBarV2(), and QStyleOptionToolBoxV2::QStyleOptionToolBoxV2().
|
related |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns a T or 0 depending on the type of the given option.
Definition at line 896 of file qstyleoption.h.
QStyleOption::direction |
the text layout direction that should be used when drawing text in the control
By default, the layout direction is Qt::LeftToRight.
Definition at line 89 of file qstyleoption.h.
Referenced by QComboBox::changeEvent(), QItemDelegate::doLayout(), QWindowsVistaStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), QGtkStyle::drawComplexControl(), QMotifStyle::drawComplexControl(), QStyleSheetStyle::drawComplexControl(), QCommonStyle::drawControl(), QWindowsCEStyle::drawControl(), QWindowsVistaStyle::drawControl(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QWindowsXPStyle::drawControl(), QWindowsStyle::drawControl(), QGtkStyle::drawControl(), QMotifStyle::drawControl(), QMacStyle::drawControl(), QStyleSheetStyle::drawControl(), QItemDelegate::drawDecoration(), QItemDelegate::drawDisplay(), QPlastiqueStylePrivate::drawPartialFrame(), QCommonStyle::drawPrimitive(), QWindowsVistaStyle::drawPrimitive(), QWindowsMobileStyle::drawPrimitive(), QPlastiqueStyle::drawPrimitive(), QWindowsXPStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), QGtkStyle::drawPrimitive(), QMacStyle::drawPrimitive(), QStyleSheetStyle::drawPrimitive(), QMacStylePrivate::getSliderInfo(), init(), QSlider::initStyleOption(), QGraphicsWidget::initStyleOption(), QCommonStylePrivate::isViewItemCached(), QAbstractScrollAreaPrivate::layoutChildren(), operator<<(), operator=(), QFontFamilyDelegate::paint(), QColumnViewDelegate::paint(), QTabBar::paintEvent(), QDecorationStyled::region(), QComboBox::showPopup(), QStyleSheetStyle::sizeFromContents(), QCommonStyle::standardIconImplementation(), QCommonStyle::standardPixmap(), QCommonStyle::styleHint(), QWindowsVistaStyle::subControlRect(), QPlastiqueStyle::subControlRect(), QWindowsXPStyle::subControlRect(), QCleanlooksStyle::subControlRect(), QGtkStyle::subControlRect(), QStyleSheetStyle::subControlRect(), QCommonStyle::subElementRect(), QWindowsVistaStyle::subElementRect(), QPlastiqueStyle::subElementRect(), QWindowsXPStyle::subElementRect(), QCleanlooksStyle::subElementRect(), QWindowsStyle::subElementRect(), QWindowsCEStyle::subElementRect(), QMacStyle::subElementRect(), QMotifStyle::subElementRect(), QGtkStyle::subElementRect(), QStyleSheetStyle::subElementRect(), QCommonStylePrivate::tabLayout(), QDecorationStyled::titleBarHeight(), QStyleSheetStyle::titleBarLayout(), QStyleHelper::uniqueName(), QCommonStylePrivate::viewItemDrawText(), and QCommonStylePrivate::viewItemLayout().
QStyleOption::fontMetrics |
the font metrics that should be used when drawing text in the control
By default, the application's default font is used.
Definition at line 91 of file qstyleoption.h.
Referenced by QItemDelegate::doLayout(), QWindowsCEStyle::drawComplexControl(), QWindowsMobileStyle::drawComplexControl(), QPlastiqueStyle::drawControl(), QItemDelegate::drawDisplay(), QComboMenuDelegate::getStyleOption(), init(), QStyledItemDelegate::initStyleOption(), QMenuBar::initStyleOption(), QMenu::initStyleOption(), QGraphicsWidget::initStyleOption(), operator=(), QScriptDebuggerLocalsItemDelegate::paint(), QFileDialogComboBox::paintEvent(), QHeaderView::paintSection(), QCommonStyle::pixelMetric(), QPlastiqueStyle::pixelMetric(), QStyleSheetStyle::pixelMetric(), QMacStylePrivate::pushButtonSizeFromContents(), QHeaderView::sectionSizeFromContents(), QItemDelegate::setOptions(), QMacStyle::sizeFromContents(), QCommonStyle::styleHint(), QStyleSheetStyle::subControlRect(), QCommonStyle::subElementRect(), QStyleSheetStyle::titleBarLayout(), QMdiSubWindowPrivate::titleBarOptions(), QMenuPrivate::updateActionRects(), and QCommonStylePrivate::viewItemLayout().
QStyleOption::palette |
the palette that should be used when painting the control
By default, the application's default palette is used.
Definition at line 92 of file qstyleoption.h.
Referenced by drawArrow(), QItemDelegate::drawBackground(), QTableViewPrivate::drawCell(), QCommonStyle::drawComplexControl(), QWindowsCEStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), QWindowsMobileStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QWindowsStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), QGtkStyle::drawComplexControl(), QMotifStyle::drawComplexControl(), QStyleSheetStyle::drawComplexControl(), QMacStyle::drawComplexControl(), QWindowsVistaStyle::drawControl(), QCommonStyle::drawControl(), QWindowsCEStyle::drawControl(), QCDEStyle::drawControl(), QWindowsMobileStyle::drawControl(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QWindowsXPStyle::drawControl(), QWindowsStyle::drawControl(), QGtkStyle::drawControl(), QMotifStyle::drawControl(), QMacStyle::drawControl(), QStyleSheetStyle::drawControl(), QItemDelegate::drawDecoration(), QStyleHelper::drawDial(), QItemDelegate::drawDisplay(), QItemDelegate::drawFocus(), QWindowsMobileStylePrivate::drawPanelItemViewSelected(), QPlastiqueStylePrivate::drawPartialFrame(), QWindowsCEStyle::drawPrimitive(), QWindowsVistaStyle::drawPrimitive(), QCommonStyle::drawPrimitive(), QWindowsMobileStyle::drawPrimitive(), QPlastiqueStyle::drawPrimitive(), QCleanlooksStyle::drawPrimitive(), QCDEStyle::drawPrimitive(), QWindowsXPStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), QGtkStyle::drawPrimitive(), QMotifStyle::drawPrimitive(), QMacStyle::drawPrimitive(), QStyleSheetStyle::drawPrimitive(), QTreeView::drawRow(), QWindowsMobileStylePrivate::drawScrollbarGrip(), QWindowsMobileStylePrivate::drawScrollbarGroove(), QWindowsMobileStylePrivate::drawScrollbarHandleDown(), QWindowsMobileStylePrivate::drawScrollbarHandleUp(), QWindowsMobileStylePrivate::drawTabBarTab(), QWindowsMobileStyle::generatedIconPixmap(), QCommonStyle::generatedIconPixmap(), QTextControl::getPaintContext(), QComboMenuDelegate::getStyleOption(), init(), QMacStylePrivate::initComboboxBdi(), QMacStylePrivate::initHIThemePushButton(), QStyledItemDelegate::initStyleOption(), QGroupBox::initStyleOption(), QMenuBar::initStyleOption(), QMenu::initStyleOption(), QGraphicsWidget::initStyleOption(), QTabBar::initStyleOption(), QMenuBar::minimumSizeHint(), QTabWidget::minimumSizeHint(), operator=(), QDecorationStyled::paint(), QFontFamilyDelegate::paint(), QScriptDebuggerLocalsItemDelegate::paint(), QComboMenuDelegate::paint(), QWellArray::paintCell(), QCommandLinkButton::paintEvent(), QStatusBar::paintEvent(), QComboBoxListView::paintEvent(), QMenuBar::paintEvent(), QLabel::paintEvent(), QListView::paintEvent(), QSplitterHandle::paintEvent(), QMenu::paintEvent(), QTabBar::paintEvent(), QWorkspaceTitleBar::paintEvent(), QWorkspaceChild::paintEvent(), QHeaderView::paintSection(), paintSep(), QGraphicsWidget::paintWindowFrame(), QSvgIconEngine::pixmap(), PixmapEntry::pixmap(), QPixmapIconEngine::pixmap(), qt_cleanlooks_draw_mdibutton(), qt_graphicsItem_highlightSelected(), qt_plastique_draw_frame(), qt_plastique_draw_handle(), qt_plastique_drawFrame(), qt_plastique_drawShadedPanel(), QItemDelegate::setOptions(), QMenuBar::sizeHint(), QWindowsMobileStyle::standardPixmap(), QCommonStyle::styleHint(), QWindowsVistaStyle::styleHint(), QCleanlooksStyle::styleHint(), QMdiSubWindowPrivate::titleBarOptions(), and QStyleHelper::uniqueName().
QStyleOption::rect |
the area that should be used for various calculations and painting
This can have different meanings for different types of elements. For example, for a QStyle::CE_PushButton element it would be the rectangle for the entire button, while for a QStyle::CE_PushButtonLabel element it would be just the area for the push button label.
The default value is a null rectangle, i.e. a rectangle with both the width and the height set to 0.
Definition at line 90 of file qstyleoption.h.
Referenced by calcArrow(), QStyleHelper::calcLines(), QStyleHelper::calcRadialPos(), QGroupBoxPrivate::calculateFrame(), QItemDelegate::check(), QItemDelegate::doLayout(), QListModeViewBase::doStaticLayout(), QTableViewPrivate::drawAndClipSpans(), drawArrow(), QItemDelegate::drawBackground(), QTreeView::drawBranches(), QItemDelegate::drawCheck(), QWindowsVistaStyle::drawComplexControl(), QWindowsCEStyle::drawComplexControl(), QCommonStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), QWindowsMobileStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QWindowsStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), QGtkStyle::drawComplexControl(), QMotifStyle::drawComplexControl(), QStyleSheetStyle::drawComplexControl(), QMacStyle::drawComplexControl(), QWindowsVistaStyle::drawControl(), QCommonStyle::drawControl(), QWindowsCEStyle::drawControl(), QCDEStyle::drawControl(), QPlastiqueStyle::drawControl(), QWindowsMobileStyle::drawControl(), QCleanlooksStyle::drawControl(), QWindowsXPStyle::drawControl(), QWindowsStyle::drawControl(), QGtkStyle::drawControl(), QMotifStyle::drawControl(), QMacStyle::drawControl(), QStyleSheetStyle::drawControl(), QStyleHelper::drawDial(), QItemDelegate::drawFocus(), QFrame::drawFrame(), QWindowsMobileStylePrivate::drawPanelItemViewSelected(), QPlastiqueStylePrivate::drawPartialFrame(), QWindowsCEStyle::drawPrimitive(), QWindowsVistaStyle::drawPrimitive(), QCommonStyle::drawPrimitive(), QWindowsMobileStyle::drawPrimitive(), QPlastiqueStyle::drawPrimitive(), QCleanlooksStyle::drawPrimitive(), QCDEStyle::drawPrimitive(), QWindowsXPStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), QGtkStyle::drawPrimitive(), QMotifStyle::drawPrimitive(), QMacStyle::drawPrimitive(), QStyleSheetStyle::drawPrimitive(), QTreeView::drawRow(), QWindowsMobileStylePrivate::drawScrollbarGrip(), QWindowsMobileStylePrivate::drawScrollbarGroove(), QWindowsMobileStylePrivate::drawScrollbarHandleDown(), QWindowsMobileStylePrivate::drawScrollbarHandleUp(), QWindowsMobileStylePrivate::drawTabBarTab(), drawTabBase(), drawTabShape(), QTreeView::drawTree(), QItemDelegate::editorEvent(), QAbstractScrollArea::event(), QMacStylePrivate::getSliderInfo(), QComboMenuDelegate::getStyleOption(), QTreeView::indexRowSizeHint(), init(), QMacStylePrivate::initComboboxBdi(), QMacStylePrivate::initHIThemePushButton(), QTabBarPrivate::initStyleBaseOption(), QDockWidget::initStyleOption(), QGraphicsWidget::initStyleOption(), QTabBar::initStyleOption(), QLineEdit::initStyleOption(), QGraphicsItemPrivate::initStyleOption(), QGraphicsWidgetPrivate::initStyleOptionTitleBar(), QCommonStylePrivate::isViewItemCached(), QTreeViewPrivate::itemDecorationRect(), QAbstractScrollAreaPrivate::layoutChildren(), QMenuBar::minimumSizeHint(), QAbstractSpinBox::minimumSizeHint(), QAbstractItemViewPrivate::openEditor(), QAbstractItemView::openPersistentEditor(), operator<<(), operator=(), QDecorationStyled::paint(), QFontFamilyDelegate::paint(), QWindowsVistaTransition::paint(), QColumnViewDelegate::paint(), QWindowsVistaPulse::paint(), QScriptDebuggerLocalsItemDelegate::paint(), QComboMenuDelegate::paint(), QComboBoxDelegate::paint(), QCalendarDelegate::paint(), QTreeViewPrivate::paintAlternatingRowColors(), QWellArray::paintCell(), QAbstractItemViewPrivate::paintDropIndicator(), QStatusBar::paintEvent(), QMenuBar::paintEvent(), QToolBar::paintEvent(), QTableView::paintEvent(), QTabWidget::paintEvent(), QListView::paintEvent(), QSplitterHandle::paintEvent(), QMenu::paintEvent(), QTabBar::paintEvent(), QHeaderView::paintEvent(), QGraphicsView::paintEvent(), QTableCornerButton::paintEvent(), QWorkspaceChild::paintEvent(), QHeaderView::paintSection(), paintSep(), QGraphicsWidget::paintWindowFrame(), QMotifStyle::pixelMetric(), QMacStylePrivate::pushButtonContentBounds(), qt_plastique_drawFrame(), qt_plastique_drawShadedPanel(), QAccessibleAbstractSpinBox::rect(), QItemDelegate::rect(), QAccessibleDoubleSpinBox::rect(), QDecorationStyled::region(), QAbstractItemViewPrivate::renderToPixmap(), QTreeViewPrivate::renderTreeToPixmapForAnimation(), QGraphicsViewPrivate::rubberBandRegion(), QAbstractItemViewPrivate::sendDelegateEvent(), QWidgetPrivate::setLayoutItemMargins(), QTabBarPrivate::setupMovableTab(), QMacStyle::sizeFromContents(), QStyleSheetStyle::sizeFromContents(), QPushButton::sizeHint(), QToolButton::sizeHint(), QMenuBar::sizeHint(), QAbstractSpinBox::sizeHint(), QDateTimeEdit::sizeHint(), QComboMenuDelegate::sizeHint(), QTableView::sizeHintForRow(), QPlastiqueStyle::styleHint(), QCommonStyle::styleHint(), QWindowsVistaStyle::styleHint(), QCleanlooksStyle::styleHint(), QWindowsXPStyle::styleHint(), QWindowsStyle::styleHint(), QMacStyle::styleHint(), QCommonStyle::subControlRect(), QWindowsVistaStyle::subControlRect(), QPlastiqueStyle::subControlRect(), QWindowsXPStyle::subControlRect(), QCleanlooksStyle::subControlRect(), QMotifStyle::subControlRect(), QMacStyle::subControlRect(), QGtkStyle::subControlRect(), QStyleSheetStyle::subControlRect(), QCommonStyle::subElementRect(), QWindowsVistaStyle::subElementRect(), QPlastiqueStyle::subElementRect(), QWindowsXPStyle::subElementRect(), QWindowsStyle::subElementRect(), QWindowsCEStyle::subElementRect(), QMacStyle::subElementRect(), QMotifStyle::subElementRect(), QGtkStyle::subElementRect(), QStyleSheetStyle::subElementRect(), QCommonStylePrivate::tabLayout(), QItemDelegatePrivate::textLayoutBounds(), QDecorationStyled::titleBarHeight(), QMdiSubWindowPrivate::titleBarHeight(), QStyleSheetStyle::titleBarLayout(), QMdiSubWindowPrivate::titleBarOptions(), QAbstractItemView::updateEditorGeometries(), QItemDelegate::updateEditorGeometry(), QMdiSubWindowPrivate::updateMask(), QWorkspaceChild::updateMask(), QFramePrivate::updateStyledFrameWidths(), QCommonStylePrivate::viewItemLayout(), QCommonStylePrivate::viewItemSize(), QListView::viewOptions(), QAbstractItemView::viewOptions(), QGraphicsWidgetPrivate::windowFrameHoverMoveEvent(), and QGraphicsWidgetPrivate::windowFrameMouseReleaseEvent().
QStyleOption::state |
the style flags that are used when drawing the control
The default value is QStyle::State_None.
Definition at line 88 of file qstyleoption.h.
Referenced by QTreeViewPrivate::adjustViewOptionsForIndex(), QMacStylePrivate::aquaSizeConstrain(), QItemDelegate::decoration(), drawArrow(), QItemDelegate::drawBackground(), QTreeView::drawBranches(), QTableViewPrivate::drawCell(), QItemDelegate::drawCheck(), QWindowsVistaStyle::drawComplexControl(), QWindowsCEStyle::drawComplexControl(), QCommonStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), QWindowsMobileStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QWindowsStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), QGtkStyle::drawComplexControl(), QMotifStyle::drawComplexControl(), QMacStyle::drawComplexControl(), QWindowsCEStyle::drawControl(), QCommonStyle::drawControl(), QWindowsVistaStyle::drawControl(), QCDEStyle::drawControl(), QPlastiqueStyle::drawControl(), QWindowsMobileStyle::drawControl(), QCleanlooksStyle::drawControl(), QWindowsXPStyle::drawControl(), QWindowsStyle::drawControl(), QGtkStyle::drawControl(), QMotifStyle::drawControl(), QMacStyle::drawControl(), QStyleSheetStyle::drawControl(), QItemDelegate::drawDecoration(), QStyleHelper::drawDial(), QItemDelegate::drawDisplay(), QItemDelegate::drawFocus(), QFrame::drawFrame(), QWindowsMobileStylePrivate::drawPanelItemViewSelected(), QPlastiqueStylePrivate::drawPartialFrame(), QWindowsCEStyle::drawPrimitive(), QCommonStyle::drawPrimitive(), QWindowsVistaStyle::drawPrimitive(), QWindowsMobileStyle::drawPrimitive(), QPlastiqueStyle::drawPrimitive(), QCleanlooksStyle::drawPrimitive(), QCDEStyle::drawPrimitive(), QWindowsXPStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), QGtkStyle::drawPrimitive(), QMotifStyle::drawPrimitive(), QMacStyle::drawPrimitive(), QTreeView::drawRow(), QWindowsMobileStylePrivate::drawScrollbarGrip(), QWindowsMobileStylePrivate::drawScrollbarHandleDown(), QWindowsMobileStylePrivate::drawScrollbarHandleUp(), QWindowsMobileStylePrivate::drawTabBarTab(), drawTabBase(), drawTabShape(), QTreeView::drawTree(), QStyledItemDelegate::editorEvent(), QItemDelegate::editorEvent(), QGridLayoutEngine::fillRowData(), getControlSize(), QMacStylePrivate::getSliderInfo(), QComboMenuDelegate::getStyleOption(), QGtkPainter::gtkState(), QMenuBar::heightForWidth(), QTabWidget::heightForWidth(), init(), QMacStylePrivate::initComboboxBdi(), QMacStylePrivate::initHIThemePushButton(), QSideBarDelegate::initStyleOption(), QRadioButton::initStyleOption(), QToolBarSeparator::initStyleOption(), QScrollBar::initStyleOption(), QToolBoxButton::initStyleOption(), QCheckBox::initStyleOption(), QStyledItemDelegate::initStyleOption(), QPushButton::initStyleOption(), QGroupBox::initStyleOption(), QSlider::initStyleOption(), QProgressBar::initStyleOption(), QToolButton::initStyleOption(), QMenuBar::initStyleOption(), QToolBar::initStyleOption(), QAbstractSpinBox::initStyleOption(), QMenu::initStyleOption(), QGraphicsWidget::initStyleOption(), QDateTimeEdit::initStyleOption(), QTabBar::initStyleOption(), QLineEdit::initStyleOption(), QHeaderView::initStyleOption(), QWorkspaceTitleBar::initStyleOption(), QComboBox::initStyleOption(), QGraphicsItemPrivate::initStyleOption(), QGraphicsWidgetPrivate::initStyleOptionTitleBar(), QCommonStylePrivate::isViewItemCached(), QMenuBar::minimumSizeHint(), QTabWidget::minimumSizeHint(), QAbstractItemView::mouseReleaseEvent(), QAbstractItemViewPrivate::openEditor(), QAbstractItemView::openPersistentEditor(), operator<<(), operator=(), QDecorationStyled::paint(), QItemDelegate::paint(), QGraphicsSvgItem::paint(), QFontFamilyDelegate::paint(), QColumnViewDelegate::paint(), QCompleterItemDelegate::paint(), QScriptDebuggerLocalsItemDelegate::paint(), QGraphicsPathItem::paint(), QGraphicsRectItem::paint(), QGraphicsEllipseItem::paint(), QGraphicsPolygonItem::paint(), QGraphicsLineItem::paint(), QGraphicsPixmapItem::paint(), QGraphicsTextItem::paint(), QGraphicsSimpleTextItem::paint(), QGraphicsItemGroup::paint(), QWellArray::paintCell(), QScrollBar::paintEvent(), QMDIControl::paintEvent(), QStatusBar::paintEvent(), QSlider::paintEvent(), QComboBoxListView::paintEvent(), QDockWidgetTitleButton::paintEvent(), QMdiSubWindow::paintEvent(), QMenuBar::paintEvent(), QListView::paintEvent(), QSplitterHandle::paintEvent(), QMenu::paintEvent(), QComboBoxPrivateScroller::paintEvent(), QTabBar::paintEvent(), QDateTimeEdit::paintEvent(), QHeaderView::paintEvent(), CloseButton::paintEvent(), QWorkspaceTitleBar::paintEvent(), QMdi::ControllerWidget::paintEvent(), QTableCornerButton::paintEvent(), QWorkspaceChild::paintEvent(), QPrevNextCalButton::paintEvent(), QHeaderView::paintSection(), paintSep(), QGraphicsWidget::paintWindowFrame(), QCommonStyle::pixelMetric(), QPlastiqueStyle::pixelMetric(), QMacStyle::pixelMetric(), QStyleSheetStyle::pixelMetric(), QStyleOptionFocusRect::QStyleOptionFocusRect(), qt_plastique_draw_frame(), qt_plastique_drawFrame(), qt_plastique_drawShadedPanel(), QItemDelegate::rect(), QStyleSheetStyle::renderRule(), QAbstractItemViewPrivate::renderToPixmap(), QAbstractItemViewPrivate::sendDelegateEvent(), QMenuBar::sizeHint(), QTabWidget::sizeHint(), QSplitterHandle::sizeHint(), QStyleSheetStyle::styleSheetPalette(), QMacStyle::subControlRect(), QCommonStyle::subElementRect(), QWindowsVistaStyle::subElementRect(), QWindowsXPStyle::subElementRect(), QMacStyle::subElementRect(), QCommonStylePrivate::tabLayout(), QMdiSubWindowPrivate::titleBarOptions(), QStyleHelper::uniqueName(), and QAbstractItemView::viewOptions().
QStyleOption::type |
the option type of the style option
The default value is SO_Default.
Definition at line 87 of file qstyleoption.h.
Referenced by operator<<(), and qstyleoption_cast().
QStyleOption::version |
the version of the style option
This value can be used by subclasses to implement extensions without breaking compatibility. If you use the qstyleoption_cast() function, you normally do not need to check it.
The default value is 1.
Definition at line 86 of file qstyleoption.h.
Referenced by QStyleOptionFrameV2::operator=(), QStyleOptionFrameV3::operator=(), QStyleOptionToolBoxV2::operator=(), qstyleoption_cast(), QStyleOptionFrameV2::QStyleOptionFrameV2(), QStyleOptionTabV2::QStyleOptionTabV2(), QStyleOptionTabV3::QStyleOptionTabV3(), and QStyleOptionToolBoxV2::QStyleOptionToolBoxV2().