\section{KProgress\-Dialog Class Reference}
\label{classKProgressDialog}\index{KProgressDialog@{KProgressDialog}}
KProgress\-Dialog provides a dialog with a text label, a progress bar and an optional cancel button with a {\bf KDE} look 'n feel. A dialog with a progress bar.  


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

Inheritance diagram for KProgress\-Dialog:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=64pt]{classKProgressDialog__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KProgress\-Dialog:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=253pt]{classKProgressDialog__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KProgress\-Dialog} ({\bf QWidget} $\ast$parent=0, const  char $\ast$name=0, const  {\bf QString} \&caption=QString::null, const  {\bf QString} \&text=QString::null, bool modal=false)
\begin{CompactList}\small\item\em Constructs a KProgress\-Dialog. \item\end{CompactList}\item 
{\bf $\sim$KProgress\-Dialog} ()
\begin{CompactList}\small\item\em Desctructor. \item\end{CompactList}\item 
{\bf KProgress} $\ast$ {\bf progress\-Bar} ()
\begin{CompactList}\small\item\em Returns the {\bf KProgress}{\rm (p.\,\pageref{classKProgress})} used in this dialog. \item\end{CompactList}\item 
void {\bf set\-Label} (const  {\bf QString} \&)
\begin{CompactList}\small\item\em Sets the text in the dialog. \item\end{CompactList}\item 
{\bf QString} {\bf label\-Text} ()
\begin{CompactList}\small\item\em Returns the current dialog text. \item\end{CompactList}\item 
void {\bf set\-Allow\-Cancel} (bool allow\-Cancel)
\begin{CompactList}\small\item\em Sets whether or not the user can cancel the process. \item\end{CompactList}\item 
bool {\bf allow\-Cancel} ()
\begin{CompactList}\small\item\em Returns true if the dialog can be cancelled, false otherwise. \item\end{CompactList}\item 
void {\bf show\-Cancel\-Button} (bool {\bf show})
\begin{CompactList}\small\item\em Sets whether the cancel button is visible. \item\end{CompactList}\item 
void {\bf set\-Auto\-Close} (bool close)
\begin{CompactList}\small\item\em Sets whether the dialog should close automagically when all the steps in the {\bf KProgress}{\rm (p.\,\pageref{classKProgress})} have been completed. \item\end{CompactList}\item 
bool {\bf auto\-Close} ()
\begin{CompactList}\small\item\em Returns true if the dialog will close upon completion, or false otherwise. \item\end{CompactList}\item 
void {\bf set\-Auto\-Reset} (bool auto\-Reset)
\begin{CompactList}\small\item\em Sets whether the dialog should reset the {\bf KProgress}{\rm (p.\,\pageref{classKProgress})} dialog back to 0 steps compelete when all steps have been completed. \item\end{CompactList}\item 
bool {\bf auto\-Reset} ()
\begin{CompactList}\small\item\em Returns true if the {\bf KProgress}{\rm (p.\,\pageref{classKProgress})} widget will be reset upon completion, or false otherwise. \item\end{CompactList}\item 
bool {\bf was\-Cancelled} ()
\begin{CompactList}\small\item\em Returns true if the dialog was closed or cancelled before completion. \item\end{CompactList}\item 
void {\bf set\-Button\-Text} (const  {\bf QString} \&)
\begin{CompactList}\small\item\em Sets the text to appear on the cancel button. \item\end{CompactList}\item 
{\bf QString} {\bf button\-Text} ()
\begin{CompactList}\small\item\em Returns the text on the cancel button. \item\end{CompactList}\item 
void {\bf set\-Minimum\-Duration} (int ms)
\begin{CompactList}\small\item\em Set the minimum number of milliseconds to wait before actually showing the dialog. \item\end{CompactList}\item 
int {\bf minimum\-Duration} ()
\begin{CompactList}\small\item\em Returns the wait duration in milliseconds. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
void {\bf slot\-Auto\-Show} ()\label{classKProgressDialog_j0}

\item 
void {\bf slot\-Auto\-Actions} (int percentage)\label{classKProgressDialog_j1}

\item 
void {\bf slot\-Cancel} ()
\begin{CompactList}\small\item\em Activated when the Cancel button has been clicked. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKProgressDialog_b0}

\end{CompactItemize}


\subsection{Detailed Description}
KProgress\-Dialog provides a dialog with a text label, a progress bar and an optional cancel button with a {\bf KDE} look 'n feel. A dialog with a progress bar. 

Since knowing how long it can take to complete an action and it is undesireable to show a dialog for a split second before hiding it, there are a few ways to control the timing behavior of KProgress\-Dialog. There is a time out that can be set before showing the dialog as well as an option to autohide or keep displaying the dialog once complete.

All the functionality of {\bf KProgress}{\rm (p.\,\pageref{classKProgress})} is available through direct access to the progress bar widget via {\bf progress\-Bar()}{\rm (p.\,\pageref{classKProgressDialog_a2})};

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




