# class KProgressDialog

###

Module | kdeui
Namespace |
Class | KProgressDialog
Inherits | KDialog

A dialog with a progress bar

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 QProgressBar is available through direct access to the progress bar widget via progressBar();

Author Aaron J. Seigo Author Urs Wolfer uwolfer @kde.org

### methods

- KProgressDialog (parent, caption, text, flags)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  parent | QWidget | 0
  caption | QString | QString()
  text | QString | QString()
  flags | Qt.WFlags | 0

  Constructs a KProgressDialog

  parent - Parent of the widget

  caption - Text to display in window title bar

  text - Text to display in the dialog

  flags - The widget flags

- KProgressDialog (a0)

  returns ctor
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  a0 | KProgressDialog |

- KProgressDialog (a0, a1, a2, a3)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QWidget | 0
  a1 | QString | QString()
  a2 | QString | QString()
  a3 | Qt.WFlags | 0

- allowCancel ( )

  returns bool

  Returns true if the dialog can be canceled, false otherwise

- autoClose ( )

  returns bool

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

- autoReset ( )

  returns bool

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

- buttonText ( )

  returns QString

  Returns the text on the cancel button

- ignoreCancel ( )

  returns Nothing

  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?"

- labelText ( )

  returns QString

  Returns the current dialog text

- minimumDuration ( )

  returns int

  Returns the wait duration in milliseconds

- progressBar ( )

  returns QProgressBar

  Returns the QProgressBar used in this dialog. To set the number of steps or other progress bar related settings, access the QProgressBar object directly via this method.

- progressBar ( )

  returns QProgressBar
  Not implemented

  Returns the QProgressBar used in this dialog. To set the number of steps or other progress bar related settings, access the QProgressBar object directly via this method.

- reject ( )

  returns Nothing

- setAllowCancel (allowCancel)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  allowCancel | bool |

  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.

  The default is true.

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

- setAutoClose (close)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  close | bool |

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

  The default is true.

- setAutoReset (autoReset)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  autoReset | bool |

  Sets whether the dialog should reset the QProgressBar dialog back to 0 steps compelete when all steps have been completed. This is useful for KProgressDialogs that will be reused.

  The default is false.

- setButtonText (text)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  text | QString |

  Sets the text to appear on the cancel button.

- setLabelText (text)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  text | QString |

  Sets the text in the dialog

  text - the text to display

- setMinimumDuration (ms)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  ms | int |

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

- showCancelButton (show)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  show | bool |

  Sets whether the cancel button is visible. setAllowCancel(false) implies showCancelButton(false)

  The default is true.

  show - Whether or not the cancel button should be shown

- showEvent (event)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  event | QShowEvent |

- wasCancelled ( )

  returns bool

  Returns true if the dialog was closed or canceled before completion. If the dialog is not cancellable it will always return false.