\section{KProgress Class Reference}
\label{classKProgress}\index{KProgress@{KProgress}}
A progress indicator widget.  


{\tt \#include $<$kprogress.h$>$}

Inheritance diagram for KProgress:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=57pt]{classKProgress__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KProgress:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=98pt]{classKProgress__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
void {\bf set\-Format} (const {\bf QString} \&format)
\item 
void {\bf set\-Total\-Steps} (int {\bf total\-Steps})
\item 
virtual void {\bf set\-Progress} (int {\bf progress})
\item 
void {\bf set\-Value} (int {\bf progress})
\item 
virtual void {\bf advance} (int offset)
\end{CompactItemize}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf percentage\-Changed} (int)
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KProgress} ({\bf QWidget} $\ast$parent=0, const char $\ast$name=0, WFlags f=0)
\item 
{\bf KProgress} (int {\bf total\-Steps}, {\bf QWidget} $\ast$parent=0, const char $\ast$name=0, WFlags f=0)
\item 
{\bf $\sim$KProgress} ()
\item 
void {\bf set\-Text\-Enabled} (bool)
\item 
int {\bf value} () const KDE\_\-DEPRECATED
\item 
bool {\bf text\-Enabled} () const 
\item 
{\bf QString} {\bf format} () const 
\item 
void {\bf set\-Range} (int min, int max) KDE\_\-DEPRECATED
\item 
int {\bf max\-Value} () KDE\_\-DEPRECATED
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual bool {\bf set\-Indicator} ({\bf QString} \&indicator, int {\bf progress}, int {\bf total\-Steps})\label{classKProgress_b0}

\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKProgress_b1}

\end{CompactItemize}


\subsection{Detailed Description}
A progress indicator widget. 

KProgress is derived from {\bf QProgress\-Bar}, 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.

{\bf Details} \par


 \begin{Desc}
\item[Author:]Aaron Seigo \end{Desc}




Definition at line 46 of file kprogress.h.

\subsection{Constructor \& Destructor Documentation}
\index{KProgress@{KProgress}!KProgress@{KProgress}}
\index{KProgress@{KProgress}!KProgress@{KProgress}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KProgress::KProgress ({\bf QWidget} $\ast$ {\em parent} = {\tt 0}, const char $\ast$ {\em name} = {\tt 0}, WFlags {\em f} = {\tt 0})}\label{classKProgress_a0}


Construct a progress bar. 



Definition at line 41 of file kprogress.cpp.

References set\-Progress().\index{KProgress@{KProgress}!KProgress@{KProgress}}
\index{KProgress@{KProgress}!KProgress@{KProgress}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KProgress::KProgress (int {\em total\-Steps}, {\bf QWidget} $\ast$ {\em parent} = {\tt 0}, const char $\ast$ {\em name} = {\tt 0}, WFlags {\em f} = {\tt 0})}\label{classKProgress_a1}


Construct a progress bar with a total number of steps. 

The total\-Steps 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 set\-Progress(0); call set\-Progress(50) after examining the last file. 

Definition at line 48 of file kprogress.cpp.

References set\-Progress().\index{KProgress@{KProgress}!~KProgress@{$\sim$KProgress}}
\index{~KProgress@{$\sim$KProgress}!KProgress@{KProgress}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KProgress::$\sim${\bf KProgress} ()}\label{classKProgress_a2}


Destruct the progress bar. 



Definition at line 55 of file kprogress.cpp.

\subsection{Member Function Documentation}
\index{KProgress@{KProgress}!setTextEnabled@{setTextEnabled}}
\index{setTextEnabled@{setTextEnabled}!KProgress@{KProgress}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KProgress::set\-Text\-Enabled (bool)}\label{classKProgress_a3}


If this is set to {\tt true}, the progress text will be displayed. 



Definition at line 102 of file kprogress.cpp.

References QProgress\-Bar::set\-Percentage\-Visible().\index{KProgress@{KProgress}!value@{value}}
\index{value@{value}!KProgress@{KProgress}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KProgress::value () const}\label{classKProgress_a4}


\begin{Desc}
\item[{\bf Deprecated}]Retrieves the current status, use {\bf progress()} instead \end{Desc}
\begin{Desc}
\item[See also:]{\bf set\-Value()}{\rm (p.\,\pageref{classKProgress_i3})} \end{Desc}


Definition at line 125 of file kprogress.cpp.

References QProgress\-Bar::progress().\index{KProgress@{KProgress}!textEnabled@{textEnabled}}
\index{textEnabled@{textEnabled}!KProgress@{KProgress}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KProgress::text\-Enabled () const}\label{classKProgress_a5}


Returns {\tt true} if progress text will be displayed, {\tt false} otherwise. 

\begin{Desc}
\item[See also:]{\bf set\-Format()}{\rm (p.\,\pageref{classKProgress_i0})} \end{Desc}


Definition at line 107 of file kprogress.cpp.

