QStyleOptionProgressBar Class Reference

#include <qstyleoption.h>

Inheritance diagram for QStyleOptionProgressBar:

Inheritance graph
[legend]
Collaboration diagram for QStyleOptionProgressBar:

Collaboration graph
[legend]
List of all members.

Detailed Description

The QStyleOptionProgressBar class is used to describe the parameters necessary for drawing a progress bar.

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.

See also:
QStyleOptionProgressBarV2, QStyleOption

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)


Member Enumeration Documentation

enum QStyleOptionProgressBar::StyleOptionType

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.

See also:
StyleOptionVersion

Reimplemented from QStyleOption.

Definition at line 304 of file qstyleoption.h.

00304 { Type = SO_ProgressBar };

enum QStyleOptionProgressBar::StyleOptionVersion

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.

See also:
StyleOptionType

Reimplemented from QStyleOption.

Definition at line 305 of file qstyleoption.h.

00305 { Version = 1 };


Constructor & Destructor Documentation

QStyleOptionProgressBar::QStyleOptionProgressBar (  ) 

Constructs a QStyleOptionProgressBar, initializing the members variables to their default values.

Definition at line 1730 of file qstyleoption.cpp.

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 }


Member Data Documentation

int QStyleOptionProgressBar::minimum

Definition at line 307 of file qstyleoption.h.

Referenced by getStyleOption(), QProgressBarPrivate::getStyleOption(), and TorrentViewDelegate::paint().

int QStyleOptionProgressBar::maximum

Definition at line 308 of file qstyleoption.h.

Referenced by getStyleOption(), QProgressBarPrivate::getStyleOption(), and TorrentViewDelegate::paint().

int QStyleOptionProgressBar::progress

Definition at line 309 of file qstyleoption.h.

Referenced by getStyleOption(), QProgressBarPrivate::getStyleOption(), and TorrentViewDelegate::paint().

QString QStyleOptionProgressBar::text

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().

bool QStyleOptionProgressBar::textVisible

Definition at line 312 of file qstyleoption.h.

Referenced by getStyleOption(), QProgressBarPrivate::getStyleOption(), and TorrentViewDelegate::paint().


The documentation for this class was generated from the following files:
Generated on Thu Mar 15 19:10:33 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1