CopperSpice API
1.9.2
|
Describe the parameters for drawing a tab bar. More...
Public Typedefs | |
using | CornerWidgets = QFlags< CornerWidget > |
using | TabFeatures = QFlags< TabFeature > |
Public Types | |
enum | CornerWidget |
enum | SelectedPosition |
enum | StyleOptionType |
enum | StyleOptionVersion |
enum | TabFeature |
enum | TabPosition |
Public Types inherited from QStyleOption | |
enum | OptionType |
enum | StyleOptionType |
enum | StyleOptionVersion |
Public Methods | |
QStyleOptionTab () | |
QStyleOptionTab (const QStyleOptionTab &other) | |
QStyleOptionTab & | operator= (const QStyleOptionTab &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 | |
CornerWidgets | cornerWidgets |
bool | documentMode |
QIcon | icon |
QSize | iconSize |
QSize | leftButtonSize |
TabPosition | position |
QSize | rightButtonSize |
int | row |
SelectedPosition | selectedPosition |
QTabBar::Shape | shape |
QString | text |
Public Members inherited from QStyleOption | |
int | type |
int | version |
Additional Inherited Members | |
Related Functions inherited from QStyleOption | |
T | qstyleoption_cast (const QStyleOption *option) |
T | qstyleoption_cast (QStyleOption *option) |
The QStyleOptionTab class is used to describe the parameters for drawing a tab bar. This class is used for drawing several built-in CopperSpice widgets including QTabBar and the panel for QTabWidget.
An instance of the QStyleOptionTab class has type SO_Tab and version 3. 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.
Typedef for QFlags<CornerWidget> which contains an OR combination of CornerWidget values.
Refer to QStyleOptionTab::CornerWidget for the enum documentation.
Typedef for QFlags<TabFeature> which contains an OR combination of TabFeature values.
Refer to QStyleOptionTab::TabFeature for the enum documentation.
This enum indicates the corner widgets in a tab.
Constant | Value | Description |
---|---|---|
QStyleOptionTab::NoCornerWidgets | 0x00 | No corner widgets |
QStyleOptionTab::LeftCornerWidget | 0x01 | Left corner widget |
QStyleOptionTab::RightCornerWidget | 0x02 | Right corner widget |
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.
Constant | Value | Description |
---|---|---|
QStyleOptionTab::NotAdjacent | 0 | Tab is not adjacent to a selected tab (or is the selected tab) |
QStyleOptionTab::NextIsSelected | 1 | Next tab (typically the tab on the right) is selected |
QStyleOptionTab::PreviousIsSelected | 2 | Previous tab (typically the tab on the left) is selected |
This enum is used to hold information about the type of the style option and is defined for each QStyleOption subclass.
Constant | Value | Description |
---|---|---|
QStyleOptionTab::Type | SO_Tab | The type of style option provided (SO_Tab 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.
This enum is used to hold information about the version of the style option and is defined for each QStyleOption subclass.
Constant | Value | Description |
---|---|---|
QStyleOptionTab::Version | 3 | 3 |
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.
Describes the various features that a tab button can have.
Constant | Value | Description |
---|---|---|
QStyleOptionTab::None | 0x00 | Normal tab button |
QStyleOptionTab::HasFrame | 0x01 | Tab button is positioned on a tab frame |
This enum describes the position of the tab.
Constant | Value | Description |
---|---|---|
QStyleOptionTab::Beginning | 0 | Tab is the first tab in the tab bar |
QStyleOptionTab::Middle | 1 | Tab is neither the first nor the last tab in the tab bar. |
QStyleOptionTab::End | 2 | Tab is the last tab in the tab bar |
QStyleOptionTab::OnlyOneTab | 3 | Tab is both the first and the last tab in the tab bar |
QStyleOptionTab::QStyleOptionTab | ( | ) |
Constructs an empty QStyleOptionTab.
|
inline |
Copy constructs a new QStyleOptionTab from other.
|
default |
Copy assigns from other and returns a reference to this object.
QStyleOptionTab::cornerWidgets |
This variable holds an OR combination of CornerWidget values indicating the corner widgets of the tab bar. The default value is NoCornerWidgets.
QStyleOptionTab::documentMode |
This variable holds whether the tabbar is in document mode. The default value is false.
QStyleOptionTab::icon |
This variable holds the icon for the tab. The default value is an empty icon, which is an icon with neither a pixmap nor a filename.
QStyleOptionTab::iconSize |
This variable holds the size for the icons. The default value is QSize(-1, -1), which means an invalid size; use QStyle::pixelMetric() to find the default icon size for tab bars.
QStyleOptionTab::leftButtonSize |
This variable holds the size for the left widget on the tab. The default value is QSize(-1, -1), which is an invalid size.
QStyleOptionTab::position |
This variable holds the position of the tab in the tab bar. The default value is Beginning, which means the tab is the first tab in the tab bar.
QStyleOptionTab::rightButtonSize |
This variable holds the size for the right widget on the tab. The default value is QSize(-1, -1), which is an invalid size.
QStyleOptionTab::row |
This variable holds which row the tab is currently in. The default value is 0, indicating the front row. Currently this property can only be 0.
QStyleOptionTab::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.
QStyleOptionTab::shape |
This variable holds the tab shape used to draw the tabs. The default value is QTabBar::RoundedNorth.
QStyleOptionTab::text |
This variable holds the text of the tab. The default value is an empty string.