Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

KProgress Class Reference

A progress indicator widget. More...

#include <kprogress.h>

List of all members.

Public Slots

void setFormat (const QString &format)
void setTotalSteps (int totalSteps)
virtual void setProgress (int progress)
void setValue (int progress)
virtual void advance (int offset)

Signals

void percentageChanged (int)

Public Methods

 KProgress (QWidget *parent=0, const char *name=0, WFlags f=0)
 KProgress (int totalSteps, QWidget *parent=0, const char *name=0, WFlags f=0)
 ~KProgress ()
void setTextEnabled (bool)
int value () const
bool textEnabled () const
QString format () const
void setRange (int min, int max)
int maxValue ()

Protected Methods

virtual bool setIndicator (QString &indicator, int progress, int totalSteps)


Detailed Description

A progress indicator widget.

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.

@sect Details

Author:
Aaron Seigo
Version:
Id:
kprogress.h,v 1.31 2002/05/21 16:55:30 tjansen Exp

Definition at line 46 of file kprogress.h.


Constructor & Destructor Documentation

KProgress::KProgress QWidget *    parent = 0,
const char *    name = 0,
WFlags    f = 0
 

Construct a progress bar.

KProgress::KProgress int    totalSteps,
QWidget *    parent = 0,
const char *    name = 0,
WFlags    f = 0
 

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.


Member Function Documentation

virtual void KProgress::advance int    offset [virtual, slot]
 

Advance the progress bar by prog.

This method is provided for convenience and is equivalent with setValue(value()+prog).

QString KProgress::format  
 

Retrieve the current format for printing status text.

See also:
setFormat()

int KProgress::maxValue  
 

Deprecated:
used totalSteps() instead

void KProgress::percentageChanged int    [signal]
 

Emitted when the state of the progress bar changes.

void KProgress::setFormat const QString &    format [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.

virtual bool KProgress::setIndicator QString &    indicator,
int    progress,
int    totalSteps
[protected, virtual]
 

@reimplemented

virtual void KProgress::setProgress int    progress [virtual, slot]
 

Set the current value of the progress bar to value. @reimplemented

void KProgress::setRange int    min,
int    max
 

Deprecated:
but kept for source compatibility with KDE2's KProgress. Use setTotalSteps() instead

void KProgress::setTextEnabled bool   
 

If this is set to true, the progress text will be displayed.

void KProgress::setTotalSteps int    totalSteps [slot]
 

Set the current total number of steps in the action tat the progress bar is representing.

void KProgress::setValue int    progress [slot]
 

Deprecated:
. Use setProgress(int) instead

bool KProgress::textEnabled  
 

Returns true if progress text will be displayed, false otherwise.

See also:
setFormat()

int KProgress::value  
 

Deprecated:
Retrieves the current status, use progress() instead

See also:
setValue()


The documentation for this class was generated from the following file:
Generated on Wed Aug 13 23:30:21 2003 for kdelibs by doxygen1.2.18