|
|
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 |
Icon styles for message box customization. One of these should be passed in the type parameter of the message box constructor and static functions.
enum |
Possible options for the default button. The first button is set to the default if no button is explicitly selected.
|
The generic constructor for a KMsgBox widget.
Parameters:
parent | Parent widget |
caption | Message box title |
message | Message string, center aligned by default. May contain newlines. |
type | Selects 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
~ |
Destructor.
int |
[static]
Displays a modal yes/no message box. The icon is set to a question mark.
Parameters:
parent | the parent widget |
caption | the message box title |
message | the message in the dialog (eg the question the user is to be asked) |
type | Selects message box options. This value is a constant from ::DefaultButton and/or a constant from ::IconStyle or-ed together. |
yes | the text for the "Yes" button. defaults to "Yes", or its translation in the current user's locale if available. |
no | the 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 |
[static]
Displays a modal yes/no/cancel message box. The icon is set to a question mark.
Parameters:
parent | the parent widget |
caption | the message box title |
message | the message in the dialog (eg the question the user is to be asked) |
type | Selects message box options. This value is a constant from ::DefaultButton and/or a constant from ::IconStyle or-ed together. |
yes | the text for the "Yes" button. defaults to "Yes", or its translation in the current user's locale if available. |
no | the text for the "No" button. defaults to "No", or its translation in the current user's locale if available. |
cancel | the 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 |
[static]
Displays a modal message box with one button. An "Information" icon is displayed.
Parameters:
parent | the parent widget |
caption | the message box title |
message | the message in the dialog (eg the question the user is to be asked) |
type | Selects message box options. This value is a constant from ::DefaultButton and/or a constant from ::IconStyle or-ed together. |
btext | the 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