Definition at line 183 of file kprogress.h.

\subsection{Constructor \& Destructor Documentation}
\index{KProgressDialog@{KProgress\-Dialog}!KProgressDialog@{KProgressDialog}}
\index{KProgressDialog@{KProgressDialog}!KProgressDialog@{KProgress\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KProgress\-Dialog::KProgress\-Dialog ({\bf QWidget} $\ast$ {\em parent} = 0, const char $\ast$ {\em name} = 0, const {\bf QString} \& {\em caption} = QString::null, const {\bf QString} \& {\em text} = QString::null, bool {\em modal} = false)}\label{classKProgressDialog_a0}


Constructs a KProgress\-Dialog. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent}]Parent of the widget \item[{\em name}]Widget name \item[{\em caption}]Text to display in window title bar \item[{\em text}]Text to display in the dialog \item[{\em modal}]Set to true to make the dialog modal \end{description}
\end{Desc}


Definition at line 154 of file kprogress.cpp.

References KDialog\-Base::action\-Button(), KDialog\-Base::main\-Widget(), KStd\-Accel::name(), KDialog\-Base::plain\-Page(), KWin::set\-Icons(), KDialog\-Base::show\-Button(), QTimer::start(), and QPush\-Button::text().\index{KProgressDialog@{KProgress\-Dialog}!~KProgressDialog@{$\sim$KProgressDialog}}
\index{~KProgressDialog@{$\sim$KProgressDialog}!KProgressDialog@{KProgress\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KProgress\-Dialog::$\sim${\bf KProgress\-Dialog} ()}\label{classKProgressDialog_a1}


Desctructor. 



Definition at line 187 of file kprogress.cpp.

\subsection{Member Function Documentation}
\index{KProgressDialog@{KProgress\-Dialog}!progressBar@{progressBar}}
\index{progressBar@{progressBar}!KProgressDialog@{KProgress\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KProgress} $\ast$ KProgress\-Dialog::progress\-Bar ()}\label{classKProgressDialog_a2}


Returns the {\bf KProgress}{\rm (p.\,\pageref{classKProgress})} used in this dialog. 

To set the number of steps or other progress bar related settings, access the {\bf KProgress}{\rm (p.\,\pageref{classKProgress})} object directly via this method. 

Definition at line 244 of file kprogress.cpp.\index{KProgressDialog@{KProgress\-Dialog}!setLabel@{setLabel}}
\index{setLabel@{setLabel}!KProgressDialog@{KProgress\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KProgress\-Dialog::set\-Label (const {\bf QString} \&)}\label{classKProgressDialog_a3}


Sets the text in the dialog. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em text}]the text to display \end{description}
\end{Desc}


Definition at line 249 of file kprogress.cpp.

References QLabel::set\-Text().\index{KProgressDialog@{KProgress\-Dialog}!labelText@{labelText}}
\index{labelText@{labelText}!KProgressDialog@{KProgress\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KProgress\-Dialog::label\-Text ()}\label{classKProgressDialog_a4}


Returns the current dialog text. 



Definition at line 254 of file kprogress.cpp.

References QLabel::text().\index{KProgressDialog@{KProgress\-Dialog}!setAllowCancel@{setAllowCancel}}
\index{setAllowCancel@{setAllowCancel}!KProgressDialog@{KProgress\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KProgress\-Dialog::set\-Allow\-Cancel (bool {\em allow\-Cancel})}\label{classKProgressDialog_a5}


Sets whether or not the user can cancel the process. 

If the dialog is cancellable, the Cancel button will be shown and the user can close the window using the window decorations. If the process is not (or should not be) interuptable, set the dialog to be modal and not cancellable.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em allow\-Cancel}]Set to true to make the dialog non-closable \end{description}
\end{Desc}


Definition at line 233 of file kprogress.cpp.

References show\-Cancel\-Button().\index{KProgressDialog@{KProgress\-Dialog}!allowCancel@{allowCancel}}
\index{allowCancel@{allowCancel}!KProgressDialog@{KProgress\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KProgress\-Dialog::allow\-Cancel ()}\label{classKProgressDialog_a6}


Returns true if the dialog can be cancelled, false otherwise. 



Definition at line 239 of file kprogress.cpp.\index{KProgressDialog@{KProgress\-Dialog}!showCancelButton@{showCancelButton}}
\index{showCancelButton@{showCancelButton}!KProgressDialog@{KProgress\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KProgress\-Dialog::show\-Cancel\-Button (bool {\em show})}\label{classKProgressDialog_a7}


Sets whether the cancel button is visible. 

{\bf set\-Allow\-Cancel}{\rm (p.\,\pageref{classKProgressDialog_a5})}(false) implies show\-Cancel\-Button(false)

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em show}]Whether or not the cancel button should be shown \end{description}
\end{Desc}


