class KProgress

A Progress indicator widget. More...

Definition#include <kprogress.h>
InheritsQFrame (qt), QRangeControl (qt)
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Public Slots

Signals

Protected Methods


Detailed Description

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 there are other reasons. Signal percentageChanged(int) is emmitted whenever the value changes so you can setup a different widget to display percentage and connect the signal to it.

enum Orientation {Horizontal, Vertical }

Possible values for orientation

enum BarStyle {Solid, Blocked }

Possible values for bar style.

Solid means one continuous progress bar, Blocked means a progress bar made up of several blocks.

 KProgress (QWidget *parent=0, const char *name=0)

Construct a default KProgress bar. Orientation is horizontal.

 KProgress (Orientation, QWidget *parent=0, const char *name=0)

Construct a KProgress bar with an orientation.

 KProgress (int minValue, int maxValue, int value, Orientation, QWidget *parent=0, const char *name=0)

Construct a KProgress bar with minimum, maximum and initial value.

KProgress ()

Destructor

void  setBarStyle (BarStyle style)

Set the progress bar style. Allowed values are Solid and Blocked.

void  setBarColor (const QColor &)

Set the color of the progress bar.

void  setBarPixmap (const QPixmap &)

Set a pixmap to be shown in the progress bar.

void  setOrientation (Orientation)

Set the orientation of the progress bar. Allowed values are Horizonzal and Vertical.

void  setTextEnabled (bool)

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

BarStyle  barStyle ()

[const]

Retrieve the bar style.

const QColorbarColor ()

[const]

Retrieve the bar color.

const QPixmapbarPixmap ()

[const]

Retrieve the bar pixmap.

Orientation  orientation ()

[const]

Retrieve the orientation.

bool  textEnabled ()

[const]

Returns TRUE if progress text will be displayed, FALSE otherwise.

QSize  sizeHint ()

[const virtual]

Returns the recommended width for vertical progress bars or the recommended height for vertical progress bars

Reimplemented from QWidget