QStyleOption Class Reference

#include <qstyleoption.h>

Inheritance diagram for QStyleOption:

Inheritance graph
[legend]
Collaboration diagram for QStyleOption:

Collaboration graph
[legend]
List of all members.

Detailed Description

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:

snippets/qstyleoption/main.cpp MyPushButton::paintEvent /^/

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:

snippets/qstyleoption/main.cpp MyStyle::drawPrimitive /^/

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.

See also:
QStyle, QStylePainter

Definition at line 42 of file qstyleoption.h.

Public Types

enum  OptionType
enum  StyleOptionType
enum  StyleOptionVersion

Public Member Functions

 QStyleOption (int version=QStyleOption::Version, int type=SO_Default)
 QStyleOption (const QStyleOption &other)
 ~QStyleOption ()
void init (const QWidget *w)
void initFrom (const QWidget *w)
QStyleOptionoperator= (const QStyleOption &other)

Public Attributes

int version
int type
QStyle::State state
Qt::LayoutDirection direction
QRect rect
QFontMetrics fontMetrics
QPalette palette

Related Functions

(Note that these are not member functions.)

qstyleoption_cast (const QStyleOption *option)
qstyleoption_cast (QStyleOption *option)


Member Enumeration Documentation

enum QStyleOption::OptionType

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.

SO_Button QStyleOptionButton SO_ComboBox QStyleOptionComboBox SO_Complex QStyleOptionComplex SO_Default QStyleOption SO_DockWidget QStyleOptionDockWidget SO_FocusRect QStyleOptionFocusRect SO_Frame QStyleOptionFrame QStyleOptionFrameV2 SO_GraphicsItem QStyleOptionGraphicsItem SO_GroupBox QStyleOptionGroupBox SO_Header QStyleOptionHeader SO_MenuItem QStyleOptionMenuItem SO_ProgressBar QStyleOptionProgressBar QStyleOptionProgressBarV2 SO_RubberBand QStyleOptionRubberBand SO_SizeGrip QStyleOptionSizeGrip SO_Slider QStyleOptionSlider SO_SpinBox QStyleOptionSpinBox SO_Tab QStyleOptionTab SO_TabBarBase QStyleOptionTabBarBase SO_TabWidgetFrame QStyleOptionTabWidgetFrame SO_TitleBar QStyleOptionTitleBar SO_ToolBar QStyleOptionToolBar SO_ToolBox QStyleOptionToolBox SO_ToolButton QStyleOptionToolButton SO_ViewItem QStyleOptionViewItem (used in Interviews)

The following values are used for custom controls:

SO_CustomBase Reserved for custom QStyleOptions; all custom controls values must be above this value SO_ComplexCustomBase Reserved for custom QStyleOptions; all custom complex controls values must be above this value

Some style options are defined for various Qt3Support controls:

SO_Q3DockWindow QStyleOptionQ3DockWindow SO_Q3ListView QStyleOptionQ3ListView SO_Q3ListViewItem QStyleOptionQ3ListViewItem

See also:
type

Definition at line 45 of file qstyleoption.h.

enum QStyleOption::StyleOptionType

This enum is used to hold information about the type of the style option, and is defined for each QStyleOption subclass.

Type The type of style option provided ({SO_Default} for this class).

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.

See also:
StyleOptionVersion

Definition at line 58 of file qstyleoption.h.

00058 { Type = SO_Default };

enum QStyleOption::StyleOptionVersion

This enum is used to hold information about the version of the style option, and is defined for each QStyleOption subclass.

Version 1

The version is used by QStyleOption subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast(), you normally don't need to check it.

See also:
StyleOptionType

Definition at line 59 of file qstyleoption.h.

00059 { Version = 1 };


Constructor & Destructor Documentation

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.

See also:
version, type

Definition at line 145 of file qstyleoption.cpp.

QStyleOption::QStyleOption ( const QStyleOption other  ) 

Constructs a copy of other.

Definition at line 210 of file qstyleoption.cpp.

00211     : version(Version), type(Type), state(other.state),
00212       direction(other.direction), rect(other.rect), fontMetrics(other.fontMetrics),
00213       palette(other.palette)
00214 {
00215 }

QStyleOption::~QStyleOption (  ) 

Destroys this style option object.

Definition at line 155 of file qstyleoption.cpp.

00156 {
00157 }


Member Function Documentation

void QStyleOption::init ( const QWidget widget  ) 

Use initFrom(widget) instead.

Definition at line 178 of file qstyleoption.cpp.

References direction, QWidget::fontMetrics(), fontMetrics, QWidget::hasFocus(), QWidget::isActiveWindow(), QWidget::isEnabled(), QWidget::layoutDirection(), QWidget::palette(), palette, rect, QWidget::rect(), state, QStyle::State_Active, QStyle::State_Enabled, QStyle::State_HasFocus, QStyle::State_KeyboardFocusChange, QStyle::State_MouseOver, QStyle::State_None, QWidget::testAttribute(), QWidget::underMouse(), w, Qt::WA_KeyboardFocusChange, and QWidget::window().

Referenced by Q3DockWindowHandle::changeEvent(), QComboBoxPrivateContainer::comboStyleOption(), ColorButton::drawButton(), Q3DockWindow::drawContents(), QFrame::drawFrame(), qdesigner_internal::ButtonTaskMenu::editText(), qdesigner_internal::LineEditTaskMenu::editText(), qdesigner_internal::GroupBoxTaskMenu::editTitle(), QComboBoxPrivate::getStyleOption(), QPushButtonPrivate::getStyleOption(), QTabBarPrivate::getStyleOption(), QAbstractSpinBoxPrivate::getStyleOption(), QDockWidgetPrivate::getStyleOption(), getStyleOption(), QScrollBarPrivate::getStyleOption(), Q3TitleBarPrivate::getStyleOption(), QProgressBarPrivate::getStyleOption(), QRubberBandPrivate::getStyleOption(), QGroupBoxPrivate::getStyleOption(), QTabWidgetPrivate::getStyleOption(), QToolButtonPrivate::getStyleOption(), QWorkspaceTitleBarPrivate::getStyleOption(), QFocusFramePrivate::getStyleOption(), QCheckBoxPrivate::getStyleOption(), QLineEditPrivate::getStyleOption(), QSliderPrivate::getStyleOption(), QDialPrivate::getStyleOption(), Q3ComboBoxData::getStyleOption(), QMenuBar::heightForWidth(), QAbstractScrollAreaPrivate::layoutChildren(), Q3DockWindowTitleBar::mousePressEvent(), QCalendarPopup::mousePressEvent(), QDateTimeEditPrivate::newHoverControl(), QDockWidgetTitleButton::paintEvent(), QToolBoxButton::paintEvent(), QDockWidget::paintEvent(), QDateTimeEdit::paintEvent(), Q3DockWindowResizeHandle::paintEvent(), Q3DockWindowHandle::paintEvent(), QSizeGrip::paintEvent(), qdesigner_internal::QtColorLinePrivate::paintEvent(), QComboBoxPrivateScroller::paintEvent(), QTabBar::paintEvent(), qdesigner_internal::StyledButton::paintEvent(), QLabel::paintEvent(), QTableCornerButton::paintEvent(), qdesigner_internal::WidgetHandle::paintEvent(), VersionLabel::paintEvent(), QTipLabel::paintEvent(), Q3ListViewItem::paintFocus(), Q3Table::paintFocus(), Q3ComboBox::Q3ComboBox(), QAccessibleToolButton::rect(), QSplitterHandle::sizeHint(), QTabWidget::sizeHint(), QSizeGrip::sizeHint(), Q3DockWindowResizeHandle::sizeHint(), Q3IconView::sizeHint(), QDateTimeEditPrivate::updateEditFieldGeometry(), Q3DockWindowHandle::updateGui(), and QAbstractItemView::viewOptions().

00179 {
00180     state = QStyle::State_None;
00181     if (widget->isEnabled())
00182         state |= QStyle::State_Enabled;
00183     if (widget->hasFocus())
00184         state |= QStyle::State_HasFocus;
00185     if (widget->window()->testAttribute(Qt::WA_KeyboardFocusChange))
00186         state |= QStyle::State_KeyboardFocusChange;
00187     if (widget->underMouse())
00188         state |= QStyle::State_MouseOver;
00189     if (widget->window()->isActiveWindow())
00190         state |= QStyle::State_Active;
00191 #ifdef Q_WS_MAC
00192     extern bool qt_mac_can_clickThrough(const QWidget *w); //qwidget_mac.cpp
00193     if (!(state & QStyle::State_Active) && !qt_mac_can_clickThrough(widget))
00194         state &= ~QStyle::State_Enabled;
00195 #endif
00196 #ifdef QT_KEYPAD_NAVIGATION
00197     if (widget->hasEditFocus())
00198         state |= QStyle::State_HasEditFocus;
00199 #endif
00200 
00201     direction = widget->layoutDirection();
00202     rect = widget->rect();
00203     palette = widget->palette();
00204     fontMetrics = widget->fontMetrics();
00205 }

Here is the call graph for this function:

void QStyleOption::initFrom ( const QWidget widget  )  [inline]

Since:
4.1
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.

See also:
QWidget::layoutDirection(), QWidget::rect(), QWidget::palette(), QWidget::fontMetrics()

Definition at line 74 of file qstyleoption.h.

References init(), and w.

Referenced by QTreeView::drawBranches(), QPlastiqueStyle::drawComplexControl(), qdesigner_internal::FlagBox::FlagBox(), QMenuPrivate::getStyleOption(), QHeaderViewPrivate::getStyleOption(), QTreeViewPrivate::itemDecorationAt(), Q3CheckTableItem::paint(), Q3ComboTableItem::paint(), QMenu::paintEvent(), QLabel::paintEvent(), QWidget::paintEvent(), and QFramePrivate::updateStyledFrameWidths().

00074 { init(w); }

Here is the call graph for this function:

QStyleOption & QStyleOption::operator= ( const QStyleOption other  ) 

Assign other to this QStyleOption.

Definition at line 220 of file qstyleoption.cpp.

References direction, fontMetrics, palette, rect, and state.

Referenced by QStyleOptionTabV2::operator=(), QStyleOptionViewItemV2::operator=(), QStyleOptionProgressBarV2::operator=(), QStyleOptionFrameV2::operator=(), and QStyleOptionFrameV2::QStyleOptionFrameV2().

00221 {
00222     state = other.state;
00223     direction = other.direction;
00224     rect = other.rect;
00225     fontMetrics = other.fontMetrics;
00226     palette = other.palette;
00227     return *this;
00228 }


Friends And Related Function Documentation

T qstyleoption_cast< T > ( const QStyleOption option  )  [related]

the alignment of the display value for the itemthe alignment of the decoration for the itemthe position of the decoration for the itemthe size of the decoration for the itemthe font used for the item

Returns a T or 0 depending on the {QStyleOption::type}{type} and {QStyleOption::version}{version} of the given option.

Example:

snippets/qstyleoption/main.cpp MyStyle::drawPrimitive /^/

See also:
QStyleOption::type, QStyleOption::version

Definition at line 706 of file qstyleoption.h.

00707 {
00708     if (opt && opt->version >= static_cast<T>(0)->Version && (opt->type == static_cast<T>(0)->Type
00709         || int(static_cast<T>(0)->Type) == QStyleOption::SO_Default
00710         || (int(static_cast<T>(0)->Type) == QStyleOption::SO_Complex
00711             && opt->type > QStyleOption::SO_Complex)))
00712         return static_cast<T>(opt);
00713     return 0;
00714 }

