tdeui
KProgressBoxDialog Class Reference
KProgressBoxDialog provides a dialog with a text label, a progress bar and an optional cancel button with a KDE look 'n feel. More...
#include <kprogressbox.h>

Public Member Functions | |
KProgressBoxDialog (TQWidget *parent=0, const char *name=0, const TQString &caption=TQString::null, const TQString &text=TQString::null, bool modal=false) | |
~KProgressBoxDialog () | |
KProgress * | progressBar () |
KTextEdit * | textEdit () |
const KProgress * | progressBar () const |
const KTextEdit * | textEdit () const |
void | setLabel (const TQString &text) |
TQString | labelText () KDE_DEPRECATED |
TQString | labelText () const |
void | setAllowCancel (bool allowCancel) |
void | setAllowTextEdit (bool allowTextEdit) |
bool | allowCancel () KDE_DEPRECATED |
bool | allowCancel () const |
void | showCancelButton (bool show) |
void | setAutoClose (bool close) |
bool | autoClose () |
bool | autoClose () const |
void | setAutoReset (bool autoReset) |
bool | autoReset () |
bool | autoReset () const |
bool | wasCancelled () |
bool | wasCancelled () const |
void | ignoreCancel () |
void | setButtonText (const TQString &) |
TQString | buttonText () KDE_DEPRECATED |
TQString | buttonText () const |
void | setMinimumDuration (int ms) |
int | minimumDuration () KDE_DEPRECATED |
int | minimumDuration () const |
virtual void | show () |
Protected Slots | |
void | slotAutoShow () |
void | slotAutoActions (int percentage) |
void | slotCancel () |
Protected Member Functions | |
virtual void | virtual_hook (int id, void *data) |
Detailed Description
KProgressBoxDialog 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 KProgressBoxDialog. 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 KProgressBox is available through direct access to the progress bar widget via progressBar();
Also, an expandable textbox provided below the progress bar.
A dialog with a progress bar and text box.
Definition at line 54 of file kprogressbox.h.
Constructor & Destructor Documentation
KProgressBoxDialog::KProgressBoxDialog | ( | TQWidget * | parent = 0 , |
|
const char * | name = 0 , |
|||
const TQString & | caption = TQString::null , |
|||
const TQString & | text = TQString::null , |
|||
bool | modal = false | |||
) |
Constructs a KProgressBoxDialog.
- 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 56 of file kprogressbox.cpp.
KProgressBoxDialog::~KProgressBoxDialog | ( | ) |
Destructor.
Definition at line 95 of file kprogressbox.cpp.
Member Function Documentation
bool KProgressBoxDialog::allowCancel | ( | ) |
Returns true if the dialog can be canceled, false otherwise.
Definition at line 169 of file kprogressbox.cpp.
bool KProgressBoxDialog::allowCancel | ( | ) | const |
Returns true if the dialog can be canceled, false otherwise.
Definition at line 174 of file kprogressbox.cpp.
bool KProgressBoxDialog::autoClose | ( | ) |
Returns true if the dialog will close upon completion, or false otherwise.
Definition at line 221 of file kprogressbox.cpp.
bool KProgressBoxDialog::autoClose | ( | ) | const |
Returns true if the dialog will close upon completion, or false otherwise.
Definition at line 226 of file kprogressbox.cpp.
bool KProgressBoxDialog::autoReset | ( | ) |
Returns true if the KProgressBox widget will be reset upon completion, or false otherwise.
Definition at line 237 of file kprogressbox.cpp.
bool KProgressBoxDialog::autoReset | ( | ) | const |
Returns true if the KProgressBox widget will be reset upon completion, or false otherwise.
Definition at line 242 of file kprogressbox.cpp.
TQString KProgressBoxDialog::buttonText | ( | ) |
TQString KProgressBoxDialog::buttonText | ( | ) | const |
Returns the text on the cancel button.
Definition at line 264 of file kprogressbox.cpp.
void KProgressBoxDialog::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 126 of file kprogressbox.cpp.
TQString KProgressBoxDialog::labelText | ( | ) |
TQString KProgressBoxDialog::labelText | ( | ) | const |
Returns the current dialog text.
Definition at line 210 of file kprogressbox.cpp.
int KProgressBoxDialog::minimumDuration | ( | ) |
Returns the wait duration in milliseconds.
Definition at line 146 of file kprogressbox.cpp.
int KProgressBoxDialog::minimumDuration | ( | ) | const |
Returns the wait duration in milliseconds.
Definition at line 151 of file kprogressbox.cpp.
const KProgress * KProgressBoxDialog::progressBar | ( | ) | const |
Returns the KProgressBox used in this dialog.
To set the number of steps or other progress bar related settings, access the KProgressBox object directly via this method.
Definition at line 189 of file kprogressbox.cpp.
KProgress * KProgressBoxDialog::progressBar | ( | ) |
Returns the KProgressBox used in this dialog.
To set the number of steps or other progress bar related settings, access the KProgressBox object directly via this method.
Definition at line 179 of file kprogressbox.cpp.
void KProgressBoxDialog::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 156 of file kprogressbox.cpp.
void KProgressBoxDialog::setAllowTextEdit | ( | bool | allowTextEdit | ) |
Sets whether or not the user can edit the text shown in the textbox.
- Parameters:
-
allowTextEdit Set to true to make the text editable
Definition at line 162 of file kprogressbox.cpp.
void KProgressBoxDialog::setAutoClose | ( | bool | close | ) |
Sets whether the dialog should close automagically when all the steps in the KProgressBox have been completed.
Definition at line 231 of file kprogressbox.cpp.
void KProgressBoxDialog::setAutoReset | ( | bool | autoReset | ) |
Sets whether the dialog should reset the KProgressBox dialog back to 0 steps compelete when all steps have been completed.
This is useful for KProgressBoxDialogs that will be reused.
Definition at line 247 of file kprogressbox.cpp.
void KProgressBoxDialog::setButtonText | ( | const TQString & | text | ) |
Sets the text to appear on the cancel button.
Definition at line 252 of file kprogressbox.cpp.
void KProgressBoxDialog::setLabel | ( | const TQString & | text | ) |
Sets the text in the dialog.
- Parameters:
-
text the text to display
Definition at line 199 of file kprogressbox.cpp.
void KProgressBoxDialog::setMinimumDuration | ( | int | ms | ) |
Set the minimum number of milliseconds to wait before actually showing the dialog.
Definition at line 136 of file kprogressbox.cpp.
void KProgressBoxDialog::show | ( | void | ) | [virtual] |
Reimplemented for internal reasons, the API is not affected.
Reimplemented from TQDialog.
Definition at line 307 of file kprogressbox.cpp.
void KProgressBoxDialog::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 215 of file kprogressbox.cpp.
void KProgressBoxDialog::slotCancel | ( | void | ) | [protected, virtual, slot] |
Activated when the Cancel button has been clicked.
The TQDialog::reject() is activated in regular mode and TQDialog::done( Cancel ) when in message box mode.
Reimplemented from KDialogBase.
Definition at line 111 of file kprogressbox.cpp.
const KTextEdit * KProgressBoxDialog::textEdit | ( | ) | const |
Returns the KTextEdit used in this dialog.
To set the number of lines or other text box related settings, access the KTextEdit object directly via this method.
Definition at line 194 of file kprogressbox.cpp.
KTextEdit * KProgressBoxDialog::textEdit | ( | ) |
Returns the KTextEdit used in this dialog.
To set the number of lines or other text box related settings, access the KTextEdit object directly via this method.
Definition at line 184 of file kprogressbox.cpp.
bool KProgressBoxDialog::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 131 of file kprogressbox.cpp.
bool KProgressBoxDialog::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 121 of file kprogressbox.cpp.
The documentation for this class was generated from the following files: