#include <messagebox.h>
Inherits KMessageBox.
Public Types | |
enum | AskType { CONT_CANCEL_DEF_CONT , CONT_CANCEL_DEF_CANCEL , YES_NO_DEF_NO } |
Static Public Member Functions | |
static ButtonCode | getContinueDefault (const TQString &dontAskAgainName) |
static void | setContinueDefault (const TQString &dontAskAgainName, ButtonCode defaultButton) |
static int | warningContinueCancel (TQWidget *parent, ButtonCode defaultButton, const TQString &text, const TQString &caption=TQString(), const KGuiItem &buttonContinue=KStdGuiItem::cont(), const TQString &dontAskAgainName=TQString()) |
static int | warningContinueCancel (TQWidget *parent, const TQString &text, const TQString &caption=TQString(), const KGuiItem &buttonContinue=KStdGuiItem::cont(), const TQString &dontAskAgainName=TQString()) |
static bool | setDefaultShouldBeShownContinue (const TQString &dontShowAgainName, bool defaultShow) |
static bool | shouldBeShownContinue (const TQString &dontShowAgainName) |
static void | saveDontShowAgainYesNo (const TQString &dontShowAgainName, bool dontShow=true, ButtonCode result=No) |
static void | saveDontShowAgainContinue (const TQString &dontShowAgainName, bool dontShow=true) |
static void | setDontShowAskAgainConfig (TDEConfig *cfg) |
Detailed Description
Enhanced KMessageBox.
The MessageBox class provides an extension to KMessageBox, including the option for Continue/Cancel message boxes to have a default button of Cancel.
Definition at line 36 of file messagebox.h.
Member Enumeration Documentation
◆ AskType
enum MessageBox::AskType |
MessageBox types.
- CONT_CANCEL_DEF_CONT - Continue/Cancel, with Continue as the default button.
- CONT_CANCEL_DEF_CANCEL - Continue/Cancel, with Cancel as the default button.
- YES_NO_DEF_NO - Yes/No, with No as the default button.
Definition at line 44 of file messagebox.h.
Member Function Documentation
◆ getContinueDefault()
|
static |
Gets the default button for the Continue/Cancel message box with the specified "don't ask again" name.
- Parameters
-
dontAskAgainName The identifier controlling whether the message box is suppressed.
Definition at line 43 of file messagebox.cpp.
◆ saveDontShowAgainContinue()
|
static |
Stores whether a non-Yes/No message box should or should not be shown again.
If the message box has Cancel as the default button, either setContinueDefault() or warningContinueCancel() must have been called previously to set this for the specified dontShowAgainName
value.
- Parameters
-
dontShowAgainName The identifier controlling whether the message box is suppressed. dontShow If true, the message box will be suppressed and will return Continue.
Definition at line 155 of file messagebox.cpp.
◆ saveDontShowAgainYesNo()
|
static |
Stores whether the Yes/No message box should or should not be shown again.
- Parameters
-
dontShowAgainName The identifier controlling whether the message box is suppressed. dontShow If true, the message box will be suppressed and will return result
.result The button code to return if the message box is suppressed.
Definition at line 142 of file messagebox.cpp.
◆ setContinueDefault()
|
static |
Sets the default button for the Continue/Cancel message box with the specified "don't ask again" name.
- Parameters
-
dontAskAgainName The identifier controlling whether the message box is suppressed. defaultButton The default button for the message box. Valid values are Continue or Cancel.
Definition at line 34 of file messagebox.cpp.
◆ setDefaultShouldBeShownContinue()
|
static |
If there is no current setting for whether a non-Yes/No message box should be shown, sets it to defaultShow
.
If a Continue/Cancel message box has Cancel as the default button, either setContinueDefault() or warningContinueCancel() must have been called previously to set this for the specified dontShowAgainName
value.
- Returns
- true if
defaultShow
was written.
Definition at line 106 of file messagebox.cpp.
◆ setDontShowAskAgainConfig()
|
inlinestatic |
Sets the TDEConfig object to be used by the MessageBox class.
Definition at line 117 of file messagebox.h.
◆ shouldBeShownContinue()
|
static |
Returns whether a non-Yes/No message box should be shown.
If the message box has Cancel as the default button, either setContinueDefault() or warningContinueCancel() must have been called previously to set this for the specified dontShowAgainName
value.
- Parameters
-
dontShowAgainName The identifier controlling whether the message box is suppressed.
Definition at line 127 of file messagebox.cpp.
◆ warningContinueCancel() [1/2]
|
static |
Displays a Continue/Cancel message box with the option as to which button is the default.
- Parameters
-
parent Parent widget defaultButton The default button for the message box. Valid values are Continue or Cancel. text Message string caption Caption (window title) of the message box buttonContinue The text for the first button (default = i18n("Continue")) dontAskAgainName If specified, the message box will only be suppressed if the user chose Continue last time.
Definition at line 75 of file messagebox.cpp.
◆ warningContinueCancel() [2/2]
|
static |
Displays a Continue/Cancel message box.
- Parameters
-
parent Parent widget text Message string caption Caption (window title) of the message box buttonContinue The text for the first button (default = i18n("Continue")) dontAskAgainName If specified, (1) The message box will only be suppressed if the user chose Continue last time, and (2) The default button is that last set with either setContinueDefault() or warningContinueCancel() for the same dontAskAgainName
value. If neither method has been used to set a default button, Continue is the default.
Definition at line 63 of file messagebox.cpp.
The documentation for this class was generated from the following files: