|
|
Stylized progress bar.
KProgress is derived from QFrame and QRangeControl, so you can use all the methods from those classes. The only difference is that setValue(int) 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(int) 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.
enum |
Possible values for orientation.
enum |
Possible values for bar style.
Solid means one continuous progress bar, Blocked means a progress bar made up of several blocks.
|
Construct a default KProgress bar. Orientation is horizontal.
|
Construct a KProgress bar with an orientation.
|
Construct a KProgress bar with minimum, maximum and initial values.
~ |
Destructor
void |
Set the progress bar style.
Allowed values are Solid
and Blocked
.
void |
Set the color of the progress bar.
void |
Set a pixmap to be shown in the progress bar.
void |
Set the orientation of the progress bar.
Allowed values are Horizonzal
and Vertical
.
void |
If this is set to true
, the progress text will be displayed.
BarStyle |
[const]
Retrieve the bar style.
const QColor & |
[const]
Retrieve the bar color.
const QPixmap * |
[const]
Retrieve the bar pixmap.
Orientation |
[const]
Retrieve the orientation.
bool |
[const]
Returns: true
if progress text will be displayed, false
otherwise.
QSize |
[const virtual]
Retrieve the recommended width for vertical progress bars or the recommended height for horizontal progress bars
void |
Set the format of the text to use to display status.
The default format is "%p%" (which looks like "42%".)
Parameters:
format | %p is replaced by percentage done, %v is replaced by actual value, %m is replaced by the maximum value. |
QString |
[const]
Returns: The current format for printing status text.
void |
[slot]
Set the current value of the progress bar (0%-100%).
void |
[slot]
Advance the progress bar by prog
.
void |
[signal]
Emitted when the state of the progress bar changes.