.TH "KProgressDialog" 3 "28 Jan 2004" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KProgressDialog \- KProgressDialog provides a dialog with a text label, a progress bar and an optional cancel button with a \fBKDE\fP look 'n feel. A dialog with a progress bar.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kprogress.h>\fP
.PP
Inherits \fBKDialogBase\fP.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKProgressDialog\fP (\fBQWidget\fP *parent=0, const  char *name=0, const  \fBQString\fP &caption=QString::null, const  \fBQString\fP &text=QString::null, bool modal=false)"
.br
.RI "\fIConstructs a KProgressDialog. \fP"
.ti -1c
.RI "\fB~KProgressDialog\fP ()"
.br
.RI "\fIDesctructor. \fP"
.ti -1c
.RI "\fBKProgress\fP * \fBprogressBar\fP ()"
.br
.RI "\fIReturns the \fBKProgress\fP used in this dialog. \fP"
.ti -1c
.RI "void \fBsetLabel\fP (const  \fBQString\fP &)"
.br
.RI "\fISets the text in the dialog. \fP"
.ti -1c
.RI "\fBQString\fP \fBlabelText\fP ()"
.br
.RI "\fIReturns the current dialog text. \fP"
.ti -1c
.RI "void \fBsetAllowCancel\fP (bool allowCancel)"
.br
.RI "\fISets whether or not the user can cancel the process. \fP"
.ti -1c
.RI "bool \fBallowCancel\fP ()"
.br
.RI "\fIReturns true if the dialog can be cancelled, false otherwise. \fP"
.ti -1c
.RI "void \fBshowCancelButton\fP (bool \fBshow\fP)"
.br
.RI "\fISets whether the cancel button is visible. \fP"
.ti -1c
.RI "void \fBsetAutoClose\fP (bool close)"
.br
.RI "\fISets whether the dialog should close automagically when all the steps in the \fBKProgress\fP have been completed. \fP"
.ti -1c
.RI "bool \fBautoClose\fP ()"
.br
.RI "\fIReturns true if the dialog will close upon completion, or false otherwise. \fP"
.ti -1c
.RI "void \fBsetAutoReset\fP (bool autoReset)"
.br
.RI "\fISets whether the dialog should reset the \fBKProgress\fP dialog back to 0 steps compelete when all steps have been completed. \fP"
.ti -1c
.RI "bool \fBautoReset\fP ()"
.br
.RI "\fIReturns true if the \fBKProgress\fP widget will be reset upon completion, or false otherwise. \fP"
.ti -1c
.RI "bool \fBwasCancelled\fP ()"
.br
.RI "\fIReturns true if the dialog was closed or cancelled before completion. \fP"
.ti -1c
.RI "void \fBsetButtonText\fP (const  \fBQString\fP &)"
.br
.RI "\fISets the text to appear on the cancel button. \fP"
.ti -1c
.RI "\fBQString\fP \fBbuttonText\fP ()"
.br
.RI "\fIReturns the text on the cancel button. \fP"
.ti -1c
.RI "void \fBsetMinimumDuration\fP (int ms)"
.br
.RI "\fISet the minimum number of milliseconds to wait before actually showing the dialog. \fP"
.ti -1c
.RI "int \fBminimumDuration\fP ()"
.br
.RI "\fIReturns the wait duration in milliseconds. \fP"
.in -1c
.SS "Protected Slots"

.in +1c
.ti -1c
.RI "void \fBslotAutoShow\fP ()"
.br
.ti -1c
.RI "void \fBslotAutoActions\fP (int percentage)"
.br
.ti -1c
.RI "void \fBslotCancel\fP ()"
.br
.RI "\fIActivated when the Cancel button has been clicked. \fP"
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SH "Detailed Description"
.PP 
KProgressDialog provides a dialog with a text label, a progress bar and an optional cancel button with a \fBKDE\fP 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 KProgressDialog. 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.
.PP
All the functionality of \fBKProgress\fP is available through direct access to the progress bar widget via \fBprogressBar()\fP;
.PP
\fBAuthor:\fP
.RS 4
Aaron J. Seigo 
.RE
.PP

.PP
Definition at line 183 of file kprogress.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KProgressDialog::KProgressDialog (\fBQWidget\fP * parent = 0, const char * name = 0, const \fBQString\fP & caption = QString::null, const \fBQString\fP & text = QString::null, bool modal = false)"
.PP
Constructs a KProgressDialog. \fBParameters:\fP
.RS 4
\fIparent\fP Parent of the widget 
.br
\fIname\fP Widget name 
.br
\fIcaption\fP Text to display in window title bar 
.br
\fItext\fP Text to display in the dialog 
.br
\fImodal\fP Set to true to make the dialog modal 
.RE
.PP
Definition at line 154 of file kprogress.cpp.
.PP
References KDialogBase::actionButton(), KDialogBase::mainWidget(), KStdAccel::name(), KDialogBase::plainPage(), KWin::setIcons(), KDialogBase::showButton(), QTimer::start(), and QPushButton::text().
.SS "KProgressDialog::~\fBKProgressDialog\fP ()"
.PP
Desctructor. Definition at line 187 of file kprogress.cpp.
.SH "Member Function Documentation"
.PP 
.SS "\fBKProgress\fP * KProgressDialog::progressBar ()"
.PP
Returns the \fBKProgress\fP used in this dialog. To set the number of steps or other progress bar related settings, access the \fBKProgress\fP object directly via this method. Definition at line 244 of file kprogress.cpp.
.SS "void KProgressDialog::setLabel (const \fBQString\fP &)"
.PP
Sets the text in the dialog. \fBParameters:\fP
.RS 4
\fItext\fP the text to display 
.RE
.PP
Definition at line 249 of file kprogress.cpp.
.PP
References QLabel::setText().
.SS "\fBQString\fP KProgressDialog::labelText ()"
.PP
Returns the current dialog text. Definition at line 254 of file kprogress.cpp.
.PP
References QLabel::text().
.SS "void KProgressDialog::setAllowCancel (bool allowCancel)"
.PP
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.
.PP
\fBParameters:\fP
.RS 4
\fIallowCancel\fP Set to true to make the dialog non-closable 
.RE
.PP
Definition at line 233 of file kprogress.cpp.
.PP
References showCancelButton().
.SS "bool KProgressDialog::allowCancel ()"
.PP
Returns true if the dialog can be cancelled, false otherwise. Definition at line 239 of file kprogress.cpp.
.SS "void KProgressDialog::showCancelButton (bool show)"
.PP
Sets whether the cancel button is visible. \fBsetAllowCancel\fP(false) implies showCancelButton(false)
.PP
\fBParameters:\fP
.RS 4
\fIshow\fP Whether or not the cancel button should be shown 
.RE
.PP
Definition at line 259 of file kprogress.cpp.
.PP
References KDialogBase::showButtonCancel().
.PP
Referenced by setAllowCancel().
.SS "void KProgressDialog::setAutoClose (bool close)"
.PP
Sets whether the dialog should close automagically when all the steps in the \fBKProgress\fP have been completed. Definition at line 269 of file kprogress.cpp.
.SS "bool KProgressDialog::autoClose ()"
.PP
Returns true if the dialog will close upon completion, or false otherwise. Definition at line 264 of file kprogress.cpp.
.SS "void KProgressDialog::setAutoReset (bool autoReset)"
.PP
Sets whether the dialog should reset the \fBKProgress\fP dialog back to 0 steps compelete when all steps have been completed. This is useful for KProgressDialogs that will be reused. Definition at line 279 of file kprogress.cpp.
.SS "bool KProgressDialog::autoReset ()"
.PP
Returns true if the \fBKProgress\fP widget will be reset upon completion, or false otherwise. Definition at line 274 of file kprogress.cpp.
.SS "bool KProgressDialog::wasCancelled ()"
.PP
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.
.SS "void KProgressDialog::setButtonText (const \fBQString\fP &)"
.PP
Sets the text to appear on the cancel button. Definition at line 284 of file kprogress.cpp.
.PP
References KDialogBase::setButtonCancelText().
.SS "\fBQString\fP KProgressDialog::buttonText ()"
.PP
Returns the text on the cancel button. Definition at line 290 of file kprogress.cpp.
.SS "void KProgressDialog::setMinimumDuration (int ms)"
.PP
Set the minimum number of milliseconds to wait before actually showing the dialog. Definition at line 218 of file kprogress.cpp.
.PP
References QTimer::start(), and QTimer::stop().
.SS "int KProgressDialog::minimumDuration ()"
.PP
Returns the wait duration in milliseconds. Definition at line 228 of file kprogress.cpp.
.SS "void KProgressDialog::slotCancel ()\fC [protected, virtual, slot]\fP"
.PP
Activated when the Cancel button has been clicked. The \fBQDialog::reject\fP() is activated in regular mode and \fBQDialog::done\fP( Cancel ) when in message box mode. Reimplemented from \fBKDialogBase\fP.
.PP
Definition at line 203 of file kprogress.cpp.
.PP
References KDialogBase::slotCancel().

.SH "Author"
.PP 
Generated automatically by Doxygen for kdeui Library from the source code.