Definition at line 259 of file kprogress.cpp.

References KDialog\-Base::show\-Button\-Cancel().

Referenced by set\-Allow\-Cancel().\index{KProgressDialog@{KProgress\-Dialog}!setAutoClose@{setAutoClose}}
\index{setAutoClose@{setAutoClose}!KProgressDialog@{KProgress\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KProgress\-Dialog::set\-Auto\-Close (bool {\em close})}\label{classKProgressDialog_a8}


Sets whether the dialog should close automagically when all the steps in the {\bf KProgress}{\rm (p.\,\pageref{classKProgress})} have been completed. 



Definition at line 269 of file kprogress.cpp.\index{KProgressDialog@{KProgress\-Dialog}!autoClose@{autoClose}}
\index{autoClose@{autoClose}!KProgressDialog@{KProgress\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KProgress\-Dialog::auto\-Close ()}\label{classKProgressDialog_a9}


Returns true if the dialog will close upon completion, or false otherwise. 



Definition at line 264 of file kprogress.cpp.\index{KProgressDialog@{KProgress\-Dialog}!setAutoReset@{setAutoReset}}
\index{setAutoReset@{setAutoReset}!KProgressDialog@{KProgress\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KProgress\-Dialog::set\-Auto\-Reset (bool {\em auto\-Reset})}\label{classKProgressDialog_a10}


Sets whether the dialog should reset the {\bf KProgress}{\rm (p.\,\pageref{classKProgress})} dialog back to 0 steps compelete when all steps have been completed. 

This is useful for KProgress\-Dialogs that will be reused. 

Definition at line 279 of file kprogress.cpp.\index{KProgressDialog@{KProgress\-Dialog}!autoReset@{autoReset}}
\index{autoReset@{autoReset}!KProgressDialog@{KProgress\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KProgress\-Dialog::auto\-Reset ()}\label{classKProgressDialog_a11}


Returns true if the {\bf KProgress}{\rm (p.\,\pageref{classKProgress})} widget will be reset upon completion, or false otherwise. 



Definition at line 274 of file kprogress.cpp.\index{KProgressDialog@{KProgress\-Dialog}!wasCancelled@{wasCancelled}}
\index{wasCancelled@{wasCancelled}!KProgressDialog@{KProgress\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KProgress\-Dialog::was\-Cancelled ()}\label{classKProgressDialog_a12}


Returns true if the dialog was closed or cancelled before completion. 

If the dialog is not cancellable it will always return false. 

Definition at line 213 of file kprogress.cpp.\index{KProgressDialog@{KProgress\-Dialog}!setButtonText@{setButtonText}}
\index{setButtonText@{setButtonText}!KProgressDialog@{KProgress\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KProgress\-Dialog::set\-Button\-Text (const {\bf QString} \&)}\label{classKProgressDialog_a13}


Sets the text to appear on the cancel button. 



Definition at line 284 of file kprogress.cpp.

References KDialog\-Base::set\-Button\-Cancel\-Text().\index{KProgressDialog@{KProgress\-Dialog}!buttonText@{buttonText}}
\index{buttonText@{buttonText}!KProgressDialog@{KProgress\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KProgress\-Dialog::button\-Text ()}\label{classKProgressDialog_a14}


Returns the text on the cancel button. 



Definition at line 290 of file kprogress.cpp.\index{KProgressDialog@{KProgress\-Dialog}!setMinimumDuration@{setMinimumDuration}}
\index{setMinimumDuration@{setMinimumDuration}!KProgressDialog@{KProgress\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KProgress\-Dialog::set\-Minimum\-Duration (int {\em ms})}\label{classKProgressDialog_a15}


Set the minimum number of milliseconds to wait before actually showing the dialog. 



Definition at line 218 of file kprogress.cpp.

References QTimer::start(), and QTimer::stop().\index{KProgressDialog@{KProgress\-Dialog}!minimumDuration@{minimumDuration}}
\index{minimumDuration@{minimumDuration}!KProgressDialog@{KProgress\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KProgress\-Dialog::minimum\-Duration ()}\label{classKProgressDialog_a16}


Returns the wait duration in milliseconds. 



Definition at line 228 of file kprogress.cpp.\index{KProgressDialog@{KProgress\-Dialog}!slotCancel@{slotCancel}}
\index{slotCancel@{slotCancel}!KProgressDialog@{KProgress\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KProgress\-Dialog::slot\-Cancel ()\hspace{0.3cm}{\tt  [protected, virtual, slot]}}\label{classKProgressDialog_j2}


Activated when the Cancel button has been clicked. 

The {\bf QDialog::reject}() is activated in regular mode and {\bf QDialog::done}( Cancel ) when in message box mode. 

Reimplemented from {\bf KDialog\-Base} {\rm (p.\,\pageref{classKDialogBase_j11})}.

Definition at line 203 of file kprogress.cpp.

References KDialog\-Base::slot\-Cancel().

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