T qstyleoption_cast< T > ( QStyleOption option  )  [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 717 of file qstyleoption.h.

00718 {
00719     if (opt && opt->version >= static_cast<T>(0)->Version && (opt->type == static_cast<T>(0)->Type
00720         || int(static_cast<T>(0)->Type) == QStyleOption::SO_Default
00721         || (int(static_cast<T>(0)->Type) == QStyleOption::SO_Complex
00722             && opt->type > QStyleOption::SO_Complex)))
00723         return static_cast<T>(opt);
00724     return 0;
00725 }


Member Data Documentation

int QStyleOption::version

Definition at line 61 of file qstyleoption.h.

Referenced by QStyleOptionFrameV2::operator=(), qstyleoption_cast(), QStyleOptionFrameV2::QStyleOptionFrameV2(), and QStyleOptionTabV2::QStyleOptionTabV2().

int QStyleOption::type

Definition at line 62 of file qstyleoption.h.

Referenced by operator<<(), and qstyleoption_cast().

QStyle::State QStyleOption::state

Definition at line 63 of file qstyleoption.h.

Referenced by QComboBoxPrivateContainer::comboStyleOption(), QItemDelegate::decoration(), drawArrow(), QItemDelegate::drawBackground(), qdesigner_internal::TreeWidget::drawBranches(), qdesigner_internal::QPropertyEditor::drawBranches(), QTreeView::drawBranches(), ColorButton::drawButton(), QTableViewPrivate::drawCell(), QItemDelegate::drawCheck(), QCommonStyle::drawComplexControl(), QWindowsStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), QMotifStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), Q3DockWindow::drawContents(), QCDEStyle::drawControl(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), NorwegianWoodStyle::drawControl(), QMotifStyle::drawControl(), QWindowsStyle::drawControl(), QWindowsXPStyle::drawControl(), QCommonStyle::drawControl(), QItemDelegate::drawDecoration(), QItemDelegate::drawDisplay(), QItemDelegate::drawFocus(), Q3DockWindow::drawFrame(), QFrame::drawFrame(), QListViewPrivate::drawItems(), QCommonStyle::drawPrimitive(), QWindowsXPStyle::drawPrimitive(), QCleanlooksStyle::drawPrimitive(), QCDEStyle::drawPrimitive(), QPlastiqueStyle::drawPrimitive(), NorwegianWoodStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), QTreeView::drawRow(), Q3IconView::drawRubber(), Q3TextParagraph::drawString(), QTreeView::drawTree(), Q3IconView::eventFilter(), QComboBoxPrivate::getStyleOption(), QPushButtonPrivate::getStyleOption(), QTabBarPrivate::getStyleOption(), QAbstractSpinBoxPrivate::getStyleOption(), getStyleOption(), QScrollBarPrivate::getStyleOption(), QGroupBoxPrivate::getStyleOption(), QMenuBarPrivate::getStyleOption(), QHeaderViewPrivate::getStyleOption(), QDateTimeEditPrivate::getStyleOption(), QMenuPrivate::getStyleOption(), QToolButtonPrivate::getStyleOption(), QWorkspaceTitleBarPrivate::getStyleOption(), QCheckBoxPrivate::getStyleOption(), QLineEditPrivate::getStyleOption(), QSliderPrivate::getStyleOption(), Q3ComboBoxData::getStyleOption(), QComboMenuDelegate::getStyleOption(), QMenuBar::heightForWidth(), init(), QMenuBar::minimumSizeHint(), QTabWidget::minimumSizeHint(), QAbstractItemViewPrivate::openEditor(), QAbstractItemView::openPersistentEditor(), operator<<(), operator=(), qdesigner_internal::SheetDelegate::paint(), QGraphicsPathItem::paint(), QGraphicsSimpleTextItem::paint(), QGraphicsItemGroup::paint(), BookDelegate::paint(), Q3CheckTableItem::paint(), TorrentViewDelegate::paint(), qdesigner_internal::ActionGroupDelegate::paint(), Chip::paint(), Q3ComboTableItem::paint(), QFontFamilyDelegate::paint(), QGraphicsTextItem::paint(), Node::paint(), QGraphicsLineItem::paint(), QGraphicsPixmapItem::paint(), QItemDelegate::paint(), qdesigner_internal::QPropertyEditorDelegate::paint(), QGraphicsEllipseItem::paint(), VariantDelegate::paint(), QCompleterItemDelegate::paint(), QGraphicsPolygonItem::paint(), PixelDelegate::paint(), QGraphicsRectItem::paint(), Q3ListBox::paintCell(), Q3CheckListItem::paintCell(), QWellArray::paintCell(), QSplitterHandle::paintEvent(), Q3TitleBar::paintEvent(), QDockWidgetTitleButton::paintEvent(), QMenuBar::paintEvent(), QToolBoxButton::paintEvent(), QWorkspaceTitleBar::paintEvent(), Q3DockWindowHandle::paintEvent(), Q3DockWindowResizeHandle::paintEvent(), QDateTimeEdit::paintEvent(), Q3MainWindow::paintEvent(), qdesigner_internal::QtColorLinePrivate::paintEvent(), QTableView::paintEvent(), QComboBoxPrivateScroller::paintEvent(), QSlider::paintEvent(), QHideDock::paintEvent(), PieView::paintEvent(), QListView::paintEvent(), QMenu::paintEvent(), QScrollBar::paintEvent(), QWorkspaceChild::paintEvent(), QTableCornerButton::paintEvent(), qdesigner_internal::WidgetHandle::paintEvent(), VersionLabel::paintEvent(), Q3Header::paintEvent(), QGraphicsView::paintEvent(), Q3ListViewItem::paintFocus(), Q3IconViewItem::paintFocus(), Q3Table::paintFocus(), Q3TableHeader::paintSection(), Q3Header::paintSection(), QHeaderView::paintSection(), Q3Header::paintSectionLabel(), paintSep(), QStyleOptionFocusRect::QStyleOptionFocusRect(), qt_plastique_draw_frame(), qt_plastique_drawFrame(), qt_plastique_drawShadedPanel(), QGraphicsView::render(), QGraphicsScene::render(), QStyleSheetStyle::renderRule(), QAbstractItemViewPrivate::renderToPixmap(), QAbstractItemViewPrivate::sendDelegateEvent(), QSplitterHandle::sizeHint(), QMenuBar::sizeHint(), QTabWidget::sizeHint(), Q3DockWindowResizeHandle::sizeHint(), QMenu::sizeHint(), uniqueName(), and QAbstractItemView::viewOptions().

