class KMsgBox

Enhanced MessageBox Dialog. More...

Definition#include <kmsgbox.h>
InheritsQDialog (qt)
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Members

Public Slots


Detailed Description

Enhanced MessageBox Dialog.

Provides a message box with icons and up to four configurable buttons and internationalized button text.

Several static functions that perform common message box functions are also provided for convenience.

enum IconStyle {INFORMATION = 1, EXCLAMATION = 2, STOP = 4, QUESTION = 8 }

Icon styles for message box customization. One of these should be passed in the type parameter of the message box constructor and static functions.

See also: KMsgBox

enum DefaultButton {DB_FIRST = 16, DB_SECOND = 32, DB_THIRD = 64, DB_FOURTH = 128}

Possible options for the default button. The first button is set to the default if no button is explicitly selected.

See also: KMsgBox

KMsgBox ( QWidget *parent = 0, const char *caption = 0, const char *message = 0, int type = INFORMATION, const char *b1text = 0, const char *b2text = 0, const char *b3text = 0, const char *b4text = 0)

The generic constructor for a KMsgBox widget.

Parameters:
parentParent widget
captionMessage box title
messageMessage string, center aligned by default. May contain newlines.
typeSelects message box options. This value is a constant from ::DefaultButton and/or a constant from ::IconStyle or-ed together.
b1text.. Button captions. Up to four may be specified, only specified buttons will be displayed.

See also: DefaultButton, IconStyle

~KMsgBox ()

Destructor.

int yesNo ( QWidget *parent = 0, const char *caption = 0, const char *message = 0, int type = 0, const char *yes = 0, const char *no = 0)
[static]

Displays a modal yes/no message box. The icon is set to a question mark.

Parameters:
parentthe parent widget
captionthe message box title
messagethe message in the dialog (eg the question the user is to be asked)
typeSelects message box options. This value is a constant from ::DefaultButton and/or a constant from ::IconStyle or-ed together.
yesthe text for the "Yes" button. defaults to "Yes", or its translation in the current user's locale if available.
nothe text for the "No" button. defaults to "No", or its translation in the current user's locale if available.

Returns: 1 if yes is clicked, 2 otherwise.

int yesNoCancel ( QWidget *parent = 0, const char *caption = 0, const char *message = 0, int type = 0, const char *yes = 0, const char *no = 0, const char *cancel = 0)
[static]

Displays a modal yes/no/cancel message box. The icon is set to a question mark.

Parameters:
parentthe parent widget
captionthe message box title
messagethe message in the dialog (eg the question the user is to be asked)
typeSelects message box options. This value is a constant from ::DefaultButton and/or a constant from ::IconStyle or-ed together.
yesthe text for the "Yes" button. defaults to "Yes", or its translation in the current user's locale if available.
nothe text for the "No" button. defaults to "No", or its translation in the current user's locale if available.
cancelthe text for the "Cancel" button. defaults to "Cancel", or its translation in the current user's locale if available.

Returns: 1, 2 or 3 if yes, no or cancel are clicked respectively.

int message ( QWidget *parent = 0, const char *caption = 0, const char *message = 0, int type = 0, const char *btext = 0)
[static]

Displays a modal message box with one button. An "Information" icon is displayed.

Parameters:
parentthe parent widget
captionthe message box title
messagethe message in the dialog (eg the question the user is to be asked)
typeSelects message box options. This value is a constant from ::DefaultButton and/or a constant from ::IconStyle or-ed together.
btextthe text for the "OK" button. defaults to "Ok", or its translation in the current user's locale if available.

Returns: 1 if the Ok button is clicked