#include <kgameprogress.h>
Public Types | |
| enum | BarStyle { Solid, Blocked } |
| Possible values for bar style. More... | |
Public Slots | |
| void | setFormat (const QString &format) |
| Set the format of the text to use to display status. | |
| void | setValue (int value) |
Set the current value of the progress bar to value. | |
| void | advance (int prog) |
Advance the progress bar by prog. | |
Signals | |
| void | percentageChanged (int) |
| Emitted when the state of the progress bar changes. | |
Public Member Functions | |
| KGameProgress (QWidget *parent=0, const char *name=0) | |
| Construct a horizontal progress bar. | |
| KGameProgress (Orientation orient, QWidget *parent=0, const char *name=0) | |
Construct a progress bar with orientation orient. | |
| KGameProgress (int minValue, int maxValue, int value, Orientation, QWidget *parent=0, const char *name=0) | |
| Construct a progress bar with minimum, maximum and initial values. | |
| ~KGameProgress () | |
| Destruct the progress bar. | |
| void | setBarStyle (BarStyle style) |
| Set the progress bar style. | |
| void | setBarColor (const QColor &) |
| Set the color of the progress bar. | |
| void | setBarPixmap (const QPixmap &) |
| Set a pixmap to be shown in the progress bar. | |
| void | setOrientation (Orientation) |
| Set the orientation of the progress bar. | |
| void | setTextEnabled (bool) |
If this is set to true, the progress text will be displayed. | |
| BarStyle | barStyle () const |
| Retrieve the bar style. | |
| const QColor & | barColor () const |
| Retrieve the bar color. | |
| const QPixmap * | barPixmap () const |
| Retrieve the bar pixmap. | |
| int | value () const |
| Retrive the current status. | |
| Orientation | orientation () const |
| Retrive the orientation of the progress bar. | |
| bool | textEnabled () const |
Returns true if progress text will be displayed, false otherwise. | |
| virtual QSize | sizeHint () const |
| virtual QSize | minimumSizeHint () const |
| virtual QSizePolicy | sizePolicy () const |
| QString | format () const |
| Retrieve the current format for printing status text. | |
Protected Member Functions | |
| void | valueChange () |
| void | rangeChange () |
| void | styleChange (QStyle &) |
| void | paletteChange (const QPalette &) |
| void | drawContents (QPainter *) |
Properties | |
| int | value |
| BarStyle | barStyle |
| QColor | barColor |
| QPixmap | barPixmap |
| Orientation | orientation |
| bool | textEnabled |
KGameProgress is derived from QFrame and QRangeControl, so you can use all the methods from those classes. The only difference is that setValue() is now made a slot, so you can connect stuff to it.
None of the constructors take line step and page step as arguments, so by default they're set to 1 and 10 respectively.
The Blocked style ignores the textEnabled() setting and displays no text, since it looks truly ugly (and for other reasons). Signal percentageChanged() is emitted whenever the value changes so you can set up a different widget to display the current percentage complete and connect the signal to it.
Definition at line 50 of file kgameprogress.h.
|
|
Possible values for bar style.
Definition at line 68 of file kgameprogress.h. |
|
||||||||||||
|
Construct a horizontal progress bar.
Definition at line 32 of file kgameprogress.cpp. |
|
||||||||||||||||
|
Construct a progress bar with orientation
Definition at line 40 of file kgameprogress.cpp. |
|
||||||||||||||||||||||||||||
|
Construct a progress bar with minimum, maximum and initial values.
Definition at line 48 of file kgameprogress.cpp. |
|
|
Destruct the progress bar.
Definition at line 57 of file kgameprogress.cpp. |
|
|
Advance the progress bar by This method is provided for convenience and is equivalent with setValue(value()+prog). Definition at line 62 of file kgameprogress.cpp. References setValue(), and value(). |
|
|
Retrieve the bar color.
|
|
|
Retrieve the bar pixmap.
|
|
|
Retrieve the bar style.
|
|
|
Definition at line 260 of file kgameprogress.cpp. |
|
|
Retrieve the current format for printing status text.
Definition at line 340 of file kgameprogress.cpp. |
|
|
Definition at line 167 of file kgameprogress.cpp. References sizeHint(). Here is the call graph for this function: ![]() |
|
|
Retrive the orientation of the progress bar.
Referenced by sizeHint(), and sizePolicy(). |
|
|
Definition at line 229 of file kgameprogress.cpp. References paletteChange(). Referenced by paletteChange(). Here is the call graph for this function: ![]() |
|
|
Emitted when the state of the progress bar changes.
Referenced by rangeChange(), and valueChange(). |
|
|
Definition at line 203 of file kgameprogress.cpp. References percentageChanged(). |
|
|
Set the color of the progress bar.
Definition at line 103 of file kgameprogress.cpp. |
|
|
Set a pixmap to be shown in the progress bar.
Definition at line 93 of file kgameprogress.cpp. |
|
|
Set the progress bar style.
Allowed values are Definition at line 113 of file kgameprogress.cpp. |
|
|
Set the format of the text to use to display status. The default format is "%p%" (which looks like "42%".)
Definition at line 335 of file kgameprogress.cpp. |
|
|
Set the orientation of the progress bar.
Allowed values are Definition at line 121 of file kgameprogress.cpp. |
|
|
If this is set to
Definition at line 134 of file kgameprogress.cpp. |
|
|
Set the current value of the progress bar to This must be a number in the range 0..100. Definition at line 129 of file kgameprogress.cpp. Referenced by advance(). |
|
|
Definition at line 154 of file kgameprogress.cpp. References orientation(). Referenced by minimumSizeHint(). Here is the call graph for this function: ![]() |
|
|
Definition at line 172 of file kgameprogress.cpp. References orientation(). Here is the call graph for this function: ![]() |
|
|
Definition at line 209 of file kgameprogress.cpp. |
|
|
Returns
|
|
|
Retrive the current status.
Definition at line 146 of file kgameprogress.h. Referenced by advance(). |
|
|
Definition at line 197 of file kgameprogress.cpp. References percentageChanged(). |
|
|
Definition at line 56 of file kgameprogress.h. |
|
|
Definition at line 57 of file kgameprogress.h. |
|
|
Definition at line 55 of file kgameprogress.h. |
|
|
Definition at line 58 of file kgameprogress.h. |
|
|
Definition at line 59 of file kgameprogress.h. |
|
|
Definition at line 54 of file kgameprogress.h. |
1.4.6