Qt::LayoutDirection QStyleOption::direction

Definition at line 64 of file qstyleoption.h.

Referenced by QItemDelegate::doLayout(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QMotifStyle::drawControl(), QItemDelegate::drawDecoration(), QItemDelegate::drawDisplay(), NorwegianWoodStyle::drawPrimitive(), QItemDelegate::editorEvent(), QSliderPrivate::getStyleOption(), init(), QAbstractScrollAreaPrivate::layoutChildren(), operator<<(), operator=(), qdesigner_internal::TreeWidgetDelegate::paint(), TorrentViewDelegate::paint(), QFontFamilyDelegate::paint(), qdesigner_internal::QPropertyEditorDelegate::paint(), Q3DockWindowHandle::paintEvent(), QTabBar::paintEvent(), QStyleSheetStyle::subControlRect(), QWindowsXPStyle::subControlRect(), QStyleSheetStyle::subElementRect(), QMotifStyle::subElementRect(), QPlastiqueStyle::subElementRect(), QWindowsStyle::subElementRect(), and QWindowsXPStyle::subElementRect().

QRect QStyleOption::rect

Definition at line 65 of file qstyleoption.h.

Referenced by QMenuPrivate::calcActionRects(), calcArrow(), calcLines(), QGroupBoxPrivate::calculateFrame(), QComboBoxPrivateContainer::comboStyleOption(), QItemDelegate::doLayout(), QTableViewPrivate::drawAndClipSpans(), drawArrow(), QItemDelegate::drawBackground(), qdesigner_internal::TreeWidget::drawBranches(), QTreeView::drawBranches(), qdesigner_internal::QPropertyEditor::drawBranches(), ColorButton::drawButton(), QTableViewPrivate::drawCell(), QItemDelegate::drawCheck(), QStyleSheetStyle::drawComplexControl(), QCommonStyle::drawComplexControl(), QWindowsStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), QMotifStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), QCDEStyle::drawControl(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QMotifStyle::drawControl(), QWindowsStyle::drawControl(), QWindowsXPStyle::drawControl(), QStyleSheetStyle::drawControl(), QCommonStyle::drawControl(), Q3DockWindow::drawFrame(), QFrame::drawFrame(), QListViewPrivate::drawItems(), QCommonStyle::drawPrimitive(), QWindowsXPStyle::drawPrimitive(), QCleanlooksStyle::drawPrimitive(), QStyleSheetStyle::drawPrimitive(), QCDEStyle::drawPrimitive(), QPlastiqueStyle::drawPrimitive(), NorwegianWoodStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), QTreeView::drawRow(), Q3IconView::drawRubber(), Q3TextParagraph::drawString(), QTreeView::drawTree(), BookDelegate::editorEvent(), QItemDelegate::editorEvent(), qdesigner_internal::LineEditTaskMenu::editText(), Q3IconView::eventFilter(), QTabBarPrivate::getStyleOption(), QDockWidgetPrivate::getStyleOption(), getStyleOption(), QFocusFramePrivate::getStyleOption(), QLineEditPrivate::getStyleOption(), QComboMenuDelegate::getStyleOption(), QTreeView::indexRowSizeHint(), init(), QTreeViewPrivate::itemDecorationAt(), QAbstractScrollAreaPrivate::layoutChildren(), QMenuBar::minimumSizeHint(), QTabWidget::minimumSizeHint(), QAbstractSpinBox::minimumSizeHint(), QAbstractItemViewPrivate::openEditor(), QAbstractItemView::openPersistentEditor(), operator<<(), operator=(), QComboMenuDelegate::paint(), qdesigner_internal::SheetDelegate::paint(), qdesigner_internal::TreeWidgetDelegate::paint(), Q3CheckTableItem::paint(), QCalendarDelegate::paint(), BookDelegate::paint(), TorrentViewDelegate::paint(), Q3ComboTableItem::paint(), qdesigner_internal::ActionGroupDelegate::paint(), QFontFamilyDelegate::paint(), qdesigner_internal::ColorDelegate::paint(), qdesigner_internal::QPropertyEditorDelegate::paint(), PixelDelegate::paint(), Q3ListViewItem::paintBranches(), Q3ListBox::paintCell(), QCalendarDelegate::paintCell(), Q3CheckListItem::paintCell(), QWellArray::paintCell(), Q3ListView::paintEmptyArea(), QSplitterHandle::paintEvent(), QToolBoxButton::paintEvent(), QMenuBar::paintEvent(), QTabWidget::paintEvent(), Q3DockWindowHandle::paintEvent(), Q3MainWindow::paintEvent(), QTableView::paintEvent(), qdesigner_internal::QtColorLinePrivate::paintEvent(), QTabBar::paintEvent(), QHideDock::paintEvent(), QWorkspaceChild::paintEvent(), QMenu::paintEvent(), QListView::paintEvent(), PieView::paintEvent(), QTableCornerButton::paintEvent(), Q3ProgressBar::paintEvent(), Q3SpinWidget::paintEvent(), QGraphicsView::paintEvent(), Q3Header::paintEvent(), Q3ListViewItem::paintFocus(), Q3IconViewItem::paintFocus(), Q3Table::paintFocus(), Q3TableHeader::paintSection(), Q3Header::paintSection(), QHeaderView::paintSection(), Q3Header::paintSectionLabel(), paintSep(), Q3ComboBox::popup(), MainWindow::printImage(), qt_plastique_drawFrame(), qt_plastique_drawShadedPanel(), QAccessibleSpinBox::rect(), QItemDelegate::rect(), QGraphicsView::render(), QGraphicsScene::render(), QAbstractItemViewPrivate::renderToPixmap(), QAbstractItemViewPrivate::sendDelegateEvent(), QMenuBar::sizeHint(), QAbstractSpinBox::sizeHint(), Q3DockWindowResizeHandle::sizeHint(), QDateTimeEdit::sizeHint(), QMenu::sizeHint(), QComboMenuDelegate::sizeHint(), QToolButton::sizeHint(), QPlastiqueStyle::styleHint(), QWindowsXPStyle::styleHint(), QStyleSheetStyle::subControlRect(), QWindowsXPStyle::subControlRect(), QStyleSheetStyle::subElementRect(), QMotifStyle::subElementRect(), QPlastiqueStyle::subElementRect(), QWindowsStyle::subElementRect(), QWindowsXPStyle::subElementRect(), QItemDelegatePrivate::textLayoutBounds(), QAbstractItemView::updateEditorGeometries(), SpinBoxDelegate::updateEditorGeometry(), QItemDelegate::updateEditorGeometry(), Q3ComboBox::updateMask(), QWorkspaceChild::updateMask(), QFramePrivate::updateStyledFrameWidths(), QAbstractItemView::viewOptions(), and Q3ListBox::viewportPaintEvent().

