org.kde.koala

Class KProgress

public class KProgress extends QProgressBar

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
  • \image html kprogress.png "KDE Progress Widget" See KProgressSignals for signals emitted by KProgress

    Author: Aaron Seigo

    UNKNOWN: A progress indicator widget.

    Constructor Summary
    protected KProgress(Class dummy)
    KProgress(QWidget parent, String name, int f)
    Construct a progress bar.
    KProgress(QWidget parent, String name)
    KProgress(QWidget parent)
    KProgress()
    KProgress(int totalSteps, QWidget parent, String name, int f)
    Construct a progress bar with a total number of steps.
    KProgress(int totalSteps, QWidget parent, String name)
    KProgress(int totalSteps, QWidget parent)
    KProgress(int totalSteps)
    Method Summary
    voidadvance(int offset)
    Advance the progress bar by offset. This method is provided for convenience and is equivalent with setProgress(progress()+offset).
    StringclassName()
    voiddispose()
    Delete the wrapped C++ instance ahead of finalize()
    protected voidfinalize()
    Deletes the wrapped C++ instance
    Stringformat()
    Retrieve the current format for printing status text.
    booleanisDisposed()
    Has the wrapped C++ instance been deleted?
    QMetaObjectmetaObject()
    voidsetFormat(String format)
    Set the format of the text to use to display status.
    protected booleansetIndicator(StringBuffer indicator, int progress, int totalSteps)
    voidsetProgress(int progress)
    Set the current value of the progress bar to progress.
    voidsetTextEnabled(boolean arg1)
    If this is set to true, the progress text will be displayed.
    voidsetTotalSteps(int totalSteps)
    Set the current total number of steps in the action tat the progress bar is representing.
    booleantextEnabled()
    Returns true if progress text will be displayed, false otherwise.

    Constructor Detail

    KProgress

    protected KProgress(Class dummy)

    KProgress

    public KProgress(QWidget parent, String name, int f)
    Construct a progress bar.

    UNKNOWN: Construct a progress bar.

    KProgress

    public KProgress(QWidget parent, String name)

    KProgress

    public KProgress(QWidget parent)

    KProgress

    public KProgress()

    KProgress

    public KProgress(int totalSteps, QWidget parent, String name, int f)
    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.

    UNKNOWN: Construct a progress bar with a total number of steps.

    KProgress

    public KProgress(int totalSteps, QWidget parent, String name)

    KProgress

    public KProgress(int totalSteps, QWidget parent)

    KProgress

    public KProgress(int totalSteps)

    Method Detail

    advance

    public void advance(int offset)
    Advance the progress bar by offset. This method is provided for convenience and is equivalent with setProgress(progress()+offset).

    UNKNOWN: Advance the progress bar by offset.

    className

    public String className()

    dispose

    public void dispose()
    Delete the wrapped C++ instance ahead of finalize()

    finalize

    protected void finalize()
    Deletes the wrapped C++ instance

    format

    public String format()
    Retrieve the current format for printing status text.

    See Also: KProgress

    UNKNOWN: Retrieve the current format for printing status text.

    isDisposed

    public boolean isDisposed()
    Has the wrapped C++ instance been deleted?

    metaObject

    public QMetaObject metaObject()

    setFormat

    public void setFormat(String format)
    Set the format of the text to use to display status. The default format is "%p%" (which looks like "42%".) Note: Setting the format to anything other then "%p%" will force centerIndicator to true, since it's often impossible to layout a progressbar with a more general format with the indicator string anywhere else.

    Parameters: format "%p" is replaced by percentage done, "%v" is replaced by actual value, "%m" is replaced by the maximum value.

    UNKNOWN: Set the format of the text to use to display status.

    setIndicator

    protected boolean setIndicator(StringBuffer indicator, int progress, int totalSteps)

    setProgress

    public void setProgress(int progress)
    Set the current value of the progress bar to progress.

    UNKNOWN: Set the current value of the progress bar to progress.

    setTextEnabled

    public void setTextEnabled(boolean arg1)
    If this is set to true, the progress text will be displayed.

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

    setTotalSteps

    public void setTotalSteps(int totalSteps)
    Set the current total number of steps in the action tat the progress bar is representing.

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

    textEnabled

    public boolean textEnabled()
    Returns true if progress text will be displayed, false otherwise.

    See Also: KProgress

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