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


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

Inheritance diagram for KProgress:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=56pt]{classKProgress__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KProgress:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=105pt]{classKProgress__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
void {\bf set\-Format} (const  {\bf QString} \&format)
\begin{CompactList}\small\item\em Set the format of the text to use to display status. \item\end{CompactList}\item 
void {\bf set\-Total\-Steps} (int {\bf total\-Steps})
\begin{CompactList}\small\item\em Set the current total number of steps in the action tat the progress bar is representing. \item\end{CompactList}\item 
virtual void {\bf set\-Progress} (int {\bf progress})
\begin{CompactList}\small\item\em Set the current value of the progress bar to {\tt value}. \item\end{CompactList}\item 
void {\bf set\-Value} (int {\bf progress})
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.}. \item\end{CompactList}\item 
virtual void {\bf advance} (int offset)
\begin{CompactList}\small\item\em Advance the progress bar by {\tt prog}. \item\end{CompactList}\end{CompactItemize}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf percentage\-Changed} (int)
\begin{CompactList}\small\item\em Emitted when the state of the progress bar changes. \item\end{CompactList}\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KProgress} ({\bf QWidget} $\ast$parent=0, const  char $\ast$name=0, WFlags f=0)
\begin{CompactList}\small\item\em Construct a progress bar. \item\end{CompactList}\item 
{\bf KProgress} (int {\bf total\-Steps}, {\bf QWidget} $\ast$parent=0, const  char $\ast$name=0, WFlags f=0)
\begin{CompactList}\small\item\em Construct a progress bar with a total number of steps. \item\end{CompactList}\item 
{\bf $\sim$KProgress} ()
\begin{CompactList}\small\item\em Destruct the progress bar. \item\end{CompactList}\item 
void {\bf set\-Text\-Enabled} (bool)
\begin{CompactList}\small\item\em If this is set to {\tt true}, the progress text will be displayed. \item\end{CompactList}\item 
int {\bf value} () const 
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Retrieves the current status, use {\bf progress()} instead \item\end{CompactList}\item 
bool {\bf text\-Enabled} () const 
\begin{CompactList}\small\item\em Returns {\tt true} if progress text will be displayed, {\tt false} otherwise. \item\end{CompactList}\item 
{\bf QString} {\bf format} () const 
\begin{CompactList}\small\item\em Retrieve the current format for printing status text. \item\end{CompactList}\item 
void {\bf set\-Range} (int min, int max)
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} but kept for source compatibility with KDE2's KProgress. \item\end{CompactList}\item 
int {\bf max\-Value} ()
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} used {\bf total\-Steps}() instead \item\end{CompactList}\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 stylized progress bar. 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}

{\bf }

{\bf \begin{Desc}
\item[Author:]Aaron Seigo \end{Desc}
\begin{Desc}
\item[Version:]\begin{Desc}
\item[Id]{\bf kprogress.h}{\rm (p.\,\pageref{kprogress_8h})},v 1.31 2002/05/21 16:55:30 tjansen Exp \end{Desc}
\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} = 0, const char $\ast$ {\em name} = 0, WFlags {\em f} = 0)}\label{classKProgress_a0}


Construct a progress bar. 



Definition at line 40 of file kprogress.cpp.

References KStd\-Accel::name(), and 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} = 0, const char $\ast$ {\em name} = 0, WFlags {\em f} = 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 47 of file kprogress.cpp.

References KStd\-Accel::name(), and 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 54 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 98 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}


{\bf This class or method is obsolete, it is provided for compatibility only.} Retrieves the current status, use {\bf progress()} instead 

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


Definition at line 118 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 103 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 113 of file kprogress.cpp.\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}


{\bf This class or method is obsolete, it is provided for compatibility only.} but kept for source compatibility with KDE2's KProgress. 

Use {\bf set\-Total\-Steps}{\rm (p.\,\pageref{classKProgress_i1})}() instead 

Definition at line 88 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}


{\bf This class or method is obsolete, it is provided for compatibility only.} used {\bf total\-Steps}() instead 



Definition at line 93 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`\"{}.)

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


Definition at line 108 of file kprogress.cpp.\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 63 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 value}. 



Reimplemented from {\bf QProgress\-Bar}.

Definition at line 73 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}


{\bf This class or method is obsolete, it is provided for compatibility only.}. 

Use {\bf set\-Progress}{\rm (p.\,\pageref{classKProgress_i2})}(int) instead 

Definition at line 83 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 prog}. 

This method is provided for convenience and is equivalent with {\bf set\-Value}{\rm (p.\,\pageref{classKProgress_i3})}({\bf value()}{\rm (p.\,\pageref{classKProgress_a4})}+prog). 

Definition at line 58 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}
