KGameProgress Class Reference
A progress indicator widget. More...
#include <kgameprogress.h>
Inheritance diagram for KGameProgress:

Public Types | |
enum | BarStyle { Solid, Blocked } |
Public Slots | |
void | setFormat (const QString &format) |
void | setValue (int value) |
void | advance (int prog) |
Signals | |
void | percentageChanged (int) |
Public Member Functions | |
KGameProgress (QWidget *parent=0, const char *name=0) | |
KGameProgress (Orientation orient, QWidget *parent=0, const char *name=0) | |
KGameProgress (int minValue, int maxValue, int value, Orientation, QWidget *parent=0, const char *name=0) | |
~KGameProgress () | |
void | setBarStyle (BarStyle style) |
void | setBarColor (const QColor &) |
void | setBarPixmap (const QPixmap &) |
void | setOrientation (Orientation) |
void | setTextEnabled (bool) |
BarStyle | barStyle () const |
const QColor & | barColor () const |
const QPixmap * | barPixmap () const |
int | value () const |
Orientation | orientation () const |
bool | textEnabled () const |
virtual QSize | sizeHint () const |
virtual QSize | minimumSizeHint () const |
virtual QSizePolicy | sizePolicy () const |
QString | format () const |
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 |
Detailed Description
A progress indicator widget.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.
- Author:
- Martynas Kunigelis
- Version:
- Id
- kgameprogress.h,v 1.2 2003/10/12 13:32:56 bhards Exp
Definition at line 50 of file kgameprogress.h.
Member Enumeration Documentation
|
Possible values for bar style.
Definition at line 68 of file kgameprogress.h. |
Constructor & Destructor Documentation
|
Construct a horizontal progress bar.
Definition at line 32 of file kgameprogress.cpp. References KGameProgress(). Referenced by KGameProgress(). |
|
Construct a progress bar with orientation
Definition at line 40 of file kgameprogress.cpp. References KGameProgress(). |
|
Construct a progress bar with minimum, maximum and initial values.
Definition at line 48 of file kgameprogress.cpp. References KGameProgress(). |
|
Destruct the progress bar.
Definition at line 57 of file kgameprogress.cpp. |
Member Function Documentation
|
Set the progress bar style.
Allowed values are Definition at line 113 of file kgameprogress.cpp. References setBarStyle(). Referenced by setBarStyle(). |
|
Set the color of the progress bar.
Definition at line 103 of file kgameprogress.cpp. References setBarColor(). Referenced by setBarColor(). |
|
Set a pixmap to be shown in the progress bar.
Definition at line 93 of file kgameprogress.cpp. References setBarPixmap(). Referenced by setBarPixmap(). |
|
Set the orientation of the progress bar.
Allowed values are Definition at line 121 of file kgameprogress.cpp. References setOrientation(). Referenced by setOrientation(). |
|
If this is set to
Definition at line 134 of file kgameprogress.cpp. References setTextEnabled(). Referenced by setTextEnabled(). |
|
Retrieve the bar style.
|
|
Retrieve the bar color.
|
|
Retrieve the bar pixmap.
|
|
Retrive the current status.
Definition at line 146 of file kgameprogress.h. Referenced by advance(). |
|
Retrive the orientation of the progress bar.
|
|
Returns
|
|
Retrieve the current format for printing status text.
Definition at line 340 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. References setFormat(). Referenced by setFormat(). |
|
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. References setValue(). Referenced by advance(), and setValue(). |
|
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 advance(), setValue(), and value(). Referenced by advance(). |
|
Emitted when the state of the progress bar changes.
|
The documentation for this class was generated from the following files: