Qt 4.8
|
The QStyleOptionToolBoxV2 class is used to describe the parameters necessary for drawing a frame in Qt 4.3 or above. More...
#include <qstyleoption.h>
Public Types | |
enum | SelectedPosition { NotAdjacent, NextIsSelected, PreviousIsSelected } |
This enum describes the position of the selected tab. More... | |
enum | StyleOptionVersion { Version = 2 } |
This enum holds the version of this style option. More... | |
enum | TabPosition { Beginning, Middle, End, OnlyOneTab } |
This enum describes tab positions relative to other tabs. More... | |
Public Types inherited from QStyleOptionToolBox | |
enum | StyleOptionType { Type = SO_ToolBox } |
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 Types inherited from QStyleOption | |
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 | |
QStyleOptionToolBoxV2 & | operator= (const QStyleOptionToolBox &other) |
Assigns the other style option to this style option. More... | |
QStyleOptionToolBoxV2 () | |
Contsructs a QStyleOptionToolBoxV2 object. More... | |
QStyleOptionToolBoxV2 (const QStyleOptionToolBoxV2 &other) | |
Constructs a QStyleOptionToolBoxV2 copy of the other style option. More... | |
QStyleOptionToolBoxV2 (const QStyleOptionToolBox &other) | |
Constructs a QStyleOptionToolBoxV2 copy of the other style option which can be either of the QStyleOptionToolBoxV2 or QStyleOptionToolBox types. More... | |
Public Functions inherited from QStyleOptionToolBox | |
QStyleOptionToolBox () | |
Creates a QStyleOptionToolBox, initializing the members variables to their default values. More... | |
QStyleOptionToolBox (const QStyleOptionToolBox &other) | |
Constructs a copy of the other style option. More... | |
Public Functions inherited from QStyleOption | |
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 | |
TabPosition | position |
SelectedPosition | selectedPosition |
the position of the selected tab in relation to this tab More... | |
Public Variables inherited from QStyleOptionToolBox | |
QIcon | icon |
the icon for the tool box tab More... | |
QString | text |
the text for the tool box tab More... | |
Public Variables inherited from QStyleOption | |
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... | |
Protected Functions | |
QStyleOptionToolBoxV2 (int version) | |
Protected Functions inherited from QStyleOptionToolBox | |
QStyleOptionToolBox (int version) | |
Additional Inherited Members | |
Related Functions inherited from QStyleOption | |
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 QStyleOptionToolBoxV2 class is used to describe the parameters necessary for drawing a frame in Qt 4.3 or above.
An instance of the QStyleOptionToolBoxV2 class has type SO_ToolBox and version 2. 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. 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.
If you create your own QStyle subclass, you should handle both QStyleOptionToolBox and QStyleOptionToolBoxV2.
Definition at line 649 of file qstyleoption.h.
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.
Enumerator | |
---|---|
NotAdjacent | |
NextIsSelected | |
PreviousIsSelected |
Definition at line 654 of file qstyleoption.h.
This enum holds the version of this style option.
Enumerator | |
---|---|
Version |
Definition at line 652 of file qstyleoption.h.
This enum describes tab positions relative to other tabs.
Enumerator | |
---|---|
Beginning | |
Middle | |
End | |
OnlyOneTab |
Definition at line 653 of file qstyleoption.h.
QStyleOptionToolBoxV2::QStyleOptionToolBoxV2 | ( | ) |
Contsructs a QStyleOptionToolBoxV2 object.
Definition at line 4786 of file qstyleoption.cpp.
|
inline |
Constructs a QStyleOptionToolBoxV2 copy of the other style option.
Definition at line 660 of file qstyleoption.h.
QStyleOptionToolBoxV2::QStyleOptionToolBoxV2 | ( | const QStyleOptionToolBox & | other | ) |
Constructs a QStyleOptionToolBoxV2 copy of the other style option which can be either of the QStyleOptionToolBoxV2 or QStyleOptionToolBox types.
If the other style option's version is 1, the new style option's position value is set to QStyleOptionToolBoxV2::Beginning and selectedPosition is set to QStyleOptionToolBoxV2::NotAdjacent . If its version is 2, the position selectedPosition values are simply copied to the new style option.
Definition at line 4822 of file qstyleoption.cpp.
|
protected |
Definition at line 4803 of file qstyleoption.cpp.
QStyleOptionToolBoxV2 & QStyleOptionToolBoxV2::operator= | ( | const QStyleOptionToolBox & | other | ) |
Assigns the other style option to this style option.
The other style option can be either of the QStyleOptionToolBoxV2 or QStyleOptionToolBox types.
If the {other} style option's version is 1, this style option's position and selectedPosition values are set to QStyleOptionToolBoxV2::Beginning and QStyleOptionToolBoxV2::NotAdjacent respectively. If its version is 2, these values are simply copied to this style option.
Definition at line 4843 of file qstyleoption.cpp.
TabPosition QStyleOptionToolBoxV2::position |
Definition at line 656 of file qstyleoption.h.
Referenced by operator=(), and QStyleOptionToolBoxV2().
QStyleOptionToolBoxV2::selectedPosition |
the position of the selected tab in relation to this tab
The default value is NotAdjacent, i.e. the tab is not adjacent to a selected tab nor is it the selected tab.
Definition at line 657 of file qstyleoption.h.
Referenced by operator=(), and QStyleOptionToolBoxV2().