class KProgress

# class KProgress | A progress indicator widget. More...
Definition | `#include <kprogress.h>`
Inherits | QProgressBar (qt) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### 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 ()

#### Public Slots

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

#### Signals

- void percentageChanged (int)

#### Protected Methods

- virtual void virtual_hook ( int id, void* data )

## Detailed Description

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.

### Details

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]

- Version: $Id: kprogress.h,v 1.31 2002/05/21 16:55:30 tjansen Exp $
- Author: Aaron Seigo
- Generated: root on macppc.ports.openbsd.org on Sat Sep 6 10:36:37 2003, using kdoc 2.0a54.