KMessageBox Class Reference
Easy message dialog box. More...
#include <kmessagebox.h>
Public Types | |
enum | ButtonCode { Ok = 1, Cancel = 2, Yes = 3, No = 4, Continue = 5 } |
Button types. More... | |
enum | DialogType { QuestionYesNo = 1, WarningYesNo = 2, WarningContinueCancel = 3, WarningYesNoCancel = 4, Information = 5, Sorry = 7, Error = 8, QuestionYesNoCancel = 9 } |
enum | OptionsType { Notify = 1, AllowLink = 2 } |
| |
Static Public Member Functions | |
int | questionYesNo (QWidget *parent, const QString &text, const QString &caption=QString::null, const KGuiItem &buttonYes=KStdGuiItem::yes(), const KGuiItem &buttonNo=KStdGuiItem::no(), const QString &dontAskAgainName=QString::null, int options=Notify) |
Display a simple "question" dialog. | |
int | questionYesNoCancel (QWidget *parent, const QString &text, const QString &caption=QString::null, const KGuiItem &buttonYes=KStdGuiItem::yes(), const KGuiItem &buttonNo=KStdGuiItem::no(), const QString &dontAskAgainName=QString::null, int options=Notify) |
Display a simple "question" dialog. | |
int | questionYesNoList (QWidget *parent, const QString &text, const QStringList &strlist, const QString &caption=QString::null, const KGuiItem &buttonYes=KStdGuiItem::yes(), const KGuiItem &buttonNo=KStdGuiItem::no(), const QString &dontAskAgainName=QString::null, int options=Notify) |
Display a "question" dialog with a listbox to show information to the user. | |
int | warningYesNo (QWidget *parent, const QString &text, const QString &caption=QString::null, const KGuiItem &buttonYes=KStdGuiItem::yes(), const KGuiItem &buttonNo=KStdGuiItem::no(), const QString &dontAskAgainName=QString::null, int options=Notify) |
Display a "warning" dialog. | |
int | warningContinueCancel (QWidget *parent, const QString &text, const QString &caption=QString::null, const KGuiItem &buttonContinue=KStdGuiItem::cont(), const QString &dontAskAgainName=QString::null, int options=Notify) |
Display a "warning" dialog. | |
int | warningContinueCancelList (QWidget *parent, const QString &text, const QStringList &strlist, const QString &caption=QString::null, const KGuiItem &buttonContinue=KStdGuiItem::cont(), const QString &dontAskAgainName=QString::null, int options=Notify) |
Display a "warning" dialog with a listbox to show information to the user. | |
int | warningYesNoCancel (QWidget *parent, const QString &text, const QString &caption=QString::null, const KGuiItem &buttonYes=KStdGuiItem::yes(), const KGuiItem &buttonNo=KStdGuiItem::no(), const QString &dontAskAgainName=QString::null, int options=Notify) |
Display a Yes/No/Cancel "warning" dialog. | |
void | error (QWidget *parent, const QString &text, const QString &caption=QString::null, int options=Notify) |
Display an "Error" dialog. | |
void | detailedError (QWidget *parent, const QString &text, const QString &details, const QString &caption=QString::null, int options=Notify) |
Displays an "Error" dialog with a "Details >>" button. | |
void | queuedDetailedError (QWidget *parent, const QString &text, const QString &details, const QString &caption=QString::null) |
Like detailedError. | |
void | sorry (QWidget *parent, const QString &text, const QString &caption=QString::null, int options=Notify) |
Display an "Sorry" dialog. | |
void | detailedSorry (QWidget *parent, const QString &text, const QString &details, const QString &caption=QString::null, int options=Notify) |
Displays a "Sorry" dialog with a "Details >>" button. | |
void | information (QWidget *parent, const QString &text, const QString &caption=QString::null, const QString &dontShowAgainName=QString::null, int options=Notify) |
Display an "Information" dialog. | |
void | informationList (QWidget *parent, const QString &text, const QStringList &strlist, const QString &caption=QString::null, const QString &dontShowAgainName=QString::null, int options=Notify) |
Display an "Information" dialog with a listbox. | |
void | enableAllMessages () |
Enable all messages which have been turned off with the dontShowAgainName feature of the information dialog. | |
void | about (QWidget *parent, const QString &text, const QString &caption=QString::null, int options=Notify) |
Display an "About" dialog. | |
int | messageBox (QWidget *parent, DialogType type, const QString &text, const QString &caption=QString::null, const KGuiItem &buttonYes=KStdGuiItem::yes(), const KGuiItem &buttonNo=KStdGuiItem::no(), int options=Notify) |
Alternate method to show a messagebox:. | |
void | queuedMessageBox (QWidget *parent, DialogType type, const QString &text, const QString &caption, int options) |
void | queuedMessageBox (QWidget *parent, DialogType type, const QString &text, const QString &caption=QString::null) |
Detailed Description
Easy message dialog box.Provides convenience functions for some i18n'ed standard dialogs.
The text in message boxes is wrapped automatically. The text may either be plaintext or richtext. If the text is plaintext, a newline-character may be used to indicate the end of a paragraph.
- Author:
- Waldo Bastian (bastian@kde.org)
- Version:
- Id
- kmessagebox.h,v 1.41 2002/10/09 20:44:27 kloecker Exp
Definition at line 42 of file kmessagebox.h.
Member Enumeration Documentation
|
Button types.
Definition at line 48 of file kmessagebox.h. |
|
Definition at line 74 of file kmessagebox.h. |
Member Function Documentation
|
Display a simple "question" dialog.
The default button is "Yes". Pressing "Esc" selects "No". Definition at line 217 of file kmessagebox.cpp. References questionYesNoList(). Referenced by messageBox(), and KBugReport::slotOk(). |
|
Display a simple "question" dialog.
The default button is "Yes". Pressing "Esc" selects "Cancel". NOTE: The cancel button will always have the i18n'ed text '&Cancel'. Definition at line 300 of file kmessagebox.cpp. References KGlobal::config(), QString::fromLatin1(), QString::isEmpty(), QString::lower(), KConfigBase::readEntry(), KConfigBase::sync(), and KConfigBase::writeEntry(). Referenced by messageBox(). |
|
Display a "question" dialog with a listbox to show information to the user.
The default button is "Yes". Pressing "Esc" selects "No". Definition at line 230 of file kmessagebox.cpp. References KGlobal::config(), QString::fromLatin1(), QString::isEmpty(), QString::lower(), KConfigBase::readEntry(), KConfigBase::sync(), and KConfigBase::writeEntry(). Referenced by questionYesNo(). |
|
Display a "warning" dialog.
The default button is "No". Pressing "Esc" selects "No". Definition at line 375 of file kmessagebox.cpp. References KGlobal::config(), QString::fromLatin1(), QString::isEmpty(), QString::lower(), KConfigBase::readEntry(), KConfigBase::sync(), and KConfigBase::writeEntry(). Referenced by messageBox(), and KBugReport::slotCancel(). |
|
Display a "warning" dialog.
The default button is buttonContinue. Pressing "Esc" selects "Cancel". Definition at line 445 of file kmessagebox.cpp. References warningContinueCancelList(). Referenced by messageBox(). |
|
Display a "warning" dialog with a listbox to show information to the user.
The default button is buttonContinue. Pressing "Esc" selects "Cancel". Definition at line 457 of file kmessagebox.cpp. References KGlobal::config(), QString::fromLatin1(), QString::isEmpty(), KConfigBase::readBoolEntry(), KConfigBase::sync(), and KConfigBase::writeEntry(). Referenced by warningContinueCancel(). |
|
Display a Yes/No/Cancel "warning" dialog.
The default button is "Yes". Pressing "Esc" selects "Cancel" NOTE: The cancel button will always have the i18n'ed text '&Cancel'. Definition at line 520 of file kmessagebox.cpp. References KGlobal::config(), QString::fromLatin1(), QString::isEmpty(), QString::lower(), KConfigBase::readEntry(), KConfigBase::sync(), and KConfigBase::writeEntry(). Referenced by messageBox(). |
|
Display an "Error" dialog.
If your program detects the action specified by the user is somehow not allowed, this should never be reported with error(). Use sorry() instead to explain to the user that this action is not allowed. The default button is "&OK". Pressing "Esc" selects the OK-button. NOTE: The OK button will always have the i18n'ed text '&OK'. Definition at line 593 of file kmessagebox.cpp. References QString::isEmpty(). Referenced by messageBox(), and KBugReport::slotOk(). |
|
Displays an "Error" dialog with a "Details >>" button.
The If your program detects the action specified by the user is somehow not allowed, this should never be reported with error(). Use sorry() instead to explain to the user that this action is not allowed. The default button is "&OK". Pressing "Esc" selects the OK-button. NOTE: The OK button will always have the i18n'ed text '&OK'. Definition at line 607 of file kmessagebox.cpp. References QString::isEmpty(). Referenced by queuedDetailedError(). |
|
Like detailedError. This function will return immediately, the messagebox will be shown once the application enters an event loop and no other messagebox is being shown. Note that if the parent gets deleted, the messagebox will not be shown. Definition at line 622 of file kmessagebox.cpp. References detailedError(). |
|
Display an "Sorry" dialog.
To be used for small problems like "Sorry, I can't find the file you specified." The default button is "&OK". Pressing "Esc" selects the OK-button. NOTE: The ok button will always have the i18n'ed text '&OK'. Definition at line 633 of file kmessagebox.cpp. References QString::isEmpty(). Referenced by messageBox(), and KPasswordDialog::slotOk(). |
|
Displays a "Sorry" dialog with a "Details >>" button.
To be used for small problems like "Sorry, I can't find the file you specified."
And then The default button is "&OK". Pressing "Esc" selects the OK-button. NOTE: The ok button will always have the i18n'ed text '&OK'. Definition at line 647 of file kmessagebox.cpp. References QString::isEmpty(). |
|
Display an "Information" dialog.
The default button is "&OK". Pressing "Esc" selects the OK-button. NOTE: The OK button will always have the i18n'ed text '&OK'. Definition at line 662 of file kmessagebox.cpp. References informationList(). Referenced by messageBox(), and KBugReport::slotOk(). |
|
Display an "Information" dialog with a listbox.
The default button is "&OK". Pressing "Esc" selects the OK-button. NOTE: The OK button will always have the i18n'ed text '&OK'.
Definition at line 669 of file kmessagebox.cpp. References KGlobal::config(), QString::fromLatin1(), QString::isEmpty(), KConfigBase::readBoolEntry(), KConfigBase::sync(), and KConfigBase::writeEntry(). Referenced by information(). |
|
Enable all messages which have been turned off with the
Definition at line 715 of file kmessagebox.cpp. References KGlobal::config(), KConfig::entryMap(), QString::fromLatin1(), KConfigBase::hasGroup(), KConfigBase::sync(), and KConfigBase::writeEntry(). |
|
Display an "About" dialog.
The default button is "&OK". NOTE: The ok button will always have the i18n'ed text '&OK'. Definition at line 735 of file kmessagebox.cpp. References QMessageBox::adjustSize(), QString::arg(), QString::isEmpty(), QMessageBox::setButtonText(), and QMessageBox::setIconPixmap(). |
|
Alternate method to show a messagebox:.
Definition at line 758 of file kmessagebox.cpp. References error(), information(), questionYesNo(), questionYesNoCancel(), sorry(), warningContinueCancel(), warningYesNo(), and warningYesNoCancel(). Referenced by queuedMessageBox(). |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Definition at line 800 of file kmessagebox.cpp. References messageBox(). |
The documentation for this class was generated from the following files: