org.kde.koala

Class KMessageBox

public class KMessageBox extends Object implements QtSupport

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)

UNKNOWN: Easy message dialog box.

Field Summary
static intAllowLink
static intCancel
static intContinue
static intDangerous
static intError
static intInformation
static intNo
static intNoExec
static intNotify
static intOk
Button types.
static intPlainCaption
static intQuestionYesNo
static intQuestionYesNoCancel
static intSorry
static intWarningContinueCancel
static intWarningYesNo
static intWarningYesNoCancel
static intYes
Constructor Summary
protected KMessageBox(Class dummy)
KMessageBox()
Method Summary
static voidabout(QWidget parent, String text, String caption, int options)
Display an "About" dialog.
static voidabout(QWidget parent, String text, String caption)
static voidabout(QWidget parent, String text)
static intcreateKMessageBox(KDialogBase dialog, int icon, String text, String[] strlist, String ask, boolean[] checkboxReturn, int options, String details)
Create content and layout of a standard dialog
static intcreateKMessageBox(KDialogBase dialog, int icon, String text, String[] strlist, String ask, boolean[] checkboxReturn, int options)
static intcreateKMessageBox(KDialogBase dialog, QPixmap icon, String text, String[] strlist, String ask, boolean[] checkboxReturn, int options, String details, int notifyType)
Create content and layout of a standard dialog
static intcreateKMessageBox(KDialogBase dialog, QPixmap icon, String text, String[] strlist, String ask, boolean[] checkboxReturn, int options, String details)
static intcreateKMessageBox(KDialogBase dialog, QPixmap icon, String text, String[] strlist, String ask, boolean[] checkboxReturn, int options)
static voiddetailedError(QWidget parent, String text, String details, String caption, int options)
Displays an "Error" dialog with a "Details >>" button.
static voiddetailedError(QWidget parent, String text, String details, String caption)
static voiddetailedError(QWidget parent, String text, String details)
static voiddetailedErrorWId(long parent_id, String text, String details, String caption, int options)
This function accepts the window id of the parent window, instead of QWidget.
static voiddetailedErrorWId(long parent_id, String text, String details, String caption)
static voiddetailedErrorWId(long parent_id, String text, String details)
static voiddetailedSorry(QWidget parent, String text, String details, String caption, int options)
Displays a "Sorry" dialog with a "Details >>" button.
static voiddetailedSorry(QWidget parent, String text, String details, String caption)
static voiddetailedSorry(QWidget parent, String text, String details)
static voiddetailedSorryWId(long parent_id, String text, String details, String caption, int options)
This function accepts the window id of the parent window, instead of QWidget.
static voiddetailedSorryWId(long parent_id, String text, String details, String caption)
static voiddetailedSorryWId(long parent_id, String text, String details)
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
static voidenableAllMessages()
Enable all messages which have been turned off with the dontShowAgainName feature.
static voidenableMessage(String dontShowAgainName)
Re-enable a specific dontShowAgainName messages that had previously been turned off.
static voiderror(QWidget parent, String text, String caption, int options)
Display an "Error" dialog.
static voiderror(QWidget parent, String text, String caption)
static voiderror(QWidget parent, String text)
static voiderrorList(QWidget parent, String text, String[] strlist, String caption, int options)
Display an "Error" dialog with a listbox.
static voiderrorList(QWidget parent, String text, String[] strlist, String caption)
static voiderrorList(QWidget parent, String text, String[] strlist)
static voiderrorListWId(long parent_id, String text, String[] strlist, String caption, int options)
This function accepts the window id of the parent window, instead of QWidget.
static voiderrorListWId(long parent_id, String text, String[] strlist, String caption)
static voiderrorListWId(long parent_id, String text, String[] strlist)
static voiderrorWId(long parent_id, String text, String caption, int options)
This function accepts the window id of the parent window, instead of QWidget.
static voiderrorWId(long parent_id, String text, String caption)
static voiderrorWId(long parent_id, String text)
protected voidfinalize()
Deletes the wrapped C++ instance
static voidinformation(QWidget parent, String text, String caption, String dontShowAgainName, int options)
Display an "Information" dialog.
static voidinformation(QWidget parent, String text, String caption, String dontShowAgainName)
static voidinformation(QWidget parent, String text, String caption)
static voidinformation(QWidget parent, String text)
static voidinformationList(QWidget parent, String text, String[] strlist, String caption, String dontShowAgainName, int options)
Display an "Information" dialog with a listbox.
static voidinformationList(QWidget parent, String text, String[] strlist, String caption, String dontShowAgainName)
static voidinformationList(QWidget parent, String text, String[] strlist, String caption)
static voidinformationList(QWidget parent, String text, String[] strlist)
static voidinformationListWId(long parent_id, String text, String[] strlist, String caption, String dontShowAgainName, int options)
This function accepts the window id of the parent window, instead of QWidget.
static voidinformationListWId(long parent_id, String text, String[] strlist, String caption, String dontShowAgainName)
static voidinformationListWId(long parent_id, String text, String[] strlist, String caption)
static voidinformationListWId(long parent_id, String text, String[] strlist)
static voidinformationWId(long parent_id, String text, String caption, String dontShowAgainName, int options)
This function accepts the window id of the parent window, instead of QWidget.
static voidinformationWId(long parent_id, String text, String caption, String dontShowAgainName)
static voidinformationWId(long parent_id, String text, String caption)
static voidinformationWId(long parent_id, String text)
booleanisDisposed()
Has the wrapped C++ instance been deleted?
static intmessageBox(QWidget parent, int type, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontShowAskAgainName, int options)
Alternate method to show a messagebox:
static intmessageBox(QWidget parent, int type, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontShowAskAgainName)
static intmessageBox(QWidget parent, int type, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, int options)
Alternate method to show a messagebox:
static intmessageBox(QWidget parent, int type, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo)
static intmessageBox(QWidget parent, int type, String text, String caption, KGuiItem buttonYes)
static intmessageBox(QWidget parent, int type, String text, String caption)
static intmessageBox(QWidget parent, int type, String text)
static intmessageBoxWId(long parent_id, int type, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontShowAskAgainName, int options)
This function accepts the window id of the parent window, instead of QWidget.
static intmessageBoxWId(long parent_id, int type, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontShowAskAgainName)
static intmessageBoxWId(long parent_id, int type, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo)
static intmessageBoxWId(long parent_id, int type, String text, String caption, KGuiItem buttonYes)
static intmessageBoxWId(long parent_id, int type, String text, String caption)
static intmessageBoxWId(long parent_id, int type, String text)
static intquestionYesNo(QWidget parent, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
Display a simple "question" dialog.
static intquestionYesNo(QWidget parent, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)
static intquestionYesNo(QWidget parent, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo)
static intquestionYesNo(QWidget parent, String text, String caption, KGuiItem buttonYes)
static intquestionYesNo(QWidget parent, String text, String caption)
static intquestionYesNo(QWidget parent, String text)
static intquestionYesNoCancel(QWidget parent, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
Display a simple "question" dialog.
static intquestionYesNoCancel(QWidget parent, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)
static intquestionYesNoCancel(QWidget parent, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo)
static intquestionYesNoCancel(QWidget parent, String text, String caption, KGuiItem buttonYes)
static intquestionYesNoCancel(QWidget parent, String text, String caption)
static intquestionYesNoCancel(QWidget parent, String text)
static intquestionYesNoCancelWId(long parent_id, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
This function accepts the window id of the parent window, instead of QWidget.
static intquestionYesNoCancelWId(long parent_id, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)
static intquestionYesNoCancelWId(long parent_id, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo)
static intquestionYesNoCancelWId(long parent_id, String text, String caption, KGuiItem buttonYes)
static intquestionYesNoCancelWId(long parent_id, String text, String caption)
static intquestionYesNoCancelWId(long parent_id, String text)
static intquestionYesNoList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
Display a "question" dialog with a listbox to show information to the user
static intquestionYesNoList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)
static intquestionYesNoList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo)
static intquestionYesNoList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonYes)
static intquestionYesNoList(QWidget parent, String text, String[] strlist, String caption)
static intquestionYesNoList(QWidget parent, String text, String[] strlist)
static intquestionYesNoListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
This function accepts the window id of the parent window, instead of QWidget.
static intquestionYesNoListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)
static intquestionYesNoListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo)
static intquestionYesNoListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonYes)
static intquestionYesNoListWId(long parent_id, String text, String[] strlist, String caption)
static intquestionYesNoListWId(long parent_id, String text, String[] strlist)
static intquestionYesNoWId(long parent_id, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
This function accepts the window id of the parent window, instead of QWidget.
static intquestionYesNoWId(long parent_id, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)
static intquestionYesNoWId(long parent_id, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo)
static intquestionYesNoWId(long parent_id, String text, String caption, KGuiItem buttonYes)
static intquestionYesNoWId(long parent_id, String text, String caption)
static intquestionYesNoWId(long parent_id, String text)
static voidqueuedDetailedError(QWidget parent, String text, String details, String caption)
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.
static voidqueuedDetailedError(QWidget parent, String text, String details)
static voidqueuedDetailedErrorWId(long parent_id, String text, String details, String caption)
This function accepts the window id of the parent window, instead of QWidget.
static voidqueuedDetailedErrorWId(long parent_id, String text, String details)
static voidqueuedMessageBox(QWidget parent, int type, String text, String caption, int options)
Like messageBox Only for message boxes of type Information, Sorry or Error.
static voidqueuedMessageBox(QWidget parent, int type, String text, String caption)
static voidqueuedMessageBox(QWidget parent, int type, String text)
static voidqueuedMessageBoxWId(long parent_id, int type, String text, String caption, int options)
This function accepts the window id of the parent window, instead of QWidget.
static voidqueuedMessageBoxWId(long parent_id, int type, String text, String caption)
This function accepts the window id of the parent window, instead of QWidget.
static voidqueuedMessageBoxWId(long parent_id, int type, String text)
static voidsaveDontShowAgainContinue(String dontShowAgainName)
Save the fact that the continue/cancel message box should not be shown again.
static voidsaveDontShowAgainYesNo(String dontShowAgainName, int result)
Save the fact that the yes/no message box should not be shown again.
static voidsetDontShowAskAgainConfig(KConfig cfg)
Use cfg for all settings related to the dontShowAgainName feature.
static booleanshouldBeShownContinue(String dontShowAgainName)
static booleanshouldBeShownYesNo(String dontShowAgainName, int result)
static voidsorry(QWidget parent, String text, String caption, int options)
Display an "Sorry" dialog.
static voidsorry(QWidget parent, String text, String caption)
static voidsorry(QWidget parent, String text)
static voidsorryWId(long parent_id, String text, String caption, int options)
This function accepts the window id of the parent window, instead of QWidget.
static voidsorryWId(long parent_id, String text, String caption)
static voidsorryWId(long parent_id, String text)
static intwarningContinueCancel(QWidget parent, String text, String caption, KGuiItem buttonContinue, String dontAskAgainName, int options)
Display a "warning" dialog.
static intwarningContinueCancel(QWidget parent, String text, String caption, KGuiItem buttonContinue, String dontAskAgainName)
static intwarningContinueCancel(QWidget parent, String text, String caption, KGuiItem buttonContinue)
static intwarningContinueCancel(QWidget parent, String text, String caption)
static intwarningContinueCancel(QWidget parent, String text)
static intwarningContinueCancelList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonContinue, String dontAskAgainName, int options)
Display a "warning" dialog with a listbox to show information to the user.
static intwarningContinueCancelList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonContinue, String dontAskAgainName)
static intwarningContinueCancelList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonContinue)
static intwarningContinueCancelList(QWidget parent, String text, String[] strlist, String caption)
static intwarningContinueCancelList(QWidget parent, String text, String[] strlist)
static intwarningContinueCancelListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonContinue, String dontAskAgainName, int options)
This function accepts the window id of the parent window, instead of QWidget.
static intwarningContinueCancelListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonContinue, String dontAskAgainName)
static intwarningContinueCancelListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonContinue)
static intwarningContinueCancelListWId(long parent_id, String text, String[] strlist, String caption)
static intwarningContinueCancelListWId(long parent_id, String text, String[] strlist)
static intwarningContinueCancelWId(long parent_id, String text, String caption, KGuiItem buttonContinue, String dontAskAgainName, int options)
This function accepts the window id of the parent window, instead of QWidget.
static intwarningContinueCancelWId(long parent_id, String text, String caption, KGuiItem buttonContinue, String dontAskAgainName)
static intwarningContinueCancelWId(long parent_id, String text, String caption, KGuiItem buttonContinue)
static intwarningContinueCancelWId(long parent_id, String text, String caption)
static intwarningContinueCancelWId(long parent_id, String text)
static intwarningYesNo(QWidget parent, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
Display a "warning" dialog.
static intwarningYesNo(QWidget parent, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)
static intwarningYesNo(QWidget parent, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo)
static intwarningYesNo(QWidget parent, String text, String caption, KGuiItem buttonYes)
static intwarningYesNo(QWidget parent, String text, String caption)
static intwarningYesNo(QWidget parent, String text)
static intwarningYesNoCancel(QWidget parent, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
Display a Yes/No/Cancel "warning" dialog.
static intwarningYesNoCancel(QWidget parent, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)
static intwarningYesNoCancel(QWidget parent, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo)
static intwarningYesNoCancel(QWidget parent, String text, String caption, KGuiItem buttonYes)
static intwarningYesNoCancel(QWidget parent, String text, String caption)
static intwarningYesNoCancel(QWidget parent, String text)
static intwarningYesNoCancelList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
Display a Yes/No/Cancel "warning" dialog with a listbox to show information to the user.
static intwarningYesNoCancelList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)
static intwarningYesNoCancelList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo)
static intwarningYesNoCancelList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonYes)
static intwarningYesNoCancelList(QWidget parent, String text, String[] strlist, String caption)
static intwarningYesNoCancelList(QWidget parent, String text, String[] strlist)
static intwarningYesNoCancelListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
This function accepts the window id of the parent window, instead of QWidget.
static intwarningYesNoCancelListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)
static intwarningYesNoCancelListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo)
static intwarningYesNoCancelListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonYes)
static intwarningYesNoCancelListWId(long parent_id, String text, String[] strlist, String caption)
static intwarningYesNoCancelListWId(long parent_id, String text, String[] strlist)
static intwarningYesNoCancelWId(long parent_id, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
This function accepts the window id of the parent window, instead of QWidget.
static intwarningYesNoCancelWId(long parent_id, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)
static intwarningYesNoCancelWId(long parent_id, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo)
static intwarningYesNoCancelWId(long parent_id, String text, String caption, KGuiItem buttonYes)
static intwarningYesNoCancelWId(long parent_id, String text, String caption)
static intwarningYesNoCancelWId(long parent_id, String text)
static intwarningYesNoList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
Display a "warning" dialog with a listbox to show information to the user
static intwarningYesNoList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)
static intwarningYesNoList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo)
static intwarningYesNoList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonYes)
static intwarningYesNoList(QWidget parent, String text, String[] strlist, String caption)
static intwarningYesNoList(QWidget parent, String text, String[] strlist)
static intwarningYesNoListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
This function accepts the window id of the parent window, instead of QWidget.
static intwarningYesNoListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)
static intwarningYesNoListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo)
static intwarningYesNoListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonYes)
static intwarningYesNoListWId(long parent_id, String text, String[] strlist, String caption)
static intwarningYesNoListWId(long parent_id, String text, String[] strlist)
static intwarningYesNoWId(long parent_id, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
This function accepts the window id of the parent window, instead of QWidget.
static intwarningYesNoWId(long parent_id, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)
static intwarningYesNoWId(long parent_id, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo)
static intwarningYesNoWId(long parent_id, String text, String caption, KGuiItem buttonYes)
static intwarningYesNoWId(long parent_id, String text, String caption)
static intwarningYesNoWId(long parent_id, String text)

Field Detail

AllowLink

public static final int AllowLink

Cancel

public static final int Cancel

Continue

public static final int Continue

Dangerous

public static final int Dangerous

Error

public static final int Error

Information

public static final int Information

No

public static final int No

NoExec

public static final int NoExec

Notify

public static final int Notify

Ok

public static final int Ok
Button types.

UNKNOWN: Button types.

PlainCaption

public static final int PlainCaption

QuestionYesNo

public static final int QuestionYesNo

QuestionYesNoCancel

public static final int QuestionYesNoCancel

Sorry

public static final int Sorry

WarningContinueCancel

public static final int WarningContinueCancel

WarningYesNo

public static final int WarningYesNo

WarningYesNoCancel

public static final int WarningYesNoCancel

Yes

public static final int Yes

Constructor Detail

KMessageBox

protected KMessageBox(Class dummy)

KMessageBox

public KMessageBox()

Method Detail

about

public static void about(QWidget parent, String text, String caption, int options)
Display an "About" dialog.

Parameters: parent If parent is 0, then the message box becomes an application-global modal dialog box. If parent is a widget, the message box becomes modal relative to parent. text Message string. caption Message box title. The application name is added to the title. The default title is i18n("About \"). options see OptionsType Your program wants to show some general information about the application like the authors's names and email addresses. The default button is "&OK". NOTE: The ok button will always have the i18n'ed text '&OK'.

UNKNOWN: Display an "About" dialog.

about

public static void about(QWidget parent, String text, String caption)

about

public static void about(QWidget parent, String text)

createKMessageBox

public static int createKMessageBox(KDialogBase dialog, int icon, String text, String[] strlist, String ask, boolean[] checkboxReturn, int options, String details)
Create content and layout of a standard dialog

Parameters: dialog The parent dialog base icon Which predefined icon the message box shall show. text Message string. strlist List of strings to be written in the listbox. If the list is empty, it doesn't show any listbox ask The text of the checkbox. If empty none will be shown. checkboxReturn The result of the checkbox. If it's initially true then the checkbox will be checked by default. options see OptionsType details Detailed message string.

Returns: A KDialogBase button code, not a KMessageBox button code, based on the buttonmask given to the constructor of the dialog (ie. will return KDialogBase.Yes [256] instead of KMessageBox.Yes [3]). Will return KMessageBox.Cancel if the message box is queued for display instead of exec()ed immediately or if the option NoExec is set.

UNKNOWN: The dialog that is passed in is deleted by this function. Do not delete it yourself. Create content and layout of a standard dialog

createKMessageBox

public static int createKMessageBox(KDialogBase dialog, int icon, String text, String[] strlist, String ask, boolean[] checkboxReturn, int options)

createKMessageBox

public static int createKMessageBox(KDialogBase dialog, QPixmap icon, String text, String[] strlist, String ask, boolean[] checkboxReturn, int options, String details, int notifyType)
Create content and layout of a standard dialog

Parameters: dialog The parent dialog base icon A QPixmap containing the icon to be displayed in the dialog next to the text. text Message string. strlist List of strings to be written in the listbox. If the list is empty, it doesn't show any listbox ask The text of the checkbox. If empty none will be shown. checkboxReturn The result of the checkbox. If it's initially true then the checkbox will be checked by default. options see OptionsType details Detailed message string. notifyType The type of notification to send when this message is presentend.

Returns: A KDialogBase button code, not a KMessageBox button code, based on the buttonmask given to the constructor of the dialog (ie. will return KDialogBase.Yes [256] instead of KMessageBox.Yes [3]). Will return KMessageBox.Cancel if the message box is queued for display instead of exec()ed immediately or if the option NoExec is set.

UNKNOWN: The dialog that is passed in is deleted by this function. Do not delete it yourself. Create content and layout of a standard dialog

createKMessageBox

public static int createKMessageBox(KDialogBase dialog, QPixmap icon, String text, String[] strlist, String ask, boolean[] checkboxReturn, int options, String details)

createKMessageBox

public static int createKMessageBox(KDialogBase dialog, QPixmap icon, String text, String[] strlist, String ask, boolean[] checkboxReturn, int options)

detailedError

public static void detailedError(QWidget parent, String text, String details, String caption, int options)
Displays an "Error" dialog with a "Details >>" button.

Parameters: parent If parent is 0, then the message box becomes an application-global modal dialog box. If parent is a widget, the message box becomes modal relative to parent. text Message string. details Detailed message string. caption Message box title. The application name is added to the title. The default title is i18n("Error"). options see OptionsType Your program messed up and now it's time to inform the user. To be used for important things like "Sorry, I deleted your hard disk." The details message can conatin additional information about the problem and can be shown on request to advanced/interested users. 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'.

UNKNOWN: Displays an "Error" dialog with a "Details >>" button.

detailedError

public static void detailedError(QWidget parent, String text, String details, String caption)

detailedError

public static void detailedError(QWidget parent, String text, String details)

detailedErrorWId

public static void detailedErrorWId(long parent_id, String text, String details, String caption, int options)
This function accepts the window id of the parent window, instead of QWidget. It should be used only when necessary.

UNKNOWN: This function accepts the window id of the parent window, instead of QWidget .

detailedErrorWId

public static void detailedErrorWId(long parent_id, String text, String details, String caption)

detailedErrorWId

public static void detailedErrorWId(long parent_id, String text, String details)

detailedSorry

public static void detailedSorry(QWidget parent, String text, String details, String caption, int options)
Displays a "Sorry" dialog with a "Details >>" button.

Parameters: parent If parent is 0, then the message box becomes an application-global modal dialog box. If parent is a widget, the message box becomes modal relative to parent. text Message string. details Detailed message string. caption Message box title. The application name is added to the title. The default title is i18n("Sorry"). options see OptionsType Either your program messed up and asks for understanding or your user did something stupid. To be used for small problems like "Sorry, I can't find the file you specified." And then details can contain something like "foobar.txt was not found in any of the following directories: /usr/bin,/usr/local/bin,/usr/sbin" The default button is "&OK". Pressing "Esc" selects the OK-button. NOTE: The ok button will always have the i18n'ed text '&OK'.

UNKNOWN: Displays a "Sorry" dialog with a "Details >>" button.

detailedSorry

public static void detailedSorry(QWidget parent, String text, String details, String caption)

detailedSorry

public static void detailedSorry(QWidget parent, String text, String details)

detailedSorryWId

public static void detailedSorryWId(long parent_id, String text, String details, String caption, int options)
This function accepts the window id of the parent window, instead of QWidget. It should be used only when necessary.

UNKNOWN: This function accepts the window id of the parent window, instead of QWidget .

detailedSorryWId

public static void detailedSorryWId(long parent_id, String text, String details, String caption)

detailedSorryWId

public static void detailedSorryWId(long parent_id, String text, String details)

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

enableAllMessages

public static void enableAllMessages()
Enable all messages which have been turned off with the dontShowAgainName feature.

UNKNOWN: Enable all messages which have been turned off with the dontShowAgainName feature.

enableMessage

public static void enableMessage(String dontShowAgainName)
Re-enable a specific dontShowAgainName messages that had previously been turned off.

See Also: KMessageBox KMessageBox

UNKNOWN: Re-enable a specific dontShowAgainName messages that had previously been turned off.

error

public static void error(QWidget parent, String text, String caption, int options)
Display an "Error" dialog.

Parameters: parent If parent is 0, then the message box becomes an application-global modal dialog box. If parent is a widget, the message box becomes modal relative to parent. text Message string. caption Message box title. The application name is added to the title. The default title is i18n("Error"). options see OptionsType Your program messed up and now it's time to inform the user. To be used for important things like "Sorry, I deleted your hard disk." 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'.

UNKNOWN: Display an "Error" dialog.

error

public static void error(QWidget parent, String text, String caption)

error

public static void error(QWidget parent, String text)

errorList

public static void errorList(QWidget parent, String text, String[] strlist, String caption, int options)
Display an "Error" dialog with a listbox.

Parameters: parent If parent is 0, then the message box becomes an application-global modal dialog box. If parent is a widget, the message box becomes modal relative to parent. text Message string. strlist List of strings to be written in the listbox. If the list is empty, it doesn't show any listbox, working as error(). caption Message box title. The application name is added to the title. The default title is i18n("Error"). options see OptionsType Your program messed up and now it's time to inform the user. To be used for important things like "Sorry, I deleted your hard disk." 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'.

UNKNOWN: Display an "Error" dialog with a listbox.

errorList

public static void errorList(QWidget parent, String text, String[] strlist, String caption)

errorList

public static void errorList(QWidget parent, String text, String[] strlist)

errorListWId

public static void errorListWId(long parent_id, String text, String[] strlist, String caption, int options)
This function accepts the window id of the parent window, instead of QWidget. It should be used only when necessary.

UNKNOWN: This function accepts the window id of the parent window, instead of QWidget .

errorListWId

public static void errorListWId(long parent_id, String text, String[] strlist, String caption)

errorListWId

public static void errorListWId(long parent_id, String text, String[] strlist)

errorWId

public static void errorWId(long parent_id, String text, String caption, int options)
This function accepts the window id of the parent window, instead of QWidget. It should be used only when necessary.

UNKNOWN: This function accepts the window id of the parent window, instead of QWidget .

errorWId

public static void errorWId(long parent_id, String text, String caption)

errorWId

public static void errorWId(long parent_id, String text)

finalize

protected void finalize()
Deletes the wrapped C++ instance

information

public static void information(QWidget parent, String text, String caption, String dontShowAgainName, int options)
Display an "Information" dialog.

Parameters: parent If parent is 0, then the message box becomes an application-global modal dialog box. If parent is a widget, the message box becomes modal relative to parent. text Message string. caption Message box title. The application name is added to the title. The default title is i18n("Information"). dontShowAgainName If provided, a checkbox is added with which further notifications can be turned off. The string is used to lookup and store the setting in the applications config file. The setting is stored in the "Notification Messages" group. options see OptionsType Your program wants to tell the user something. To be used for things like: "Your bookmarks have been rearranged." The default button is "&OK". Pressing "Esc" selects the OK-button. NOTE: The OK button will always have the i18n'ed text '&OK'.

UNKNOWN: Display an "Information" dialog.

information

public static void information(QWidget parent, String text, String caption, String dontShowAgainName)

information

public static void information(QWidget parent, String text, String caption)

information

public static void information(QWidget parent, String text)

informationList

public static void informationList(QWidget parent, String text, String[] strlist, String caption, String dontShowAgainName, int options)
Display an "Information" dialog with a listbox.

Parameters: parent If parent is 0, then the message box becomes an application-global modal dialog box. If parent is a widget, the message box becomes modal relative to parent. text Message string. strlist List of strings to be written in the listbox. If the list is empty, it doesn't show any listbox, working as information. caption Message box title. The application name is added to the title. The default title is i18n("Information"). dontShowAgainName If provided, a checkbox is added with which further notifications can be turned off. The string is used to lookup and store the setting in the applications config file. The setting is stored in the "Notification Messages" group. options see OptionsType Your program wants to tell the user something. To be used for things like: "The following bookmarks have been rearranged:" The default button is "&OK". Pressing "Esc" selects the OK-button. NOTE: The OK button will always have the i18n'ed text '&OK'.

UNKNOWN: Display an "Information" dialog with a listbox.

informationList

public static void informationList(QWidget parent, String text, String[] strlist, String caption, String dontShowAgainName)

informationList

public static void informationList(QWidget parent, String text, String[] strlist, String caption)

informationList

public static void informationList(QWidget parent, String text, String[] strlist)

informationListWId

public static void informationListWId(long parent_id, String text, String[] strlist, String caption, String dontShowAgainName, int options)
This function accepts the window id of the parent window, instead of QWidget. It should be used only when necessary.

UNKNOWN: This function accepts the window id of the parent window, instead of QWidget .

informationListWId

public static void informationListWId(long parent_id, String text, String[] strlist, String caption, String dontShowAgainName)

informationListWId

public static void informationListWId(long parent_id, String text, String[] strlist, String caption)

informationListWId

public static void informationListWId(long parent_id, String text, String[] strlist)

informationWId

public static void informationWId(long parent_id, String text, String caption, String dontShowAgainName, int options)
This function accepts the window id of the parent window, instead of QWidget. It should be used only when necessary.

UNKNOWN: This function accepts the window id of the parent window, instead of QWidget .

informationWId

public static void informationWId(long parent_id, String text, String caption, String dontShowAgainName)

informationWId

public static void informationWId(long parent_id, String text, String caption)

informationWId

public static void informationWId(long parent_id, String text)

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

messageBox

public static int messageBox(QWidget parent, int type, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontShowAskAgainName, int options)
Alternate method to show a messagebox:

Parameters: parent If parent is 0, then the message box becomes an application-global modal dialog box. If parent is a widget, the message box becomes modal relative to parent. type type of message box: QuestionYesNo, WarningYesNo, WarningContinueCancel... text Message string. caption Message box title. buttonYes The text for the first button. The default is i18n("&Yes"). buttonNo The text for the second button. The default is i18n("&No"). dontShowAskAgainName If provided, a checkbox is added with which further questions/informations can be turned off. If turned off all questions will be automatically answered with the last answer (either Yes or No), if the message box needs an answer. The string is used to lookup and store the setting in the applications config file. options see OptionsType Note: for ContinueCancel, buttonYes is the continue button and buttonNo is unused. and for Information, none is used.

Returns: a button code, as defined in KMessageBox.

UNKNOWN: Alternate method to show a messagebox:

messageBox

public static int messageBox(QWidget parent, int type, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontShowAskAgainName)

messageBox

public static int messageBox(QWidget parent, int type, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, int options)
Alternate method to show a messagebox:

Parameters: parent If parent is 0, then the message box becomes an application-global modal dialog box. If parent is a widget, the message box becomes modal relative to parent. type type of message box: QuestionYesNo, WarningYesNo, WarningContinueCancel... text Message string. caption Message box title. buttonYes The text for the first button. The default is i18n("&Yes"). buttonNo The text for the second button. The default is i18n("&No"). options see OptionsType Note: for ContinueCancel, buttonYes is the continue button and buttonNo is unused. and for Information, none is used.

Returns: a button code, as defined in KMessageBox.

UNKNOWN: Alternate method to show a messagebox:

messageBox

public static int messageBox(QWidget parent, int type, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo)

messageBox

public static int messageBox(QWidget parent, int type, String text, String caption, KGuiItem buttonYes)

messageBox

public static int messageBox(QWidget parent, int type, String text, String caption)

messageBox

public static int messageBox(QWidget parent, int type, String text)

messageBoxWId

public static int messageBoxWId(long parent_id, int type, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontShowAskAgainName, int options)
This function accepts the window id of the parent window, instead of QWidget. It should be used only when necessary.

UNKNOWN: This function accepts the window id of the parent window, instead of QWidget .

messageBoxWId

public static int messageBoxWId(long parent_id, int type, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontShowAskAgainName)

messageBoxWId

public static int messageBoxWId(long parent_id, int type, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo)

messageBoxWId

public static int messageBoxWId(long parent_id, int type, String text, String caption, KGuiItem buttonYes)

messageBoxWId

public static int messageBoxWId(long parent_id, int type, String text, String caption)

messageBoxWId

public static int messageBoxWId(long parent_id, int type, String text)

questionYesNo

public static int questionYesNo(QWidget parent, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
Display a simple "question" dialog.

Parameters: parent If parent is 0, then the message box becomes an application-global modal dialog box. If parent is a widget, the message box becomes modal relative to parent. text Message string. caption Message box title. The application name is added to the title. The default title is i18n("Question"). buttonYes The text for the first button. The default is i18n("&Yes"). buttonNo The text for the second button. The default is i18n("&No"). dontAskAgainName If provided, a checkbox is added with which further confirmation can be turned off. The string is used to lookup and store the setting in the applications config file. The setting is stored in the "Notification Messages" group. If dontAskAgainName starts with a ':' then the setting is stored in the global config file. options see OptionsType To be used for questions like "Do you have a printer?" The default button is "Yes". Pressing "Esc" selects "No".

Returns: 'Yes' is returned if the Yes-button is pressed. 'No' is returned if the No-button is pressed.

UNKNOWN: Display a simple "question" dialog.

questionYesNo

public static int questionYesNo(QWidget parent, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)

questionYesNo

public static int questionYesNo(QWidget parent, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo)

questionYesNo

public static int questionYesNo(QWidget parent, String text, String caption, KGuiItem buttonYes)

questionYesNo

public static int questionYesNo(QWidget parent, String text, String caption)

questionYesNo

public static int questionYesNo(QWidget parent, String text)

questionYesNoCancel

public static int questionYesNoCancel(QWidget parent, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
Display a simple "question" dialog.

Parameters: parent If parent is 0, then the message box becomes an application-global modal dialog box. If parent is a widget, the message box becomes modal relative to parent. text Message string. caption Message box title. The application name is added to the title. The default title is i18n("Question"). buttonYes The text for the first button. The default is i18n("&Yes"). buttonNo The text for the second button. The default is i18n("&No"). dontAskAgainName If provided, a checkbox is added with which further confirmation can be turned off. The string is used to lookup and store the setting in the applications config file. The setting is stored in the "Notification Messages" group. If dontAskAgainName starts with a ':' then the setting is stored in the global config file. options see OptionsType To be used for questions like "Do you want to discard the message or save it for later?", The default button is "Yes". Pressing "Esc" selects "Cancel". NOTE: The cancel button will always have the i18n'ed text '&Cancel'.

Returns: 'Yes' is returned if the Yes-button is pressed. 'No' is returned if the No-button is pressed.

UNKNOWN: Display a simple "question" dialog.

questionYesNoCancel

public static int questionYesNoCancel(QWidget parent, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)

questionYesNoCancel

public static int questionYesNoCancel(QWidget parent, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo)

questionYesNoCancel

public static int questionYesNoCancel(QWidget parent, String text, String caption, KGuiItem buttonYes)

questionYesNoCancel

public static int questionYesNoCancel(QWidget parent, String text, String caption)

questionYesNoCancel

public static int questionYesNoCancel(QWidget parent, String text)

questionYesNoCancelWId

public static int questionYesNoCancelWId(long parent_id, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
This function accepts the window id of the parent window, instead of QWidget. It should be used only when necessary.

UNKNOWN: This function accepts the window id of the parent window, instead of QWidget .

questionYesNoCancelWId

public static int questionYesNoCancelWId(long parent_id, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)

questionYesNoCancelWId

public static int questionYesNoCancelWId(long parent_id, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo)

questionYesNoCancelWId

public static int questionYesNoCancelWId(long parent_id, String text, String caption, KGuiItem buttonYes)

questionYesNoCancelWId

public static int questionYesNoCancelWId(long parent_id, String text, String caption)

questionYesNoCancelWId

public static int questionYesNoCancelWId(long parent_id, String text)

questionYesNoList

public static int questionYesNoList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
Display a "question" dialog with a listbox to show information to the user

Parameters: parent If parent is 0, then the message box becomes an application-global modal dialog box. If parent is a widget, the message box becomes modal relative to parent. text Message string. strlist List of strings to be written in the listbox. If the list is empty, it doesn't show any listbox, working as questionYesNo. caption Message box title. The application name is added to the title. The default title is i18n("Question"). buttonYes The text for the first button. The default is i18n("&Yes"). buttonNo The text for the second button. The default is i18n("&No"). dontAskAgainName If provided, a checkbox is added with which further confirmation can be turned off. The string is used to lookup and store the setting in the applications config file. The setting is stored in the "Notification Messages" group. If dontAskAgainName starts with a ':' then the setting is stored in the global config file. options see OptionsType To be used for questions like "Do you really want to delete these files?" And show the user exactly which files are going to be deleted in case he presses "Yes" The default button is "Yes". Pressing "Esc" selects "No".

Returns: 'Yes' is returned if the Yes-button is pressed. 'No' is returned if the No-button is pressed.

UNKNOWN: Display a "question" dialog with a listbox to show information to the user

questionYesNoList

public static int questionYesNoList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)

questionYesNoList

public static int questionYesNoList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo)

questionYesNoList

public static int questionYesNoList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonYes)

questionYesNoList

public static int questionYesNoList(QWidget parent, String text, String[] strlist, String caption)

questionYesNoList

public static int questionYesNoList(QWidget parent, String text, String[] strlist)

questionYesNoListWId

public static int questionYesNoListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
This function accepts the window id of the parent window, instead of QWidget. It should be used only when necessary.

UNKNOWN: This function accepts the window id of the parent window, instead of QWidget .

questionYesNoListWId

public static int questionYesNoListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)

questionYesNoListWId

public static int questionYesNoListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo)

questionYesNoListWId

public static int questionYesNoListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonYes)

questionYesNoListWId

public static int questionYesNoListWId(long parent_id, String text, String[] strlist, String caption)

questionYesNoListWId

public static int questionYesNoListWId(long parent_id, String text, String[] strlist)

questionYesNoWId

public static int questionYesNoWId(long parent_id, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
This function accepts the window id of the parent window, instead of QWidget. It should be used only when necessary.

UNKNOWN: This function accepts the window id of the parent window, instead of QWidget .

questionYesNoWId

public static int questionYesNoWId(long parent_id, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)

questionYesNoWId

public static int questionYesNoWId(long parent_id, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo)

questionYesNoWId

public static int questionYesNoWId(long parent_id, String text, String caption, KGuiItem buttonYes)

questionYesNoWId

public static int questionYesNoWId(long parent_id, String text, String caption)

questionYesNoWId

public static int questionYesNoWId(long parent_id, String text)

queuedDetailedError

public static void queuedDetailedError(QWidget parent, String text, String details, String caption)
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.

UNKNOWN: Like detailedError

queuedDetailedError

public static void queuedDetailedError(QWidget parent, String text, String details)

queuedDetailedErrorWId

public static void queuedDetailedErrorWId(long parent_id, String text, String details, String caption)
This function accepts the window id of the parent window, instead of QWidget. It should be used only when necessary.

UNKNOWN: This function accepts the window id of the parent window, instead of QWidget .

queuedDetailedErrorWId

public static void queuedDetailedErrorWId(long parent_id, String text, String details)

queuedMessageBox

public static void queuedMessageBox(QWidget parent, int type, String text, String caption, int options)
Like messageBox Only for message boxes of type Information, Sorry or Error. 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.

UNKNOWN: Like messageBox

queuedMessageBox

public static void queuedMessageBox(QWidget parent, int type, String text, String caption)

UNKNOWN: This is an overloaded member function, provided for convenience. It behaves essentially like the above function. @overload

queuedMessageBox

public static void queuedMessageBox(QWidget parent, int type, String text)

queuedMessageBoxWId

public static void queuedMessageBoxWId(long parent_id, int type, String text, String caption, int options)
This function accepts the window id of the parent window, instead of QWidget. It should be used only when necessary.

UNKNOWN: This function accepts the window id of the parent window, instead of QWidget .

queuedMessageBoxWId

public static void queuedMessageBoxWId(long parent_id, int type, String text, String caption)
This function accepts the window id of the parent window, instead of QWidget. It should be used only when necessary.

UNKNOWN: This function accepts the window id of the parent window, instead of QWidget .

queuedMessageBoxWId

public static void queuedMessageBoxWId(long parent_id, int type, String text)

saveDontShowAgainContinue

public static void saveDontShowAgainContinue(String dontShowAgainName)
Save the fact that the continue/cancel message box should not be shown again.

Parameters: dontShowAgainName the name that identify the message box. If empty, this method does nothing.

UNKNOWN: Save the fact that the continue/cancel message box should not be shown again.

saveDontShowAgainYesNo

public static void saveDontShowAgainYesNo(String dontShowAgainName, int result)
Save the fact that the yes/no message box should not be shown again.

Parameters: dontShowAgainName the name that identify the message box. If empty, this method does nothing. result the value (Yes or No) that should be used as the result for the message box.

UNKNOWN: Save the fact that the yes/no message box should not be shown again.

setDontShowAskAgainConfig

public static void setDontShowAskAgainConfig(KConfig cfg)
Use cfg for all settings related to the dontShowAgainName feature. If cfg is 0 (default) KGlobal.config() will be used.

UNKNOWN: Use cfg for all settings related to the dontShowAgainName feature.

shouldBeShownContinue

public static boolean shouldBeShownContinue(String dontShowAgainName)

Parameters: dontShowAgainName the name that identify the message box. If empty, true is always returned.

Returns: true if the corresponding continue/cancel message box should be shown.

UNKNOWN:

shouldBeShownYesNo

public static boolean shouldBeShownYesNo(String dontShowAgainName, int result)

Parameters: dontShowAgainName the name that identify the message box. If empty, true is always returned. result is set to the result (Yes or No) that was chosen the last time the message box was shown. Only meaningful, if the message box should not be shown.

Returns: true if the corresponding yes/no message box should be shown.

UNKNOWN:

sorry

public static void sorry(QWidget parent, String text, String caption, int options)
Display an "Sorry" dialog.

Parameters: parent If parent is 0, then the message box becomes an application-global modal dialog box. If parent is a widget, the message box becomes modal relative to parent. text Message string. caption Message box title. The application name is added to the title. The default title is i18n("Sorry"). options see OptionsType Either your program messed up and asks for understanding or your user did something stupid. 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'.

UNKNOWN: Display an "Sorry" dialog.

sorry

public static void sorry(QWidget parent, String text, String caption)

sorry

public static void sorry(QWidget parent, String text)

sorryWId

public static void sorryWId(long parent_id, String text, String caption, int options)
This function accepts the window id of the parent window, instead of QWidget. It should be used only when necessary.

UNKNOWN: This function accepts the window id of the parent window, instead of QWidget .

sorryWId

public static void sorryWId(long parent_id, String text, String caption)

sorryWId

public static void sorryWId(long parent_id, String text)

warningContinueCancel

public static int warningContinueCancel(QWidget parent, String text, String caption, KGuiItem buttonContinue, String dontAskAgainName, int options)
Display a "warning" dialog.

Parameters: parent If parent is 0, then the message box becomes an application-global modal dialog box. If parent is a widget, the message box becomes modal relative to parent. text Message string. caption Message box title. The application name is added to the title. The default title is i18n("Warning"). buttonContinue The text for the first button. dontAskAgainName If provided, a checkbox is added with which further confirmation can be turned off. The string is used to lookup and store the setting in the applications config file. The setting is stored in the "Notification Messages" group. If dontAskAgainName starts with a ':' then the setting is stored in the global config file. options see OptionsType The second button always has the text "Cancel". To be used for questions like "You are about to Print. Are you sure?" the continueButton should then be labeled "Print". The default button is buttonContinue. Pressing "Esc" selects "Cancel".

Returns: Continue is returned if the Continue-button is pressed. Cancel is returned if the Cancel-button is pressed.

UNKNOWN: Display a "warning" dialog.

warningContinueCancel

public static int warningContinueCancel(QWidget parent, String text, String caption, KGuiItem buttonContinue, String dontAskAgainName)

warningContinueCancel

public static int warningContinueCancel(QWidget parent, String text, String caption, KGuiItem buttonContinue)

warningContinueCancel

public static int warningContinueCancel(QWidget parent, String text, String caption)

warningContinueCancel

public static int warningContinueCancel(QWidget parent, String text)

warningContinueCancelList

public static int warningContinueCancelList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonContinue, String dontAskAgainName, int options)
Display a "warning" dialog with a listbox to show information to the user.

Parameters: parent If parent is 0, then the message box becomes an application-global modal dialog box. If parent is a widget, the message box becomes modal relative to parent. text Message string. strlist List of strings to be written in the listbox. If the list is empty, it doesn't show any listbox, working as warningContinueCancel. caption Message box title. The application name is added to the title. The default title is i18n("Warning"). buttonContinue The text for the first button. dontAskAgainName If provided, a checkbox is added with which further confirmation can be turned off. The string is used to lookup and store the setting in the applications config file. The setting is stored in the "Notification Messages" group. If dontAskAgainName starts with a ':' then the setting is stored in the global config file. options see OptionsType The second button always has the text "Cancel". To be used for questions like "You are about to Print. Are you sure?" the continueButton should then be labeled "Print". The default button is buttonContinue. Pressing "Esc" selects "Cancel".

Returns: Continue is returned if the Continue-button is pressed. Cancel is returned if the Cancel-button is pressed.

UNKNOWN: Display a "warning" dialog with a listbox to show information to the user.

warningContinueCancelList

public static int warningContinueCancelList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonContinue, String dontAskAgainName)

warningContinueCancelList

public static int warningContinueCancelList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonContinue)

warningContinueCancelList

public static int warningContinueCancelList(QWidget parent, String text, String[] strlist, String caption)

warningContinueCancelList

public static int warningContinueCancelList(QWidget parent, String text, String[] strlist)

warningContinueCancelListWId

public static int warningContinueCancelListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonContinue, String dontAskAgainName, int options)
This function accepts the window id of the parent window, instead of QWidget. It should be used only when necessary.

UNKNOWN: This function accepts the window id of the parent window, instead of QWidget .

warningContinueCancelListWId

public static int warningContinueCancelListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonContinue, String dontAskAgainName)

warningContinueCancelListWId

public static int warningContinueCancelListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonContinue)

warningContinueCancelListWId

public static int warningContinueCancelListWId(long parent_id, String text, String[] strlist, String caption)

warningContinueCancelListWId

public static int warningContinueCancelListWId(long parent_id, String text, String[] strlist)

warningContinueCancelWId

public static int warningContinueCancelWId(long parent_id, String text, String caption, KGuiItem buttonContinue, String dontAskAgainName, int options)
This function accepts the window id of the parent window, instead of QWidget. It should be used only when necessary.

UNKNOWN: This function accepts the window id of the parent window, instead of QWidget .

warningContinueCancelWId

public static int warningContinueCancelWId(long parent_id, String text, String caption, KGuiItem buttonContinue, String dontAskAgainName)

warningContinueCancelWId

public static int warningContinueCancelWId(long parent_id, String text, String caption, KGuiItem buttonContinue)

warningContinueCancelWId

public static int warningContinueCancelWId(long parent_id, String text, String caption)

warningContinueCancelWId

public static int warningContinueCancelWId(long parent_id, String text)

warningYesNo

public static int warningYesNo(QWidget parent, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
Display a "warning" dialog.

Parameters: parent If parent is 0, then the message box becomes an application-global modal dialog box. If parent is a widget, the message box becomes modal relative to parent. text Message string. caption Message box title. The application name is added to the title. The default title is i18n("Warning"). buttonYes The text for the first button. The default is i18n("&Yes"). buttonNo The text for the second button. The default is i18n("&No"). dontAskAgainName If provided, a checkbox is added with which further confirmation can be turned off. The string is used to lookup and store the setting in the applications config file. The setting is stored in the "Notification Messages" group. If dontAskAgainName starts with a ':' then the setting is stored in the global config file. options see OptionsType To be used for questions "Shall I update your configuration?" The text should explain the implication of both options. The default button is "No". Pressing "Esc" selects "No".

Returns: Yes is returned if the Yes-button is pressed. No is returned if the No-button is pressed.

UNKNOWN: Display a "warning" dialog.

warningYesNo

public static int warningYesNo(QWidget parent, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)

warningYesNo

public static int warningYesNo(QWidget parent, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo)

warningYesNo

public static int warningYesNo(QWidget parent, String text, String caption, KGuiItem buttonYes)

warningYesNo

public static int warningYesNo(QWidget parent, String text, String caption)

warningYesNo

public static int warningYesNo(QWidget parent, String text)

warningYesNoCancel

public static int warningYesNoCancel(QWidget parent, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
Display a Yes/No/Cancel "warning" dialog.

Parameters: parent If parent is 0, then the message box becomes an application-global modal dialog box. If parent is a widget, the message box becomes modal relative to parent. text Message string. caption Message box title. The application name is added to the title. The default title is i18n("Warning"). buttonYes The text for the first button. The default is i18n("&Yes"). buttonNo The text for the second button. The default is i18n("&No"). dontAskAgainName If provided, a checkbox is added with which further questions can be turned off. If turned off all questions will be automatically answered with the last answer (either Yes or No). The string is used to lookup and store the setting in the applications config file. The setting is stored in the "Notification Messages" group. If dontAskAgainName starts with a ':' then the setting is stored in the global config file. options see OptionsType To be used for questions "Do you want to save your changes?" The text should explain the implication of choosing 'No'. The default button is "Yes". Pressing "Esc" selects "Cancel" NOTE: The cancel button will always have the i18n'ed text '&Cancel'.

Returns: Yes is returned if the Yes-button is pressed. No is returned if the No-button is pressed. Cancel is retunred if the Cancel- button is pressed.

UNKNOWN: Display a Yes/No/Cancel "warning" dialog.

warningYesNoCancel

public static int warningYesNoCancel(QWidget parent, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)

warningYesNoCancel

public static int warningYesNoCancel(QWidget parent, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo)

warningYesNoCancel

public static int warningYesNoCancel(QWidget parent, String text, String caption, KGuiItem buttonYes)

warningYesNoCancel

public static int warningYesNoCancel(QWidget parent, String text, String caption)

warningYesNoCancel

public static int warningYesNoCancel(QWidget parent, String text)

warningYesNoCancelList

public static int warningYesNoCancelList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
Display a Yes/No/Cancel "warning" dialog with a listbox to show information to the user.

Parameters: parent If parent is 0, then the message box becomes an application-global modal dialog box. If parent is a widget, the message box becomes modal relative to parent. text Message string. strlist List of strings to be written in the listbox. If the list is empty, it doesn't show any listbox, working as warningYesNoCancel. caption Message box title. The application name is added to the title. The default title is i18n("Warning"). buttonYes The text for the first button. The default is i18n("&Yes"). buttonNo The text for the second button. The default is i18n("&No"). dontAskAgainName If provided, a checkbox is added with which further questions can be turned off. If turned off all questions will be automatically answered with the last answer (either Yes or No). The string is used to lookup and store the setting in the applications config file. The setting is stored in the "Notification Messages" group. If dontAskAgainName starts with a ':' then the setting is stored in the global config file. options see OptionsType To be used for questions "Do you want to save your changes?" The text should explain the implication of choosing 'No'. The default button is "Yes". Pressing "Esc" selects "Cancel" NOTE: The cancel button will always have the i18n'ed text '&Cancel'.

Returns: Yes is returned if the Yes-button is pressed. No is returned if the No-button is pressed. Cancel is retunred if the Cancel- button is pressed.

UNKNOWN: Display a Yes/No/Cancel "warning" dialog with a listbox to show information to the user.

warningYesNoCancelList

public static int warningYesNoCancelList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)

warningYesNoCancelList

public static int warningYesNoCancelList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo)