QFontMetrics QStyleOption::fontMetrics

Definition at line 66 of file qstyleoption.h.

Referenced by QItemDelegate::doLayout(), QItemDelegate::drawDisplay(), QMenuBarPrivate::getStyleOption(), init(), operator=(), qdesigner_internal::SheetDelegate::paint(), TorrentViewDelegate::paint(), QHeaderView::paintSection(), QHeaderView::sectionSizeFromContents(), and QItemDelegate::setOptions().

QPalette QStyleOption::palette

Definition at line 67 of file qstyleoption.h.

Referenced by QComboBoxPrivateContainer::comboStyleOption(), drawArrow(), QItemDelegate::drawBackground(), qdesigner_internal::QPropertyEditor::drawBranches(), ColorButton::drawButton(), QTableViewPrivate::drawCell(), QCommonStyle::drawComplexControl(), QWindowsStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), QMotifStyle::drawComplexControl(), QCDEStyle::drawControl(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), NorwegianWoodStyle::drawControl(), QMotifStyle::drawControl(), QWindowsStyle::drawControl(), QWindowsXPStyle::drawControl(), QStyleSheetStyle::drawControl(), QCommonStyle::drawControl(), QItemDelegate::drawDecoration(), QItemDelegate::drawDisplay(), QItemDelegate::drawFocus(), Q3DockWindow::drawFrame(), QFrame::drawFrame(), QCommonStyle::drawPrimitive(), QCleanlooksStyle::drawPrimitive(), QStyleSheetStyle::drawPrimitive(), QCDEStyle::drawPrimitive(), QPlastiqueStyle::drawPrimitive(), NorwegianWoodStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), QTreeView::drawRow(), Q3IconView::drawRubber(), Q3TextParagraph::drawString(), Q3IconView::eventFilter(), QCommonStyle::generatedIconPixmap(), QTabBarPrivate::getStyleOption(), getStyleOption(), QMenuBarPrivate::getStyleOption(), QMenuPrivate::getStyleOption(), QComboMenuDelegate::getStyleOption(), init(), QMenuBar::minimumSizeHint(), QTabWidget::minimumSizeHint(), operator=(), QGraphicsPathItem::paint(), qdesigner_internal::SheetDelegate::paint(), Q3CheckTableItem::paint(), BookDelegate::paint(), Q3ComboTableItem::paint(), qdesigner_internal::ActionGroupDelegate::paint(), QFontFamilyDelegate::paint(), QGraphicsLineItem::paint(), QGraphicsEllipseItem::paint(), qdesigner_internal::QPropertyEditorDelegate::paint(), QGraphicsPolygonItem::paint(), QGraphicsRectItem::paint(), PixelDelegate::paint(), Q3ListViewItem::paintBranches(), Q3ListBox::paintCell(), Q3CheckListItem::paintCell(), QWellArray::paintCell(), QSplitterHandle::paintEvent(), QToolBoxButton::paintEvent(), QMenuBar::paintEvent(), Q3TitleBar::paintEvent(), QWorkspaceTitleBar::paintEvent(), Q3MainWindow::paintEvent(), QTableView::paintEvent(), QHideDock::paintEvent(), QWorkspaceChild::paintEvent(), QMenu::paintEvent(), QListView::paintEvent(), PieView::paintEvent(), Q3Header::paintEvent(), Q3ListViewItem::paintFocus(), Q3IconViewItem::paintFocus(), Q3Table::paintFocus(), Q3TableHeader::paintSection(), QHeaderView::paintSection(), paintSep(), QPixmapIconEngine::pixmap(), QSvgIconEngine::pixmap(), qt_cleanlooks_draw_mdibutton(), qt_plastique_draw_frame(), qt_plastique_draw_handle(), qt_plastique_drawFrame(), qt_plastique_drawShadedPanel(), QItemDelegate::setOptions(), QMenuBar::sizeHint(), QMenu::sizeHint(), QCommonStyle::styleHint(), QCleanlooksStyle::styleHint(), uniqueName(), and Q3ListBox::viewportPaintEvent().


The documentation for this class was generated from the following files:
Generated on Thu Mar 15 19:10:12 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1