QStyleOptionToolBox Class Reference

#include <qstyleoption.h>

Inheritance diagram for QStyleOptionToolBox:

Inheritance graph
[legend]
Collaboration diagram for QStyleOptionToolBox:

Collaboration graph
[legend]
List of all members.

Detailed Description

whether or not the combobox is editable or notwhether the combo box has a framethe text for the current item of the combo boxthe icon for the current item of the combo boxthe icon size for the current item of the combo boxthe popup rectangle for the comboboxThe QStyleOptionToolBox class is used to describe the parameters needed for drawing a tool box.

QStyleOptionToolBox contains all the information that QStyle functions need to draw QToolBox.

For performance reasons, 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.

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

See also:
QStyleOption, QToolBox

Definition at line 475 of file qstyleoption.h.

Public Types

enum  StyleOptionType
enum  StyleOptionVersion

Public Member Functions

 QStyleOptionToolBox ()
 QStyleOptionToolBox (const QStyleOptionToolBox &other)

Public Attributes

QString text
QIcon icon

Protected Member Functions

 QStyleOptionToolBox (int version)


Member Enumeration Documentation

enum QStyleOptionToolBox::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_ToolBox} 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 478 of file qstyleoption.h.

00478 { Type = SO_ToolBox };

enum QStyleOptionToolBox::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 479 of file qstyleoption.h.

00479 { Version = 1 };


Constructor & Destructor Documentation

QStyleOptionToolBox::QStyleOptionToolBox (  ) 

Creates a QStyleOptionToolBox, initializing the members variables to their default values.

Definition at line 3382 of file qstyleoption.cpp.

03383     : QStyleOption(Version, SO_ToolBox)
03384 {
03385 }

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

Constructs a copy of the other style option.

Definition at line 485 of file qstyleoption.h.

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

QStyleOptionToolBox::QStyleOptionToolBox ( int  version  )  [protected]

Definition at line 3390 of file qstyleoption.cpp.

03391     : QStyleOption(version, SO_ToolBox)
03392 {
03393 }


Member Data Documentation

QString QStyleOptionToolBox::text

Definition at line 481 of file qstyleoption.h.

Referenced by QToolBoxButton::paintEvent().

QIcon QStyleOptionToolBox::icon

Definition at line 482 of file qstyleoption.h.

Referenced by QToolBoxButton::paintEvent().


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