• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

Public Slots | Signals | Public Member Functions | Protected Member Functions | List of all members
KProgress Class Reference

#include <kprogress.h>

Inherits TQProgressBar.

Public Slots

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

Signals

void percentageChanged (int)
 

Public Member Functions

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

Protected Member Functions

virtual bool setIndicator (TQString &indicator, int progress, int totalSteps)
 
virtual void virtual_hook (int id, void *data)
 

Detailed Description

A progress indicator widget.

KProgress is derived from TQProgressBar, 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

KDE Progress Widget
Author
Aaron Seigo

Definition at line 46 of file kprogress.h.

Constructor & Destructor Documentation

◆ KProgress() [1/2]

KProgress::KProgress ( TQWidget *  parent = 0,
const char *  name = 0,
WFlags  f = 0 
)

Construct a progress bar.

KProgress – a progress indicator widget for KDE.

Definition at line 41 of file kprogress.cpp.

◆ KProgress() [2/2]

KProgress::KProgress ( int  totalSteps,
TQWidget *  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.

Definition at line 48 of file kprogress.cpp.

◆ ~KProgress()

KProgress::~KProgress ( )

Destruct the progress bar.

Definition at line 55 of file kprogress.cpp.

Member Function Documentation

◆ advance

void KProgress::advance ( int  offset)
virtualslot

Advance the progress bar by offset.

This method is provided for convenience and is equivalent with setProgress(progress()+offset).

Definition at line 59 of file kprogress.cpp.

◆ format()

TQString KProgress::format ( ) const

Retrieve the current format for printing status text.

See also
setFormat()

Definition at line 119 of file kprogress.cpp.

◆ maxValue()

int KProgress::maxValue ( )
Deprecated:
Use totalSteps() instead

Definition at line 97 of file kprogress.cpp.

◆ percentageChanged

void KProgress::percentageChanged ( int  )
signal

Emitted when the state of the progress bar changes.

◆ setFormat

void KProgress::setFormat ( const TQString &  format)
slot

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.

Definition at line 112 of file kprogress.cpp.

◆ setIndicator()

bool KProgress::setIndicator ( TQString &  indicator,
int  progress,
int  totalSteps 
)
protectedvirtual

Definition at line 130 of file kprogress.cpp.

◆ setProgress

void KProgress::setProgress ( int  progress)
virtualslot

Set the current value of the progress bar to progress.

Definition at line 74 of file kprogress.cpp.

◆ setRange()

void KProgress::setRange ( int  min,
int  max 
)
Deprecated:
but kept for source compatibility with KDE2's KProgress. Use setTotalSteps() instead

Definition at line 91 of file kprogress.cpp.

◆ setTextEnabled()

void KProgress::setTextEnabled ( bool  enable)

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

Definition at line 102 of file kprogress.cpp.

◆ setTotalSteps

void KProgress::setTotalSteps ( int  totalSteps)
slot

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

Definition at line 64 of file kprogress.cpp.

◆ setValue

void KProgress::setValue ( int  progress)
slot
Deprecated:
Use setProgress(int) instead

Definition at line 85 of file kprogress.cpp.

◆ textEnabled()

bool KProgress::textEnabled ( ) const

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

See also
setFormat()

Definition at line 107 of file kprogress.cpp.

◆ value()

int KProgress::value ( ) const
Deprecated:
Retrieves the current status, use progress() instead
See also
setValue()

Definition at line 125 of file kprogress.cpp.

◆ virtual_hook()

void KProgress::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Definition at line 408 of file kprogress.cpp.


The documentation for this class was generated from the following files:
  • kprogress.h
  • kprogress.cpp

tdeui

Skip menu "tdeui"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.9.4
This website is maintained by Timothy Pearson.