KMsgBox Class Reference

[kdeui Index] [kdeui Hierarchy] [Headers]


Enhanced MessageBox Dialog More...

#include <kmsgbox.h>

Inherits: QDialog (qt)

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 ) [public]

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::KMsgBox

enum DefaultButton ( DB_FIRST = 16, DB_SECOND = 32, DB_THIRD = 64, DB_FOURTH = 128) [public]

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

See Also:
KMsgBox::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) [public]

The generic constructor for a KMsgBox widget.

Parameters:
type Selects message box options. This value is a constant from DefaultButton and/or a constant from IconStyle or-ed together.
parent Parent widget
b1text.. Button captions. Up to four may be specified, only specified buttons will be displayed.
message Message string, center aligned by default. May contain newlines.
caption Message box title
See Also:
DefaultButton

~KMsgBox() [public]

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) [public static]

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

Parameters:
yes the text for the "Yes" button. defaults to "Yes", or its translation in the current user's locale if available.
type Selects message box options. This value is a constant from DefaultButton and/or a constant from IconStyle or-ed together.
parent the parent widget
no the text for the "No" button. defaults to "No", or its translation in the current user's locale if available.
message the message in the dialog (eg the question the user is to be asked)
caption the message box title
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) [public static]

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

Parameters:
yes the text for the "Yes" button. defaults to "Yes", or its translation in the current user's locale if available.
type Selects message box options. This value is a constant from DefaultButton and/or a constant from IconStyle or-ed together.
parent the parent widget
no the text for the "No" button. defaults to "No", or its translation in the current user's locale if available.
message the message in the dialog (eg the question the user is to be asked)
cancel the text for the "Cancel" button. defaults to "Cancel", or its translation in the current user's locale if available.
caption the message box title
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) [public static]

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

Parameters:
type Selects message box options. This value is a constant from DefaultButton and/or a constant from IconStyle or-ed together.
parent the parent widget
message the message in the dialog (eg the question the user is to be asked)
caption the message box title
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

  • Author: Alexander Sanda (alex@darkstar.ping.at)
  • Version: $Id: KMsgBox.html.in,v 1.1.1.1 2000/02/09 22:25:35 tasin Exp $
  • Documentation generated by tasin@cd1 on Die Nov 30 17:31:44 CET 1999
Kdoc