QStyleOptionComplex Class Reference

#include <qstyleoption.h>

Inheritance diagram for QStyleOptionComplex:

Inheritance graph
[legend]
Collaboration diagram for QStyleOptionComplex:

Collaboration graph
[legend]
List of all members.

Detailed Description

the type of menu itemthe type of checkmark of the menu itemwhether the menu item is checked or notwhether the menu as a whole has checkable items or notthe rectangle for the entire menuthe text for the menu itemthe icon for the menu itemthe maximum icon width for the icon in the menu itemthe tab width for the menu itemthe font used for the menu item textThe QStyleOptionComplex class is used to hold parameters that are common to all complex controls.

This class is not used on its own. Instead it is used to derive other complex control options, for example QStyleOptionSlider and QStyleOptionSpinBox.

For performance reasons, the access to the member variables is direct (i.e., using the . or -> operator).

For an example demonstrating how style options can be used, see the {widgets/styles}{Styles} example.

See also:
QStyleOption

Definition at line 510 of file qstyleoption.h.

Public Types

enum  StyleOptionType
enum  StyleOptionVersion

Public Member Functions

 QStyleOptionComplex (int version=QStyleOptionComplex::Version, int type=SO_Complex)
 QStyleOptionComplex (const QStyleOptionComplex &other)

Public Attributes

QStyle::SubControls subControls
QStyle::SubControls activeSubControls


Member Enumeration Documentation

enum QStyleOptionComplex::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_Complex} 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

Reimplemented from QStyleOption.

Definition at line 513 of file qstyleoption.h.

00513 { Type = SO_Complex };

enum QStyleOptionComplex::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

Reimplemented from QStyleOption.

Definition at line 514 of file qstyleoption.h.

00514 { Version = 1 };


Constructor & Destructor Documentation

QStyleOptionComplex::QStyleOptionComplex ( int  version = QStyleOptionComplex::Version,
int  type = SO_Complex 
)

Constructs a QStyleOptionComplex of the specified type and version, initializing the member variables to their default values. This constructor is usually called by subclasses.

Definition at line 2237 of file qstyleoption.cpp.

QStyleOptionComplex::QStyleOptionComplex ( const QStyleOptionComplex other  )  [inline]

Constructs a copy of the other style option.

Definition at line 520 of file qstyleoption.h.

00520 : QStyleOption(Version, Type) { *this = other; }


Member Data Documentation

QStyle::SubControls QStyleOptionComplex::subControls

Definition at line 516 of file qstyleoption.h.

Referenced by QComboBoxPrivateContainer::comboStyleOption(), QWindowsStyle::drawComplexControl(), ArthurStyle::drawComplexControl(), QMotifStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), QComboBoxPrivate::getStyleOption(), QAbstractSpinBoxPrivate::getStyleOption(), getStyleOption(), QScrollBarPrivate::getStyleOption(), Q3TitleBarPrivate::getStyleOption(), QGroupBoxPrivate::getStyleOption(), QDateTimeEditPrivate::getStyleOption(), QToolButtonPrivate::getStyleOption(), QWorkspaceTitleBarPrivate::getStyleOption(), QSliderPrivate::getStyleOption(), QDialPrivate::getStyleOption(), Q3ComboBoxData::getStyleOption(), Q3DockWindowTitleBar::mousePressEvent(), QComboBoxPrivateContainer::mousePressEvent(), QSlider::mouseReleaseEvent(), QAbstractSpinBoxPrivate::newHoverControl(), QScrollBarPrivate::newHoverControl(), QComboBoxPrivate::newHoverControl(), QSliderPrivate::newHoverControl(), QDateTimeEditPrivate::newHoverControl(), Q3ComboTableItem::paint(), Q3ListViewItem::paintBranches(), Q3ListView::paintEmptyArea(), Q3TitleBar::paintEvent(), QWorkspaceTitleBar::paintEvent(), QDateTimeEdit::paintEvent(), QSlider::paintEvent(), QScrollBar::paintEvent(), qdesigner_internal::WidgetHandle::paintEvent(), Q3SpinWidget::paintEvent(), QDateTimeEditPrivate::updateEditFieldGeometry(), and QAbstractSpinBoxPrivate::updateEditFieldGeometry().

QStyle::SubControls QStyleOptionComplex::activeSubControls

Definition at line 517 of file qstyleoption.h.

Referenced by QComboBoxPrivateContainer::comboStyleOption(), QComboBoxPrivate::getStyleOption(), QAbstractSpinBoxPrivate::getStyleOption(), getStyleOption(), QScrollBarPrivate::getStyleOption(), Q3TitleBarPrivate::getStyleOption(), QGroupBoxPrivate::getStyleOption(), QToolButtonPrivate::getStyleOption(), QWorkspaceTitleBarPrivate::getStyleOption(), QSliderPrivate::getStyleOption(), QDialPrivate::getStyleOption(), Q3ComboBoxData::getStyleOption(), Q3DockWindowTitleBar::mousePressEvent(), QComboBoxPrivateContainer::mousePressEvent(), Q3ComboTableItem::paint(), Q3ListViewItem::paintBranches(), Q3TitleBar::paintEvent(), QWorkspaceTitleBar::paintEvent(), QDateTimeEdit::paintEvent(), QSlider::paintEvent(), QScrollBar::paintEvent(), Q3SpinWidget::paintEvent(), and uniqueName().


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