CopperSpice API  1.7.2
QStyleOptionToolButton Class Reference

The QStyleOptionToolButton class is used to describe the parameters for drawing a tool button. More...

Inheritance diagram for QStyleOptionToolButton:
QStyleOptionComplex QStyleOption

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=SO_Default)
 
 ~QStyleOption ()
 
void initFrom (const QWidget *widget)
 
QStyleOption & operator= (const QStyleOption &other)
 

Additional Inherited Members

Detailed Description

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.

See also
QStyleOption, QStyleOptionComplex, QStyleOptionButton

Member Typedef Documentation

Member Enumeration Documentation

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

ConstantValueDescription
QStyleOptionToolButton::TypeSO_ToolButton The type of style option provided (SO_ToolButton 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
QStyleOptionToolButton::Version11
See also
StyleOptionType, qstyleoption_cast()

Describes the various features that a tool button can have.

ConstantValueDescription
QStyleOptionToolButton::None0x00A normal tool button.
QStyleOptionToolButton::Arrow0x01The tool button is an arrow.
QStyleOptionToolButton::Menu0x04The tool button has a menu.
QStyleOptionToolButton::PopupDelay0x08There is a delay to showing the menu.
QStyleOptionToolButton::HasMenu0x10The button has a popup menu.
QStyleOptionToolButton::MenuButtonPopupMenu The button should display an arrow to indicate that a menu is present.
See also
features, QToolButton::toolButtonStyle(), QToolButton::popupMode()

Constructor & Destructor Documentation

QStyleOptionToolButton::QStyleOptionToolButton ( )

Constructs an empty QStyleOptionToolButton.

QStyleOptionToolButton::QStyleOptionToolButton ( const QStyleOptionToolButton &  other)
inline

Copy constructs a new QStyleOptionToolButton from other.

Method Documentation

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

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