References QProgress\-Bar::percentage\-Visible().\index{KProgress@{KProgress}!format@{format}}
\index{format@{format}!KProgress@{KProgress}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KProgress::format () const}\label{classKProgress_a6}


Retrieve the current format for printing status text. 

\begin{Desc}
\item[See also:]{\bf set\-Format()}{\rm (p.\,\pageref{classKProgress_i0})} \end{Desc}


Definition at line 119 of file kprogress.cpp.

Referenced by set\-Format().\index{KProgress@{KProgress}!setRange@{setRange}}
\index{setRange@{setRange}!KProgress@{KProgress}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KProgress::set\-Range (int {\em min}, int {\em max})}\label{classKProgress_a7}


\begin{Desc}
\item[{\bf Deprecated}]but kept for source compatibility with KDE2's KProgress. Use {\bf set\-Total\-Steps()}{\rm (p.\,\pageref{classKProgress_i1})} instead \end{Desc}


Definition at line 91 of file kprogress.cpp.

References set\-Total\-Steps().\index{KProgress@{KProgress}!maxValue@{maxValue}}
\index{maxValue@{maxValue}!KProgress@{KProgress}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KProgress::max\-Value ()}\label{classKProgress_a8}


\begin{Desc}
\item[{\bf Deprecated}]Use {\bf total\-Steps()} instead \end{Desc}


Definition at line 97 of file kprogress.cpp.

References QProgress\-Bar::total\-Steps().\index{KProgress@{KProgress}!setFormat@{setFormat}}
\index{setFormat@{setFormat}!KProgress@{KProgress}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KProgress::set\-Format (const {\bf QString} \& {\em format})\hspace{0.3cm}{\tt  [slot]}}\label{classKProgress_i0}


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

The default format is \char`\"{}\%p\%\char`\"{} (which looks like \char`\"{}42\%\char`\"{}.)

Note: Setting the format to anything other then \char`\"{}\%p\%\char`\"{} will force center\-Indicator to true, since it's often impossible to layout a progressbar with a more general format with the indicator string anywhere else.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em format}]\char`\"{}\%p\char`\"{} is replaced by percentage done, \char`\"{}\%v\char`\"{} is replaced by actual value, \char`\"{}\%m\char`\"{} is replaced by the maximum value. \end{description}
\end{Desc}


Definition at line 112 of file kprogress.cpp.

References format(), and QProgress\-Bar::set\-Center\-Indicator().\index{KProgress@{KProgress}!setTotalSteps@{setTotalSteps}}
\index{setTotalSteps@{setTotalSteps}!KProgress@{KProgress}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KProgress::set\-Total\-Steps (int {\em total\-Steps})\hspace{0.3cm}{\tt  [slot]}}\label{classKProgress_i1}


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



Reimplemented from {\bf QProgress\-Bar}.

Definition at line 64 of file kprogress.cpp.

References percentage\-Changed(), QProgress\-Bar::progress(), and QProgress\-Bar::set\-Total\-Steps().

Referenced by set\-Range().\index{KProgress@{KProgress}!setProgress@{setProgress}}
\index{setProgress@{setProgress}!KProgress@{KProgress}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KProgress::set\-Progress (int {\em progress})\hspace{0.3cm}{\tt  [virtual, slot]}}\label{classKProgress_i2}


Set the current value of the progress bar to {\tt progress}. 



Reimplemented from {\bf QProgress\-Bar}.

Definition at line 74 of file kprogress.cpp.

References percentage\-Changed(), QProgress\-Bar::set\-Progress(), and QProgress\-Bar::total\-Steps().

Referenced by advance(), KProgress(), and set\-Value().\index{KProgress@{KProgress}!setValue@{setValue}}
\index{setValue@{setValue}!KProgress@{KProgress}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KProgress::set\-Value (int {\em progress})\hspace{0.3cm}{\tt  [slot]}}\label{classKProgress_i3}


\begin{Desc}
\item[{\bf Deprecated}]Use {\bf set\-Progress(int)}{\rm (p.\,\pageref{classKProgress_i2})} instead \end{Desc}


Definition at line 85 of file kprogress.cpp.

References set\-Progress().\index{KProgress@{KProgress}!advance@{advance}}
\index{advance@{advance}!KProgress@{KProgress}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KProgress::advance (int {\em offset})\hspace{0.3cm}{\tt  [virtual, slot]}}\label{classKProgress_i4}


Advance the progress bar by {\tt offset}. 

This method is provided for convenience and is equivalent with set\-Progress({\bf progress()}+offset). 

Definition at line 59 of file kprogress.cpp.

References QProgress\-Bar::progress(), and set\-Progress().\index{KProgress@{KProgress}!percentageChanged@{percentageChanged}}
\index{percentageChanged@{percentageChanged}!KProgress@{KProgress}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KProgress::percentage\-Changed (int)\hspace{0.3cm}{\tt  [signal]}}\label{classKProgress_l0}


Emitted when the state of the progress bar changes. 



Referenced by set\-Progress(), and set\-Total\-Steps().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kprogress.h\item 
kprogress.cpp\end{CompactItemize}
