CopperSpice API  1.7.2
QStyleOptionToolBox Class Reference

Describes the parameters used to draw a tool box. More...

Inheritance diagram for QStyleOptionToolBox:
QStyleOption

Public Types

enum  SelectedPosition
 
enum  StyleOptionType
 
enum  StyleOptionVersion
 
enum  TabPosition
 
- Public Types inherited from QStyleOption
enum  OptionType
 
enum  StyleOptionType
 
enum  StyleOptionVersion
 

Public Methods

 QStyleOptionToolBox ()
 
 QStyleOptionToolBox (const QStyleOptionToolBox &other)
 
QStyleOptionToolBox & operator= (const QStyleOptionToolBox &other) = default
 
- Public Methods inherited from QStyleOption
 QStyleOption (const QStyleOption &other)
 
 QStyleOption (int version=QStyleOption::Version, int type=SO_Default)
 
 ~QStyleOption ()
 
void initFrom (const QWidget *widget)
 
QStyleOption & operator= (const QStyleOption &other)
 

Public Members

QIcon icon
 
SelectedPosition selectedPosition
 
QString text
 

Additional Inherited Members

Detailed Description

The QStyleOptionToolBox class is used to describe the parameters needed for drawing a tool box. QStyleOptionToolBox contains all the information that QStyle methods need to draw QToolBox.

For performance reasons, the access to the member variables is direct 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.

See also
QStyleOption, QToolBox

Member Enumeration Documentation

This enum describes the position of the selected tab. Some styles need to draw a tab differently depending on whether or not it is adjacent to the selected tab.

ConstantValueDescription
QStyleOptionToolBox::NotAdjacent 0 Tab is not adjacent to a selected tab (or is the selected tab)
QStyleOptionToolBox::NextIsSelected 1 Next tab (typically the tab on the right) is selected
QStyleOptionToolBox::PreviousIsSelected 2 Previous tab (typically the tab on the left) is selected
See also
selectedPosition

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

ConstantValueDescription
QStyleOptionToolBox::TypeSO_ToolBox The type of style option provided (SO_ToolBox for this class).
See also
StyleOptionVersion, qstyleoption_cast()

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

ConstantValueDescription
QStyleOptionToolBox::Version22
See also
StyleOptionType, qstyleoption_cast()

This enum describes tab positions relative to other tabs.

ConstantValueDescription
QStyleOptionToolBox::Beginning 0 Tab is the first (i.e., top-most) tab in the toolbox
QStyleOptionToolBox::Middle 1 Tab is placed in the middle of the toolbox
QStyleOptionToolBox::End 2 Tab is placed at the bottom of the toolbox
QStyleOptionToolBox::OnlyOneTab 3 Only one tab in the toolbox

Constructor & Destructor Documentation

QStyleOptionToolBox::QStyleOptionToolBox ( )

Constructs an empty QStyleOptionToolBox.

QStyleOptionToolBox::QStyleOptionToolBox ( const QStyleOptionToolBox &  other)
inline

Copy constructs a new QStyleOptionToolBox from other.

Method Documentation

QStyleOptionToolBox & QStyleOptionToolBox::operator= ( const QStyleOptionToolBox &  other)
default

Copy assigns from other and returns a reference to this object.

Member Data Documentation

QStyleOptionToolBox::icon

This variable holds the icon for the tool box tab. The default value is an empty icon which is an icon with neither a pixmap or a file name.

QStyleOptionToolBox::selectedPosition

This variable holds the position of the selected tab in relation to this tab. The default value is NotAdjacent, which means the tab is not adjacent to a selected tab nor is it the selected tab.

QStyleOptionToolBox::text

This variable holds the text for the tool box tab. The default value is an empty string.