![]() |
CopperSpice API
2.0.0
|
The QStyleOptionToolButton class is used to describe the parameters for drawing a tool button. More...
Public Typedefs | |
| using | ToolButtonFeatures = QFlags< ToolButtonFeature > |
Public Types | |
| enum | StyleOptionType |
| enum | StyleOptionVersion |
| enum | ToolButtonFeature |
Public Types inherited from QStyleOptionComplex | |
| enum | StyleOptionType |
| enum | StyleOptionVersion |
Public Types inherited from QStyleOption | |
| enum | OptionType |
| enum | StyleOptionType |
| enum | StyleOptionVersion |
Public Methods | |
| QStyleOptionToolButton () | |
| QStyleOptionToolButton (const QStyleOptionToolButton &other) | |
| QStyleOptionToolButton & | operator= (const QStyleOptionToolButton &other) = default |
Public Methods inherited from QStyleOptionComplex | |
| QStyleOptionComplex (const QStyleOptionComplex &other) | |
| QStyleOptionComplex (int version=QStyleOptionComplex::Version, int type=SO_Complex) | |
| QStyleOptionComplex & | operator= (const QStyleOptionComplex &other) = default |
Public Methods inherited from QStyleOption | |
| QStyleOption (const QStyleOption &other) | |
| QStyleOption (int version=QStyleOption::Version, int type=QStyleOption::SO_Default) | |
| ~QStyleOption () | |
| void | initFrom (const QWidget *widget) |
| QStyleOption & | operator= (const QStyleOption &other) |
Public Members | |
| Qt::ArrowType | arrowType |
| ToolButtonFeatures | features |
| QFont | font |
| QIcon | icon |
| QSize | iconSize |
| QPoint | pos |
| QString | text |
| Qt::ToolButtonStyle | toolButtonStyle |
Public Members inherited from QStyleOption | |
| int | m_styleType |
| int | m_styleVersion |
Additional Inherited Members | |
Related Functions inherited from QStyleOption | |
| T | qstyleoption_cast (const QStyleOption *option) |
| T | qstyleoption_cast (QStyleOption *option) |
The QStyleOptionToolButton class is used to describe the parameters for drawing a tool button. QStyleOptionToolButton contains all the information that QStyle functions need to draw QToolButton.
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.
Typedef for QFlags<ToolButtonFeature> which contains an OR combination of ToolButtonFeature values.
Refer to QStyleOptionToolButton::ToolButtonFeature for the enum documentation.
This enum is used to hold information about the type of the style option and is defined for each QStyleOption subclass.
| Constant | Value | Description |
|---|---|---|
QStyleOptionToolButton::Type | SO_ToolButton | The type of style option provided (SO_ToolButton for this class). |
This enum is used to hold information about the version of the style option and is defined for each QStyleOption subclass.
| Constant | Value | Description |
|---|---|---|
QStyleOptionToolButton::Version | 1 | 1 |
Describes the various features that a tool button can have.
| Constant | Value | Description |
|---|---|---|
QStyleOptionToolButton::None | 0x00 | A normal tool button. |
QStyleOptionToolButton::Arrow | 0x01 | Tool button is an arrow. |
QStyleOptionToolButton::Menu | 0x04 | Tool button has a menu. |
QStyleOptionToolButton::PopupDelay | 0x08 | There is a delay to showing the menu. |
QStyleOptionToolButton::HasMenu | 0x10 | Button has a popup menu. |
QStyleOptionToolButton::MenuButtonPopup | Menu | Button should display an arrow to indicate a menu is present. |
| QStyleOptionToolButton::QStyleOptionToolButton | ( | ) |
Constructs an empty QStyleOptionToolButton.
|
inline |
Copy constructs a new QStyleOptionToolButton from other.
|
default |
Copy assigns from other and returns a reference to this object.
| Qt::ArrowType QStyleOptionToolButton::arrowType |
This variable indicates the direction of the arrow for the tool button. The value is only used if QStyleOptionToolButton::features includes the Arrow flag. The default value is Qt::DownArrow.
| ToolButtonFeatures QStyleOptionToolButton::features |
This variable contains a set of flags from QStyleOptionToolButton::ToolButtonFeature which indicate the behavior of the tool button. The default value is QStyleOptionToolButton::None.
| QFont QStyleOptionToolButton::font |
This variable holds the font used for the text on the button. This value is only used if QStyleOptionToolButton::toolButtonStyle is Qt::ToolButtonTextUnderIcon, Qt::ToolButtonTextBesideIcon, or Qt::ToolButtonTextOnly. By default the application default font is used.
| QIcon QStyleOptionToolButton::icon |
This variable contains the icon for the tool button. The default value is an empty icon.
| QSize QStyleOptionToolButton::iconSize |
| QPoint QStyleOptionToolButton::pos |
This variable contains the position of the tool button. The default value is a QPoint(0, 0).
| QString QStyleOptionToolButton::text |
This variable contains the text for the tool button. This value is only used if QStyleOptionToolButton::toolButtonStyle is Qt::ToolButtonTextUnderIcon, Qt::ToolButtonTextBesideIcon, or Qt::ToolButtonTextOnly. The default value is an empty string.
| Qt::ToolButtonStyle QStyleOptionToolButton::toolButtonStyle |
This variable holds a Qt::ToolButtonStyle value describing the appearance of the tool button. The default value is Qt::ToolButtonIconOnly.