warningYesNoCancelList

public static int warningYesNoCancelList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonYes)

warningYesNoCancelList

public static int warningYesNoCancelList(QWidget parent, String text, String[] strlist, String caption)

warningYesNoCancelList

public static int warningYesNoCancelList(QWidget parent, String text, String[] strlist)

warningYesNoCancelListWId

public static int warningYesNoCancelListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
This function accepts the window id of the parent window, instead of QWidget. It should be used only when necessary.

UNKNOWN: This function accepts the window id of the parent window, instead of QWidget .

warningYesNoCancelListWId

public static int warningYesNoCancelListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)

warningYesNoCancelListWId

public static int warningYesNoCancelListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo)

warningYesNoCancelListWId

public static int warningYesNoCancelListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonYes)

warningYesNoCancelListWId

public static int warningYesNoCancelListWId(long parent_id, String text, String[] strlist, String caption)

warningYesNoCancelListWId

public static int warningYesNoCancelListWId(long parent_id, String text, String[] strlist)

warningYesNoCancelWId

public static int warningYesNoCancelWId(long parent_id, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
This function accepts the window id of the parent window, instead of QWidget. It should be used only when necessary.

UNKNOWN: This function accepts the window id of the parent window, instead of QWidget .

warningYesNoCancelWId

public static int warningYesNoCancelWId(long parent_id, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)

warningYesNoCancelWId

public static int warningYesNoCancelWId(long parent_id, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo)

warningYesNoCancelWId

public static int warningYesNoCancelWId(long parent_id, String text, String caption, KGuiItem buttonYes)

warningYesNoCancelWId

public static int warningYesNoCancelWId(long parent_id, String text, String caption)

warningYesNoCancelWId

public static int warningYesNoCancelWId(long parent_id, String text)

warningYesNoList

public static int warningYesNoList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
Display a "warning" dialog with a listbox to show information to the user

Parameters: parent If parent is 0, then the message box becomes an application-global modal dialog box. If parent is a widget, the message box becomes modal relative to parent. text Message string. strlist List of strings to be written in the listbox. If the list is empty, it doesn't show any listbox, working as questionYesNo. caption Message box title. The application name is added to the title. The default title is i18n("Question"). buttonYes The text for the first button. The default is i18n("&Yes"). buttonNo The text for the second button. The default is i18n("&No"). dontAskAgainName If provided, a checkbox is added with which further confirmation can be turned off. The string is used to lookup and store the setting in the applications config file. The setting is stored in the "Notification Messages" group. If dontAskAgainName starts with a ':' then the setting is stored in the global config file. options see OptionsType To be used for questions like "Do you really want to delete these files?" And show the user exactly which files are going to be deleted in case he presses "Yes" The default button is "No". Pressing "Esc" selects "No".

Returns: 'Yes' is returned if the Yes-button is pressed. 'No' is returned if the No-button is pressed.

UNKNOWN: Display a "warning" dialog with a listbox to show information to the user

warningYesNoList

public static int warningYesNoList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)

