|
|
A stylized progress bar.
KProgress is derived from QProgressBar, so you can use all the methods from that class. The only real difference is that a signal is emitted on changes to the value and you do not need to subclass KProgress just to change the format of the indicator text.
KProgress (QWidget *parent=0, const char *name=0, WFlags f = 0)
| KProgress |
Construct a progress bar.
KProgress (int totalSteps, QWidget *parent=0, const char *name=0, WFlags f = 0)
| KProgress |
Construct a progress bar with a total number of steps. The totalSteps is the total number of steps that need to be completed for the operation which this progress bar represents. For example, if the operation is to examine 50 files, this value would be 50. Before examining the first file, call setProgress(0); call setProgress(50) after examining the last file.
~KProgress ()
| ~KProgress |
Destruct the progress bar.
void setTextEnabled (bool)
| setTextEnabled |
If this is set to true
, the progress text will be displayed.
int value ()
| value |
[const]
See also: setValue()
bool textEnabled ()
| textEnabled |
[const]
Returns true
if progress text will be displayed,
false
otherwise.
See also: setFormat()
QString format ()
| format |
[const]
Retrieve the current format for printing status text.
See also: setFormat()
void setRange (int min, int max)
| setRange |
Use setTotalSteps() instead
int maxValue ()
| maxValue |
void setFormat (const QString & format)
| setFormat |
[slot]
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. |
void setTotalSteps (int totalSteps)
| setTotalSteps |
[slot]
Set the current total number of steps in the action tat the progress bar is representing.
Reimplemented from QProgressBar.
void setProgress (int progress)
| setProgress |
[virtual slot]
Set the current value of the progress bar to value
.
Reimplemented from QProgressBar for internal purposes..
void setValue (int progress)
| setValue |
[slot]
void advance (int offset)
| advance |
[virtual slot]
Advance the progress bar by prog
.
This method is provided for convenience and is equivalent with setValue(value()+prog).
void percentageChanged (int)
| percentageChanged |
[signal]
Emitted when the state of the progress bar changes.
bool setIndicator (QString & indicator, int progress, int totalSteps)
| setIndicator |
[protected virtual]
Reimplemented from QProgressBar for internal purposes..
void virtual_hook ( int id, void* data )
| virtual_hook |
[protected virtual]