#include <qstyleoption.h>
Inheritance diagram for QStyleOptionProgressBar:


Since Qt 4.1, Qt uses the QStyleOptionProgressBarV2 subclass for drawing QProgressBar.
An instance of the QStyleOptionProgressBar class has type SO_ProgressBar and version 1.
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 don't need to check it.
If you create your own QStyle subclass, you should handle both QStyleOptionProgressBar and QStyleOptionProgressBarV2.
For an example demonstrating how style options can be used, see the {widgets/styles}{Styles} example.
Definition at line 301 of file qstyleoption.h.
Public Types | |
| enum | StyleOptionType |
| enum | StyleOptionVersion |
Public Member Functions | |
| QStyleOptionProgressBar () | |
| QStyleOptionProgressBar (const QStyleOptionProgressBar &other) | |
Public Attributes | |
| int | minimum |
| int | maximum |
| int | progress |
| QString | text |
| Qt::Alignment | textAlignment |
| bool | textVisible |
Protected Member Functions | |
| QStyleOptionProgressBar (int version) | |
This enum is used to hold information about the type of the style option, and is defined for each QStyleOption subclass.
Type The type of style option provided ({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.
Reimplemented from QStyleOption.
Definition at line 304 of file qstyleoption.h.
00304 { Type = SO_ProgressBar };
This enum is used to hold information about the version of the style option, and is defined for each QStyleOption subclass.
Version 1
The version is used by QStyleOption subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast(), you normally don't need to check it.
Reimplemented from QStyleOption.
Definition at line 305 of file qstyleoption.h.
00305 { Version = 1 };
| QStyleOptionProgressBar::QStyleOptionProgressBar | ( | ) |
Constructs a QStyleOptionProgressBar, initializing the members variables to their default values.
Definition at line 1730 of file qstyleoption.cpp.
01731 : QStyleOption(QStyleOptionProgressBar::Version, SO_ProgressBar), 01732 minimum(0), maximum(0), progress(0), textAlignment(Qt::AlignLeft), textVisible(false) 01733 { 01734 }
| QStyleOptionProgressBar::QStyleOptionProgressBar | ( | const QStyleOptionProgressBar & | other | ) | [inline] |
Constructs a copy of the other style option.
Definition at line 315 of file qstyleoption.h.
00315 : QStyleOption(Version, Type) { *this = other; }
| QStyleOptionProgressBar::QStyleOptionProgressBar | ( | int | version | ) | [protected] |
Definition at line 1739 of file qstyleoption.cpp.
01740 : QStyleOption(version, SO_ProgressBar), 01741 minimum(0), maximum(0), progress(0), textAlignment(Qt::AlignLeft), textVisible(false) 01742 { 01743 }
Definition at line 307 of file qstyleoption.h.
Referenced by getStyleOption(), QProgressBarPrivate::getStyleOption(), and TorrentViewDelegate::paint().
Definition at line 308 of file qstyleoption.h.
Referenced by getStyleOption(), QProgressBarPrivate::getStyleOption(), and TorrentViewDelegate::paint().
Definition at line 309 of file qstyleoption.h.
Referenced by getStyleOption(), QProgressBarPrivate::getStyleOption(), and TorrentViewDelegate::paint().
Definition at line 310 of file qstyleoption.h.
Referenced by getStyleOption(), QProgressBarPrivate::getStyleOption(), and TorrentViewDelegate::paint().
| Qt::Alignment QStyleOptionProgressBar::textAlignment |
Definition at line 311 of file qstyleoption.h.
Referenced by getStyleOption(), QProgressBarPrivate::getStyleOption(), and TorrentViewDelegate::paint().
Definition at line 312 of file qstyleoption.h.
Referenced by getStyleOption(), QProgressBarPrivate::getStyleOption(), and TorrentViewDelegate::paint().
1.5.1