warningYesNoList

public static int warningYesNoList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo)

warningYesNoList

public static int warningYesNoList(QWidget parent, String text, String[] strlist, String caption, KGuiItem buttonYes)

warningYesNoList

public static int warningYesNoList(QWidget parent, String text, String[] strlist, String caption)

warningYesNoList

public static int warningYesNoList(QWidget parent, String text, String[] strlist)

warningYesNoListWId

public static int warningYesNoListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
This function accepts the window id of the parent window, instead of QWidget. It should be used only when necessary.

UNKNOWN: This function accepts the window id of the parent window, instead of QWidget .

warningYesNoListWId

public static int warningYesNoListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)

warningYesNoListWId

public static int warningYesNoListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonYes, KGuiItem buttonNo)

warningYesNoListWId

public static int warningYesNoListWId(long parent_id, String text, String[] strlist, String caption, KGuiItem buttonYes)

warningYesNoListWId

public static int warningYesNoListWId(long parent_id, String text, String[] strlist, String caption)

warningYesNoListWId

public static int warningYesNoListWId(long parent_id, String text, String[] strlist)

warningYesNoWId

public static int warningYesNoWId(long parent_id, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName, int options)
This function accepts the window id of the parent window, instead of QWidget. It should be used only when necessary.

UNKNOWN: This function accepts the window id of the parent window, instead of QWidget .

warningYesNoWId

public static int warningYesNoWId(long parent_id, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo, String dontAskAgainName)

warningYesNoWId

public static int warningYesNoWId(long parent_id, String text, String caption, KGuiItem buttonYes, KGuiItem buttonNo)

warningYesNoWId

public static int warningYesNoWId(long parent_id, String text, String caption, KGuiItem buttonYes)

warningYesNoWId

public static int warningYesNoWId(long parent_id, String text, String caption)

warningYesNoWId

public static int warningYesNoWId(long parent_id, String text)