QtBase  v6.3.1
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
QStyleOptionProgressBar Class Reference

a bitwise OR of the features that describe this button More...

#include <qstyleoption.h>

Inheritance diagram for QStyleOptionProgressBar:
Inheritance graph
[legend]
Collaboration diagram for QStyleOptionProgressBar:
Collaboration graph
[legend]

Public Types

enum  StyleOptionType { Type = SO_ProgressBar }
 
enum  StyleOptionVersion { Version = 1 }
 
- Public Types inherited from QStyleOption
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
}
 
enum  StyleOptionType { Type = SO_Default }
 
enum  StyleOptionVersion { Version = 1 }
 

Public Member Functions

 QStyleOptionProgressBar ()
 
 QStyleOptionProgressBar (const QStyleOptionProgressBar &other)
 
QStyleOptionProgressBaroperator= (const QStyleOptionProgressBar &)=default
 
- Public Member Functions inherited from QStyleOption
 QStyleOption (int version=QStyleOption::Version, int type=SO_Default)
 
 QStyleOption (const QStyleOption &other)
 
 ~QStyleOption ()
 
void initFrom (const QWidget *w)
 
QStyleOptionoperator= (const QStyleOption &other)
 

Public Attributes

int minimum
 
int maximum
 
int progress
 
QString text
 
Qt::Alignment textAlignment
 
bool textVisible
 
bool invertedAppearance
 
bool bottomToTop
 
- Public Attributes inherited from QStyleOption
int version
 
int type
 
QStyle::State state
 
Qt::LayoutDirection direction
 
QRect rect
 
QFontMetrics fontMetrics
 
QPalette palette
 
QObjectstyleObject
 

Protected Member Functions

 QStyleOptionProgressBar (int version)
 

Additional Inherited Members

Detailed Description

a bitwise OR of the features that describe this button

\variable QStyleOptionButton::features

See also
ButtonFeature

\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.

See also
iconSize

\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.

For an example demonstrating how style options can be used, see the \l {widgets/styles}{Styles} example.

See also
QStyleOption

Definition at line 345 of file qstyleoption.h.

Member Enumeration Documentation

◆ StyleOptionType

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.

See also
StyleOptionVersion
Enumerator
Type 

Definition at line 348 of file qstyleoption.h.

◆ StyleOptionVersion

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.

See also
StyleOptionType
Enumerator
Version 

Definition at line 349 of file qstyleoption.h.

Constructor & Destructor Documentation

◆ QStyleOptionProgressBar() [1/3]

QStyleOptionProgressBar::QStyleOptionProgressBar ( )

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

Definition at line 1525 of file qstyleoption.cpp.

◆ QStyleOptionProgressBar() [2/3]

QStyleOptionProgressBar::QStyleOptionProgressBar ( const QStyleOptionProgressBar other)
inline

Constructs a copy of the other style option.

Definition at line 361 of file qstyleoption.h.

Here is the call graph for this function:

◆ QStyleOptionProgressBar() [3/3]

QStyleOptionProgressBar::QStyleOptionProgressBar ( int  version)
protected

Definition at line 1533 of file qstyleoption.cpp.

Member Function Documentation

◆ operator=()

QStyleOptionProgressBar& QStyleOptionProgressBar::operator= ( const QStyleOptionProgressBar )
default

Member Data Documentation

◆ bottomToTop

bool QStyleOptionProgressBar::bottomToTop

Definition at line 358 of file qstyleoption.h.

◆ invertedAppearance

bool QStyleOptionProgressBar::invertedAppearance

Definition at line 357 of file qstyleoption.h.

◆ maximum

int QStyleOptionProgressBar::maximum

Definition at line 352 of file qstyleoption.h.

◆ minimum

int QStyleOptionProgressBar::minimum

Definition at line 351 of file qstyleoption.h.

◆ progress

int QStyleOptionProgressBar::progress

Definition at line 353 of file qstyleoption.h.

◆ text

QString QStyleOptionProgressBar::text

Definition at line 354 of file qstyleoption.h.

◆ textAlignment

Qt::Alignment QStyleOptionProgressBar::textAlignment

Definition at line 355 of file qstyleoption.h.

◆ textVisible

bool QStyleOptionProgressBar::textVisible

Definition at line 356 of file qstyleoption.h.


The documentation for this class was generated from the following files: