• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kdeui

KProgressDialog Class Reference

KProgressDialog provides a dialog with a text label, a progress bar and an optional cancel button with a KDE look 'n feel. More...

#include <kprogress.h>

Inheritance diagram for KProgressDialog:

Inheritance graph
[legend]

List of all members.


Public Member Functions

bool allowCancel () const
bool allowCancel () KDE_DEPRECATED
bool autoClose () const
bool autoClose ()
bool autoReset () const
bool autoReset ()
QString buttonText () const
QString buttonText () KDE_DEPRECATED
void ignoreCancel ()
 KProgressDialog (QWidget *parent=0, const char *name=0, const QString &caption=QString::null, const QString &text=QString::null, bool modal=false)
QString labelText () const
QString labelText () KDE_DEPRECATED
int minimumDuration () const
int minimumDuration () KDE_DEPRECATED
const KProgress * progressBar () const
KProgress * progressBar ()
void setAllowCancel (bool allowCancel)
void setAutoClose (bool close)
void setAutoReset (bool autoReset)
void setButtonText (const QString &)
void setLabel (const QString &text)
void setMinimumDuration (int ms)
virtual void show ()
void showCancelButton (bool show)
bool wasCancelled () const
bool wasCancelled ()
 ~KProgressDialog ()

Protected Slots

void slotAutoActions (int percentage)
void slotAutoShow ()
void slotCancel ()

Protected Member Functions

virtual void virtual_hook (int id, void *data)

Detailed Description

KProgressDialog provides a dialog with a text label, a progress bar and an optional cancel button with a KDE look 'n feel.

Since knowing how long it can take to complete an action and it is undesirable 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.

All the functionality of KProgress is available through direct access to the progress bar widget via progressBar();

A dialog with a progress bar

Author:
Aaron J. Seigo

Definition at line 187 of file kprogress.h.


Constructor & Destructor Documentation

KProgressDialog::KProgressDialog ( QWidget *  parent = 0,
const char *  name = 0,
const QString &  caption = QString::null,
const QString &  text = QString::null,
bool  modal = false 
)

Constructs a KProgressDialog.

Parameters:
parent Parent of the widget
name Widget name
caption Text to display in window title bar
text Text to display in the dialog
modal Set to true to make the dialog modal

Definition at line 169 of file kprogress.cpp.

KProgressDialog::~KProgressDialog (  ) 

Destructor.

Definition at line 205 of file kprogress.cpp.


Member Function Documentation

bool KProgressDialog::allowCancel (  )  const

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

Definition at line 278 of file kprogress.cpp.

bool KProgressDialog::allowCancel (  ) 

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

Deprecated:

Definition at line 273 of file kprogress.cpp.

bool KProgressDialog::autoClose (  )  const

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

Definition at line 320 of file kprogress.cpp.

bool KProgressDialog::autoClose (  ) 

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

Definition at line 315 of file kprogress.cpp.

bool KProgressDialog::autoReset (  )  const

Returns true if the KProgress widget will be reset upon completion, or false otherwise.

Definition at line 336 of file kprogress.cpp.

bool KProgressDialog::autoReset (  ) 

Returns true if the KProgress widget will be reset upon completion, or false otherwise.

Definition at line 331 of file kprogress.cpp.

QString KProgressDialog::buttonText (  )  const

Returns the text on the cancel button.

Definition at line 358 of file kprogress.cpp.

QString KProgressDialog::buttonText (  ) 

Returns the text on the cancel button.

Deprecated:

Definition at line 353 of file kprogress.cpp.

void KProgressDialog::ignoreCancel (  ) 

Ignores the last cancel action if the cancel button was pressed.

Useful for kdialog when combined with a KMessageBox to display a message like "Are you sure you want to cancel?"

Since:
3.5.5

Definition at line 236 of file kprogress.cpp.

QString KProgressDialog::labelText (  )  const

Returns the current dialog text.

Definition at line 304 of file kprogress.cpp.

QString KProgressDialog::labelText (  ) 

Returns the current dialog text.

Deprecated:

Definition at line 299 of file kprogress.cpp.

int KProgressDialog::minimumDuration (  )  const

Returns the wait duration in milliseconds.

Definition at line 261 of file kprogress.cpp.

int KProgressDialog::minimumDuration (  ) 

Returns the wait duration in milliseconds.

Deprecated:

Definition at line 256 of file kprogress.cpp.

const KProgress * KProgressDialog::progressBar (  )  const

Returns the KProgress used in this dialog.

To set the number of steps or other progress bar related settings, access the KProgress object directly via this method.

Definition at line 288 of file kprogress.cpp.

KProgress * KProgressDialog::progressBar (  ) 

Returns the KProgress used in this dialog.

To set the number of steps or other progress bar related settings, access the KProgress object directly via this method.

Definition at line 283 of file kprogress.cpp.

void KProgressDialog::setAllowCancel ( bool  allowCancel  ) 

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.

Parameters:
allowCancel Set to true to make the dialog non-closable

Definition at line 266 of file kprogress.cpp.

void KProgressDialog::setAutoClose ( bool  close  ) 

Sets whether the dialog should close automagically when all the steps in the KProgress have been completed.

Definition at line 325 of file kprogress.cpp.

void KProgressDialog::setAutoReset ( bool  autoReset  ) 

Sets whether the dialog should reset the KProgress dialog back to 0 steps compelete when all steps have been completed.

This is useful for KProgressDialogs that will be reused.

Definition at line 341 of file kprogress.cpp.

void KProgressDialog::setButtonText ( const QString &  text  ) 

Sets the text to appear on the cancel button.

Definition at line 346 of file kprogress.cpp.

void KProgressDialog::setLabel ( const QString &  text  ) 

Sets the text in the dialog.

Parameters:
text the text to display

Definition at line 293 of file kprogress.cpp.

void KProgressDialog::setMinimumDuration ( int  ms  ) 

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

Definition at line 246 of file kprogress.cpp.

void KProgressDialog::show ( void   )  [virtual]

Reimplemented for internal reasons, the API is not affected.

Reimplemented from QDialog.

Definition at line 401 of file kprogress.cpp.

void KProgressDialog::showCancelButton ( bool  show  ) 

Sets whether the cancel button is visible.

setAllowCancel(false) implies showCancelButton(false)

Parameters:
show Whether or not the cancel button should be shown

Definition at line 309 of file kprogress.cpp.

void KProgressDialog::slotAutoActions ( int  percentage  )  [protected, slot]

Definition at line 363 of file kprogress.cpp.

void KProgressDialog::slotAutoShow (  )  [protected, slot]

Definition at line 210 of file kprogress.cpp.

void KProgressDialog::slotCancel ( void   )  [protected, virtual, slot]

Activated when the Cancel button has been clicked.

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

Reimplemented from KDialogBase.

Definition at line 221 of file kprogress.cpp.

void KProgressDialog::virtual_hook ( int  id,
void *  data 
) [protected, virtual]

Reimplemented from KDialogBase.

Definition at line 411 of file kprogress.cpp.

bool KProgressDialog::wasCancelled (  )  const

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

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

Definition at line 241 of file kprogress.cpp.

bool KProgressDialog::wasCancelled (  ) 

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

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

Definition at line 231 of file kprogress.cpp.


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

kdeui

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

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal