QStyleOptionToolBoxV2 Class

The QStyleOptionToolBoxV2 class is used to describe the parameters necessary for drawing a frame in Qt 4.3 or above. 更多...

头: #include <QStyleOptionToolBoxV2>
Since: Qt 4.3
继承: QStyleOptionToolBox

公共类型

enum SelectedPosition { NotAdjacent, NextIsSelected, PreviousIsSelected }
enum StyleOptionVersion { Version }
enum TabPosition { Beginning, Middle, End, OnlyOneTab }

公共函数

QStyleOptionToolBoxV2 ()
QStyleOptionToolBoxV2 (const QStyleOptionToolBoxV2 & other )
QStyleOptionToolBoxV2 (const QStyleOptionToolBox & other )
QStyleOptionToolBoxV2 & operator= (const QStyleOptionToolBox & other )

公共变量

SelectedPosition selectedPosition

详细描述

The QStyleOptionToolBoxV2 class is used to describe the parameters necessary for drawing a frame in Qt 4.3 or above.

QStyleOptionToolBoxV2 继承 QStyleOptionToolBox which is used for drawing the tabs in a QToolBox .

An instance of the QStyleOptionToolBoxV2 class has type SO_ToolBox and version 2. The type is used internally by QStyleOption ,其子类,和 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 子类以实现扩展在不破坏兼容性的情况下。若使用 qstyleoption_cast (),通常不需要校验它。

If you create your own QStyle subclass, you should handle both QStyleOptionToolBox and QStyleOptionToolBoxV2 .

另请参阅 QStyleOptionToolBox and QStyleOption .

成员类型文档编制

enum QStyleOptionToolBoxV2:: SelectedPosition

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.

常量 描述
QStyleOptionToolBoxV2::NotAdjacent 0 The tab is not adjacent to a selected tab (or is the selected tab).
QStyleOptionToolBoxV2::NextIsSelected 1 The next tab (typically the tab on the right) is selected.
QStyleOptionToolBoxV2::PreviousIsSelected 2 The previous tab (typically the tab on the left) is selected.

另请参阅 selectedPosition .

enum QStyleOptionToolBoxV2:: StyleOptionVersion

This enum holds the version of this style option

常量 描述
QStyleOptionToolBoxV2::Version 2 2

enum QStyleOptionToolBoxV2:: TabPosition

This enum describes tab positions relative to other tabs.

常量 描述
QStyleOptionToolBoxV2::Beginning 0 The tab is the first (i.e., top-most) tab in the toolbox.
QStyleOptionToolBoxV2::Middle 1 The tab is placed in the middle of the toolbox.
QStyleOptionToolBoxV2::End 2 The tab is placed at the bottom of the toolbox.
QStyleOptionToolBoxV2::OnlyOneTab 3 There is only one tab in the toolbox.

成员函数文档编制

QStyleOptionToolBoxV2:: QStyleOptionToolBoxV2 ()

Contsructs a QStyleOptionToolBoxV2 对象。

QStyleOptionToolBoxV2:: QStyleOptionToolBoxV2 (const QStyleOptionToolBoxV2 & other )

构造 QStyleOptionToolBoxV2 copy of the other 样式选项。

QStyleOptionToolBoxV2:: QStyleOptionToolBoxV2 (const QStyleOptionToolBox & other )

构造 QStyleOptionToolBoxV2 copy of the other style option which can be either of the QStyleOptionToolBoxV2 or QStyleOptionToolBox 类型。

other style option's version is 1, the new style option's position value is set to QStyleOptionToolBoxV2::Beginning and selectedPosition 被设为 QStyleOptionToolBoxV2::NotAdjacent . If its version is 2, the position selectedPosition values are simply copied to the new style option.

另请参阅 version .

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

赋值 other style option to this style option. The other style option can be either of the QStyleOptionToolBoxV2 or QStyleOptionToolBox 类型。

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.

成员变量文档编制

SelectedPosition QStyleOptionToolBoxV2:: selectedPosition

This variable holds the position of the selected tab in relation to this tab.

默认值为 NotAdjacent , i.e. the tab is not adjacent to a selected tab nor is it the selected tab.