![]() |
Qt 6.x
The Qt SDK
|
\variable QStyleOptionButton::features More...
#include <qstyleoption.h>
Public Types | |
enum | StyleOptionType { Type = SO_ProgressBar } |
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... | |
![]() | |
enum | OptionType { SO_Default , SO_FocusRect , SO_Button , SO_Tab , SO_MenuItem , SO_Frame , SO_ProgressBar , SO_ToolBox , SO_Header , SO_DockWidget , SO_ViewItem , SO_TabWidgetFrame , SO_TabBarBase , SO_RubberBand , SO_ToolBar , SO_GraphicsItem , SO_Complex = 0xf0000 , SO_Slider , SO_SpinBox , SO_ToolButton , SO_ComboBox , 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 Member Functions | |
QStyleOptionProgressBar () | |
Constructs a QStyleOptionProgressBar, initializing the members variables to their default values. | |
QStyleOptionProgressBar (const QStyleOptionProgressBar &other) | |
Constructs a copy of the other style option. | |
QStyleOptionProgressBar & | operator= (const QStyleOptionProgressBar &)=default |
![]() | |
QStyleOption (int version=QStyleOption::Version, int type=SO_Default) | |
Constructs a QStyleOption with the specified version and type. | |
QStyleOption (const QStyleOption &other) | |
Constructs a copy of other. | |
~QStyleOption () | |
Destroys this style option object. | |
void | initFrom (const QWidget *w) |
QStyleOption & | operator= (const QStyleOption &other) |
Assign other to this QStyleOption. | |
Public Attributes | |
int | minimum |
int | maximum |
int | progress |
QString | text |
Qt::Alignment | textAlignment |
bool | textVisible |
bool | invertedAppearance |
bool | bottomToTop |
![]() | |
int | version |
int | type |
QStyle::State | state |
Qt::LayoutDirection | direction |
QRect | rect |
QFontMetrics | fontMetrics |
QPalette | palette |
QObject * | styleObject |
Protected Member Functions | |
QStyleOptionProgressBar (int version) | |
Additional Inherited Members | |
![]() | |
template< typename T > T | qstyleoption_cast (const QStyleOption *option) |
\variable QStyleOptionTitleBar::text | |
template< typename T > 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. | |
\variable QStyleOptionButton::features
a bitwise OR of the features that describe this button
\variable QStyleOptionButton::text
the text of the button
The default value is an empty string.
\variable QStyleOptionButton::icon
the icon of the button
The default value is an empty icon, i.e. an icon with neither a pixmap nor a filename.
\variable QStyleOptionButton::iconSize
the size of the icon for the button
The default value is QSize(-1, -1), i.e. an invalid size.
The QStyleOptionProgressBar class is used to describe the parameters necessary for drawing a progress bar.
\inmodule QtWidgets
An instance of the QStyleOptionProgressBar class has type SO_ProgressBar 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.
For performance reasons, there are few member functions and the access to the member variables is direct (i.e., using the . or
->
operator). This makes the structures straightforward to use and emphasizes that these are simply parameters used by the style functions.
Definition at line 310 of file qstyleoption.h.
This enum is used to hold information about the type of the style option, and is defined for each QStyleOption subclass.
\value Type The type of style option provided (\l{SO_ProgressBar} 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.
Enumerator | |
---|---|
Type |
Definition at line 313 of file qstyleoption.h.
This enum is used to hold information about the version of the style option, and is defined for each QStyleOption subclass.
\value Version 2
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.
Enumerator | |
---|---|
Version |
Definition at line 314 of file qstyleoption.h.
QStyleOptionProgressBar::QStyleOptionProgressBar | ( | ) |
Constructs a QStyleOptionProgressBar, initializing the members variables to their default values.
Definition at line 1463 of file qstyleoption.cpp.
|
inline |
Constructs a copy of the other style option.
Definition at line 326 of file qstyleoption.h.
References other().
|
protected |
Definition at line 1471 of file qstyleoption.cpp.
References QStyleOption::state, and QStyle::State_Horizontal.
|
default |
bool QStyleOptionProgressBar::bottomToTop |
Definition at line 323 of file qstyleoption.h.
bool QStyleOptionProgressBar::invertedAppearance |
Definition at line 322 of file qstyleoption.h.
int QStyleOptionProgressBar::maximum |
Definition at line 317 of file qstyleoption.h.
int QStyleOptionProgressBar::minimum |
Definition at line 316 of file qstyleoption.h.
int QStyleOptionProgressBar::progress |
Definition at line 318 of file qstyleoption.h.
QString QStyleOptionProgressBar::text |
Definition at line 319 of file qstyleoption.h.
Qt::Alignment QStyleOptionProgressBar::textAlignment |
Definition at line 320 of file qstyleoption.h.
bool QStyleOptionProgressBar::textVisible |
Definition at line 321 of file qstyleoption.h.