Relacs Widgets Library
0.9.8
|
#include <messagebox.h>
Public Types | |
enum | MessageType { Information, Warning, Error } |
Public Member Functions | |
MessageBox (const string &caption, const string &message, MessageType type=Warning, bool blocking=false, QWidget *parent=0) | |
~MessageBox (void) | |
void | exec (double timeout) |
Static Public Member Functions | |
static MessageBox * | information (const string &caption, const string &message, bool blocking=false, double timeout=0.0, QWidget *parent=0) |
static MessageBox * | information (const string &caption, const string &message, double timeout, QWidget *parent=0) |
static MessageBox * | information (const string &caption, const string &message, QWidget *parent=0) |
static MessageBox * | warning (const string &caption, const string &message, bool blocking=false, double timeout=0.0, QWidget *parent=0) |
static MessageBox * | warning (const string &caption, const string &message, double timeout, QWidget *parent=0) |
static MessageBox * | warning (const string &caption, const string &message, QWidget *parent=0) |
static MessageBox * | error (const string &caption, const string &message, bool blocking=false, double timeout=0.0, QWidget *parent=0) |
static MessageBox * | error (const string &caption, const string &message, double timeout, QWidget *parent=0) |
static MessageBox * | error (const string &caption, const string &message, QWidget *parent=0) |
Displays a message in a separate window.
The static functions information(), warning(), and error() create and execute a message window. They also allow to specify a time after which the message window is closed automatically.
enum MessageType |
MessageBox | ( | const string & | caption, |
const string & | message, | ||
MessageType | type = Warning , |
||
bool | blocking = false , |
||
QWidget * | parent = 0 |
||
) |
Creates a new window with caption in the title bar displaying the message message and an icon specifying the type of the message type. The window can be blocking or non-blocking according to blocking.
References MessageBox::Error, MessageBox::Information, and MessageBox::Warning.
Referenced by MessageBox::error(), MessageBox::information(), and MessageBox::warning().
~MessageBox | ( | void | ) |
Destroys a message box.
void exec | ( | double | timeout | ) |
Opens the message box window. If the message box is blocking, exec() blocks until the dialog is finished. Otherwise exec() returns immediately.
[in] | timeout | the dialog is automatically closed after timeout seconds |
Referenced by MessageBox::error(), MessageBox::information(), and MessageBox::warning().
|
static |
Creates and executes a message window with caption in the title bar displaying the message message. The message is of type information. Calling this function can be blocking or non-blocking according to blocking. In blocking mode the function returns after the user pressed the 'Ok' button. A time timeout seconds can be specified after which the window is closed automatically. This feature works only with a non-blocking message.
References MessageBox::exec(), MessageBox::Information, and MessageBox::MessageBox().
|
inlinestatic |
Creates and executes a message window with caption in the title bar displaying the message message. The message is of type information. After time timeout seconds the window is closed automatically. This function is non-blocking, i.e. it returns immediately.
|
inlinestatic |
Creates and executes a message window with caption in the title bar displaying the message message. The message is of type information. This function is blocking, i.e. it returns after the user pressed the 'Ok' button.
|
static |
Creates and executes a message window with caption in the title bar displaying the message message. The message is of type warning, which is an error which does not prevent the program from continuing. Calling this function can be blocking or non-blocking according to blocking. In blocking mode the function returns after the user pressed the 'Ok' button. A time timeout seconds can be specified after which the window is closed automatically. This feature works only with a non-blocking message.
References MessageBox::exec(), MessageBox::MessageBox(), and MessageBox::Warning.
|
inlinestatic |
Creates and executes a message window with caption in the title bar displaying the message message. The message is of type warning, which is an error which does not prevent the program from continuing. After time timeout seconds the window is closed automatically. This function is non-blocking, i.e. it returns immediately.
|
inlinestatic |
Creates and executes a message window with caption in the title bar displaying the message message. The message is of type warning, which is an error which does not prevent the program from continuing. This function is blocking, i.e. it returns after the user pressed the 'Ok' button.
|
static |
Creates and executes a message window with caption in the title bar displaying the message message. The message is of type error. Usually the program or action has to be terminated after displaying this message. Calling this function can be blocking or non-blocking according to blocking. In blocking mode the function returns after the user pressed the 'Ok' button. A time timeout seconds can be specified after which the window is closed automatically. This feature works only with a non-blocking message.
References MessageBox::Error, MessageBox::exec(), and MessageBox::MessageBox().
|
inlinestatic |
Creates and executes a message window with caption in the title bar displaying the message message. The message is of type error. Usually the program or action has to be terminated after displaying this message. After time timeout seconds the window is closed automatically. This function is non-blocking, i.e. it returns immediately.
|
inlinestatic |
Creates and executes a message window with caption in the title bar displaying the message message. The message is of type error. Usually the program or action has to be terminated after displaying this message. This function is blocking, i.e. it returns after the user pressed the 'Ok' button.