Message dialog box for SUIT-based application. More...
#include <SUIT_MessageBox.h>

Data Structures | |
| class | ButtonInfo |
Public Member Functions | |
| SUIT_MessageBox (QWidget *=0) | |
| Constructor. | |
| SUIT_MessageBox (Icon, const QString &, const QString &, StandardButtons buttons=NoButton, QWidget *=0, Qt::WindowFlags=Qt::Dialog|Qt::MSWindowsFixedSizeDialogHint) | |
| Constructor. | |
| ~SUIT_MessageBox () | |
| Destructor. | |
| QString | buttonText (StandardButton) const |
| Get the standard button text. | |
| void | setButtonText (StandardButton, const QString &) |
| Set the standard button text. | |
Static Public Member Functions | |
| static StandardButton | critical (QWidget *parent, const QString &title, const QString &text, StandardButtons buttons=Ok, StandardButton defaultButton=NoButton) |
| Show critical message box with specified standard buttons. | |
| static StandardButton | warning (QWidget *parent, const QString &title, const QString &text, StandardButtons buttons=Ok, StandardButton defaultButton=NoButton) |
| static StandardButton | information (QWidget *parent, const QString &title, const QString &text, StandardButtons buttons=Ok, StandardButton defaultButton=NoButton) |
| Show information message box with specified standard buttons. | |
| static StandardButton | question (QWidget *parent, const QString &title, const QString &text, StandardButtons buttons=Ok, StandardButton defaultButton=NoButton) |
| Show question message box with specified standard buttons. | |
| static int | critical (QWidget *parent, const QString &title, const QString &text, const QString &button) |
| Show critical message box with one custom button. | |
| static int | warning (QWidget *parent, const QString &title, const QString &text, const QString &button) |
| Show warning message box with one custom button. | |
| static int | information (QWidget *parent, const QString &title, const QString &text, const QString &button) |
| Show information message box with one custom button. | |
| static int | question (QWidget *parent, const QString &title, const QString &text, const QString &button) |
| Show question message box with one custom button. | |
| static int | critical (QWidget *parent, const QString &title, const QString &text, const QString &button1, const QString &button2, const int defaultButton=-1, const int escapeButton=-1) |
| Show critical message box with two custom buttons. | |
| static int | warning (QWidget *parent, const QString &title, const QString &text, const QString &button1, const QString &button2, const int defaultButton=-1, const int escapeButton=-1) |
| Show warning message box with two custom buttons. | |
| static int | information (QWidget *parent, const QString &title, const QString &text, const QString &button1, const QString &button2, const int defaultButton=-1, const int escapeButton=-1) |
| Show information message box with two custom buttons. | |
| static int | question (QWidget *parent, const QString &title, const QString &text, const QString &button1, const QString &button2, const int defaultButton=-1, const int escapeButton=-1) |
| Show question message box with two custom buttons. | |
| static int | critical (QWidget *parent, const QString &title, const QString &text, const QString &button1, const QString &button2, const QString &button3, const int defaultButton=-1, const int escapeButton=-1) |
| Show critical message box with three custom buttons. | |
| static int | warning (QWidget *parent, const QString &title, const QString &text, const QString &button1, const QString &button2, const QString &button3, const int defaultButton=-1, const int escapeButton=-1) |
| Show warning message box with three custom buttons. | |
| static int | information (QWidget *parent, const QString &title, const QString &text, const QString &button1, const QString &button2, const QString &button3, const int defaultButton=-1, const int escapeButton=-1) |
| Show information message box with three custom buttons. | |
| static int | question (QWidget *parent, const QString &title, const QString &text, const QString &button1, const QString &button2, const QString &button3, const int defaultButton=-1, const int escapeButton=-1) |
| Show question message box with three custom buttons. | |
| static int | critical (QWidget *parent, const QString &title, const QString &text, const QString &button1, const QString &button2, const QString &button3, const QString &button4, const int defaultButton=-1, const int escapeButton=-1) |
| Show critical message box with four custom buttons. | |
| static int | warning (QWidget *parent, const QString &title, const QString &text, const QString &button1, const QString &button2, const QString &button3, const QString &button4, const int defaultButton=-1, const int escapeButton=-1) |
| Show warning message box with four custom buttons. | |
| static int | information (QWidget *parent, const QString &title, const QString &text, const QString &button1, const QString &button2, const QString &button3, const QString &button4, const int defaultButton=-1, const int escapeButton=-1) |
| Show information message box with four custom buttons. | |
| static int | question (QWidget *parent, const QString &title, const QString &text, const QString &button1, const QString &button2, const QString &button3, const QString &button4, const int defaultButton=-1, const int escapeButton=-1) |
| Show question message box with four custom buttons. | |
| static int | critical (QWidget *parent, const QString &title, const QString &text, const int defaultButton, const int escapeButton, char *,...) |
| Show critical message box with arbitrary number of user-specified buttons. | |
| static int | warning (QWidget *parent, const QString &title, const QString &text, const int defaultButton, const int escapeButton, char *,...) |
| Show warning message box with arbitrary number of user-specified buttons. | |
| static int | information (QWidget *parent, const QString &title, const QString &text, const int defaultButton, const int escapeButton, char *,...) |
| Show information message box with arbitrary number of user-specified buttons. | |
| static int | question (QWidget *parent, const QString &title, const QString &text, const int defaultButton, const int escapeButton, char *,...) |
| Show question message box with arbitrary number of user-specified buttons. | |
Private Types | |
| typedef QList< ButtonInfo > | ButtonInfos |
Static Private Member Functions | |
| static int | messageBox (SUIT_MessageBox::Icon icon, QWidget *parent, const QString &title, const QString &text, const ButtonInfos &lst, const int defaultButton=-1, const int escapeButton=-1) |
| Create and show the message box. | |
| static ButtonInfos | messageList (char *, va_list &) |
| Parse arbitrary arguments list. | |
The class provides a modal dialog with a short message, an icon, and buttons laid out depending on the current style.
Message boxes are used to provide informative messages and to ask simple questions.
The easiest way to pop up a message box is to call one of the static functions information(), question(), critical(), and warning().
The class provides the static functions to show message boxes with standard buttons (like Ok, Cancel, Apply, Close, Yes, No, Abort, Retry, etc). These methods accept ORed buttons flags as one of the parameters. The buttons layouting type and order is system-dependant and defined by the current style. In addition, these methods allow to define default button (where input focus is set by default and which is clicked when user presses Enter key).
Another set of static functions allows to show message boxes with up to four user-defined buttons. It is possible to define default and escape buttons using additional parameters.
And finally, the last group of static functions allow displaying the message boxes with an arbitrary number of buttons.
For example:
// show question message box with two standard buttons int result = SUIT_MessageBox::question(desktop(), "Error", "File already exists? Overwrite?", SUIT_MessageBox::Yes | SUIT_MessageBox::No, SUIT_MessageBox::No ); if ( result == SUIT_MessageBox::Yes ) overwriteFileFunction(); // show critical message box with user-defined buttons // default is second button and escape is third button int result = SUIT_MessageBox::critical(desktop(), "Hazard!", "The situation is critical! What to do?", "Hide", "Run Away", "Stand still", 1, 2); switch ( result ) { case 0: hideMyself(); break; case 1: runAwayFromHere(); break; case 2: sitDownAndPray(); break; default: break; } // show message box with 6 buttons // both default and escape buttons are set to first button ("Zero") int result = SUIT_MessageBox::information(desktop(), "Question", "Select your favourite number", 0, 0, "Zero", "One", "Two", "Three", "Four", "Five"); useMyFavouriteNumberSomewhere( result );
typedef QList<ButtonInfo> SUIT_MessageBox.ButtonInfos [private] |
| SUIT_MessageBox::SUIT_MessageBox | ( | QWidget * | parent = 0 | ) |
| parent | parent widget |
| SUIT_MessageBox::SUIT_MessageBox | ( | Icon | icon, |
| const QString & | title, | ||
| const QString & | text, | ||
| StandardButtons | buttons = NoButton, |
||
| QWidget * | parent = 0, |
||
| Qt::WindowFlags | f = Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint |
||
| ) |
| icon | message box icon (QMessageBox.Icon) |
| title | message box title |
| text | message box text |
| buttons | ORed message box standard buttons (QMessageBox.StandardButton) |
| parent | parent widget |
| f | window flags |
| SUIT_MessageBox::~SUIT_MessageBox | ( | ) |
| QString SUIT_MessageBox::buttonText | ( | StandardButton | btn | ) | const |
| btn | standard button id |
| void SUIT_MessageBox::setButtonText | ( | StandardButton | btn, |
| const QString & | text | ||
| ) |
| btn | standard button id |
| text | new button text |
| SUIT_MessageBox::StandardButton SUIT_MessageBox::critical | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| StandardButtons | buttons = Ok, |
||
| StandardButton | defaultButton = NoButton |
||
| ) | [static] |
| parent | parent widget |
| title | message box title |
| text | message box text |
| buttons | ORed message box buttons (QMessageBox.StandardButton) |
| defaultButton | default button (QMessageBox.StandardButton) |
| static StandardButton SUIT_MessageBox.warning | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| StandardButtons | buttons = Ok, |
||
| StandardButton | defaultButton = NoButton |
||
| ) | [static] |
| SUIT_MessageBox::StandardButton SUIT_MessageBox::information | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| StandardButtons | buttons = Ok, |
||
| StandardButton | defaultButton = NoButton |
||
| ) | [static] |
| parent | parent widget |
| title | message box title |
| text | message box text |
| buttons | ORed message box buttons (QMessageBox.StandardButton) |
| defaultButton | default button (QMessageBox.StandardButton) |
| SUIT_MessageBox::StandardButton SUIT_MessageBox::question | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| StandardButtons | buttons = Ok, |
||
| StandardButton | defaultButton = NoButton |
||
| ) | [static] |
| parent | parent widget |
| title | message box title |
| text | message box text |
| buttons | ORed message box buttons (QMessageBox.StandardButton) |
| defaultButton | default button (QMessageBox.StandardButton) |
| int SUIT_MessageBox::critical | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| const QString & | button | ||
| ) | [static] |
Specified button becomes "default" button and "escape" button, i.e. pressing Return or Enter and Escape keys is equivalent to clicking this button.
| parent | parent widget |
| title | message box title |
| text | message box text |
| button | button text |
References messageBox().
| int SUIT_MessageBox::warning | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| const QString & | button | ||
| ) | [static] |
Specified button becomes "default" button and "escape" button, i.e. pressing Return or Enter and Escape keys is equivalent to clicking this button.
| parent | parent widget |
| title | message box title |
| text | message box text |
| button | button text |
References messageBox().
| int SUIT_MessageBox::information | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| const QString & | button | ||
| ) | [static] |
Specified button becomes "default" button and "escape" button, i.e. pressing Return or Enter and Escape keys is equivalent to clicking this button.
| parent | parent widget |
| title | message box title |
| text | message box text |
| button | button text |
References messageBox().
| int SUIT_MessageBox::question | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| const QString & | button | ||
| ) | [static] |
Specified button becomes "default" button and "escape" button, i.e. pressing Return or Enter and Escape keys is equivalent to clicking this button.
| parent | parent widget |
| title | message box title |
| text | message box text |
| button | button text |
References messageBox().
| int SUIT_MessageBox::critical | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| const QString & | button1, | ||
| const QString & | button2, | ||
| const int | defaultButton = -1, |
||
| const int | escapeButton = -1 |
||
| ) | [static] |
Parameters button1 and button2 specify the buttons text. The function returns clicked button id. The identifiers for the buttons are assigned automatically. The first button is identified as 0, the second one as 1.
The defaultButton parameter allows to specify the button which is assigned for the Return or Enter key. Similarly, escapeButton parameter allows specifing the button which is assigned for Escape key. If these parameters are not specified (-1 by default), the first button is set as default button and the second one is defined as escape button.
| parent | parent widget |
| title | message box title |
| text | message box text |
| button1 | first button text |
| button2 | second button text |
| defaultButton | default button |
| escapeButton | escape button |
References messageBox().
| int SUIT_MessageBox::warning | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| const QString & | button1, | ||
| const QString & | button2, | ||
| const int | defaultButton = -1, |
||
| const int | escapeButton = -1 |
||
| ) | [static] |
Parameters button1 and button2 specify the buttons text. The function returns clicked button id. The identifiers for the buttons are assigned automatically. The first button is identified as 0, the second one as 1.
The defaultButton parameter allows to specify the button which is assigned for the Return or Enter key. Similarly, escapeButton parameter allows specifing the button which is assigned for Escape key. If these parameters are not specified (-1 by default), the first button is set as default button and the second one is defined as escape button.
| parent | parent widget |
| title | message box title |
| text | message box text |
| button1 | first button text |
| button2 | second button text |
| defaultButton | default button |
| escapeButton | escape button |
References messageBox().
| int SUIT_MessageBox::information | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| const QString & | button1, | ||
| const QString & | button2, | ||
| const int | defaultButton = -1, |
||
| const int | escapeButton = -1 |
||
| ) | [static] |
Parameters button1 and button2 specify the buttons text. The function returns clicked button id. The identifiers for the buttons are assigned automatically. The first button is identified as 0, the second one as 1.
The defaultButton parameter allows to specify the button which is assigned for the Return or Enter key. Similarly, escapeButton parameter allows specifing the button which is assigned for Escape key. If these parameters are not specified (-1 by default), the first button is set as default button and the second one is defined as escape button.
| parent | parent widget |
| title | message box title |
| text | message box text |
| button1 | first button text |
| button2 | second button text |
| defaultButton | default button |
| escapeButton | escape button |
References messageBox().
| int SUIT_MessageBox::question | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| const QString & | button1, | ||
| const QString & | button2, | ||
| const int | defaultButton = -1, |
||
| const int | escapeButton = -1 |
||
| ) | [static] |
Parameters button1 and button2 specify the buttons text. The function returns clicked button id. The identifiers for the buttons are assigned automatically. The first button is identified as 0, the second one as 1.
The defaultButton parameter allows to specify the button which is assigned for the Return or Enter key. Similarly, escapeButton parameter allows specifing the button which is assigned for Escape key. If these parameters are not specified (-1 by default), the first button is set as default button and the second one is defined as escape button.
| parent | parent widget |
| title | message box title |
| text | message box text |
| button1 | first button text |
| button2 | second button text |
| defaultButton | default button |
| escapeButton | escape button |
References messageBox().
| int SUIT_MessageBox::critical | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| const QString & | button1, | ||
| const QString & | button2, | ||
| const QString & | button3, | ||
| const int | defaultButton = -1, |
||
| const int | escapeButton = -1 |
||
| ) | [static] |
Parameters button1, button2 and button3 specify the buttons text. The function returns clicked button id. The identifiers for the buttons are assigned automatically. The first button is identified as 0, the second one as 1, etc.
The defaultButton parameter allows to specify the button which is assigned for the Return or Enter key. Similarly, escapeButton parameter allows specifing the button which is assigned for Escape key. If these parameters are not specified (-1 by default), the first button is set as default button and the last one is defined as escape button.
| parent | parent widget |
| title | message box title |
| text | message box text |
| button1 | first button text |
| button2 | second button text |
| button3 | third button text |
| defaultButton | default button |
| escapeButton | escape button |
References messageBox().
| int SUIT_MessageBox::warning | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| const QString & | button1, | ||
| const QString & | button2, | ||
| const QString & | button3, | ||
| const int | defaultButton = -1, |
||
| const int | escapeButton = -1 |
||
| ) | [static] |
Parameters button1, button2 and button3 specify the buttons text. The function returns clicked button id. The identifiers for the buttons are assigned automatically. The first button is identified as 0, the second one as 1, etc.
The defaultButton parameter allows to specify the button which is assigned for the Return or Enter key. Similarly, escapeButton parameter allows specifing the button which is assigned for Escape key. If these parameters are not specified (-1 by default), the first button is set as default button and the last one is defined as escape button.
| parent | parent widget |
| title | message box title |
| text | message box text |
| button1 | first button text |
| button2 | second button text |
| button3 | third button text |
| defaultButton | default button |
| escapeButton | escape button |
References messageBox().
| int SUIT_MessageBox::information | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| const QString & | button1, | ||
| const QString & | button2, | ||
| const QString & | button3, | ||
| const int | defaultButton = -1, |
||
| const int | escapeButton = -1 |
||
| ) | [static] |
Parameters button1, button2 and button3 specify the buttons text. The function returns clicked button id. The identifiers for the buttons are assigned automatically. The first button is identified as 0, the second one as 1, etc.
The defaultButton parameter allows to specify the button which is assigned for the Return or Enter key. Similarly, escapeButton parameter allows specifing the button which is assigned for Escape key. If these parameters are not specified (-1 by default), the first button is set as default button and the last one is defined as escape button.
| parent | parent widget |
| title | message box title |
| text | message box text |
| button1 | first button text |
| button2 | second button text |
| button3 | third button text |
| defaultButton | default button |
| escapeButton | escape button |
References messageBox().
| int SUIT_MessageBox::question | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| const QString & | button1, | ||
| const QString & | button2, | ||
| const QString & | button3, | ||
| const int | defaultButton = -1, |
||
| const int | escapeButton = -1 |
||
| ) | [static] |
Parameters button1, button2 and button3 specify the buttons text. The function returns clicked button id. The identifiers for the buttons are assigned automatically. The first button is identified as 0, the second one as 1, etc.
The defaultButton parameter allows to specify the button which is assigned for the Return or Enter key. Similarly, escapeButton parameter allows specifing the button which is assigned for Escape key. If these parameters are not specified (-1 by default), the first button is set as default button and the last one is defined as escape button.
| parent | parent widget |
| title | message box title |
| text | message box text |
| button1 | first button text |
| button2 | second button text |
| button3 | third button text |
| defaultButton | default button |
| escapeButton | escape button |
References messageBox().
| int SUIT_MessageBox::critical | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| const QString & | button1, | ||
| const QString & | button2, | ||
| const QString & | button3, | ||
| const QString & | button4, | ||
| const int | defaultButton = -1, |
||
| const int | escapeButton = -1 |
||
| ) | [static] |
Parameters button1, button2, button3 and button4 specify the buttons text. The function returns clicked button id. The identifiers for the buttons are assigned automatically. The first button is identified as 0, the second one as 1, etc.
The defaultButton parameter allows to specify the button which is assigned for the Return or Enter key. Similarly, escapeButton parameter allows specifing the button which is assigned for Escape key. If these parameters are not specified (-1 by default), the first button is set as default button and the last one is defined as escape button.
| parent | parent widget |
| title | message box title |
| text | message box text |
| button1 | first button text |
| button2 | second button text |
| button3 | third button text |
| button4 | fourth button text |
| defaultButton | default button |
| escapeButton | escape button |
References messageBox().
| int SUIT_MessageBox::warning | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| const QString & | button1, | ||
| const QString & | button2, | ||
| const QString & | button3, | ||
| const QString & | button4, | ||
| const int | defaultButton = -1, |
||
| const int | escapeButton = -1 |
||
| ) | [static] |
Parameters button1, button2, button3 and button4 specify the buttons text. The function returns clicked button id. The identifiers for the buttons are assigned automatically. The first button is identified as 0, the second one as 1, etc.
The defaultButton parameter allows to specify the button which is assigned for the Return or Enter key. Similarly, escapeButton parameter allows specifing the button which is assigned for Escape key. If these parameters are not specified (-1 by default), the first button is set as default button and the last one is defined as escape button.
| parent | parent widget |
| title | message box title |
| text | message box text |
| button1 | first button text |
| button2 | second button text |
| button3 | third button text |
| button4 | fourth button text |
| defaultButton | default button |
| escapeButton | escape button |
References messageBox().
| int SUIT_MessageBox::information | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| const QString & | button1, | ||
| const QString & | button2, | ||
| const QString & | button3, | ||
| const QString & | button4, | ||
| const int | defaultButton = -1, |
||
| const int | escapeButton = -1 |
||
| ) | [static] |
Parameters button1, button2, button3 and button4 specify the buttons text. The function returns clicked button id. The identifiers for the buttons are assigned automatically. The first button is identified as 0, the second one as 1, etc.
The defaultButton parameter allows to specify the button which is assigned for the Return or Enter key. Similarly, escapeButton parameter allows specifing the button which is assigned for Escape key. If these parameters are not specified (-1 by default), the first button is set as default button and the last one is defined as escape button.
| parent | parent widget |
| title | message box title |
| text | message box text |
| button1 | first button text |
| button2 | second button text |
| button3 | third button text |
| button4 | fourth button text |
| defaultButton | default button |
| escapeButton | escape button |
References messageBox().
| int SUIT_MessageBox::question | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| const QString & | button1, | ||
| const QString & | button2, | ||
| const QString & | button3, | ||
| const QString & | button4, | ||
| const int | defaultButton = -1, |
||
| const int | escapeButton = -1 |
||
| ) | [static] |
Parameters button1, button2, button3 and button4 specify the buttons text. The function returns clicked button id. The identifiers for the buttons are assigned automatically. The first button is identified as 0, the second one as 1, etc.
The defaultButton parameter allows to specify the button which is assigned for the Return or Enter key. Similarly, escapeButton parameter allows specifing the button which is assigned for Escape key. If these parameters are not specified (-1 by default), the first button is set as default button and the last one is defined as escape button.
| parent | parent widget |
| title | message box title |
| text | message box text |
| button1 | first button text |
| button2 | second button text |
| button3 | third button text |
| button4 | fourth button text |
| defaultButton | default button |
| escapeButton | escape button |
References messageBox().
| int SUIT_MessageBox::critical | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| const int | defaultButton, | ||
| const int | escapeButton, | ||
| char * | btn, | ||
| ... | |||
| ) | [static] |
The function accepts arbitrary number of parameters. Each parameter starting from btn should be of type const char* to specify the button text. After the last button parameter and additional 0 (zero) value should be specified.
The function returns clicked button id. The identifiers for the buttons are assigned automatically. The first button is identified as 0, the second one as 1, etc.
The defaultButton parameter allows to specify the button which is assigned for the Return or Enter key. Similarly, escapeButton parameter allows specifing the button which is assigned for Escape key. If these parameters are not specified (-1 by default), the first button is set as default button and the last one is defined as escape button.
| parent | parent widget |
| title | message box title |
| text | message box text |
| defaultButton | default button |
| escapeButton | escape button |
| btn | first button text |
References messageBox(), and messageList().
| int SUIT_MessageBox::warning | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| const int | defaultButton, | ||
| const int | escapeButton, | ||
| char * | btn, | ||
| ... | |||
| ) | [static] |
The function accepts arbitrary number of parameters. Each parameter starting from btn should be of type const char* to specify the button text. After the last button parameter and additional 0 (zero) value should be specified.
The function returns clicked button id. The identifiers for the buttons are assigned automatically. The first button is identified as 0, the second one as 1, etc.
The defaultButton parameter allows to specify the button which is assigned for the Return or Enter key. Similarly, escapeButton parameter allows specifing the button which is assigned for Escape key. If these parameters are not specified (-1 by default), the first button is set as default button and the last one is defined as escape button.
| parent | parent widget |
| title | message box title |
| text | message box text |
| defaultButton | default button |
| escapeButton | escape button |
| btn | first button text |
References messageBox(), and messageList().
| int SUIT_MessageBox::information | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| const int | defaultButton, | ||
| const int | escapeButton, | ||
| char * | btn, | ||
| ... | |||
| ) | [static] |
The function accepts arbitrary number of parameters. Each parameter starting from btn should be of type const char* to specify the button text. After the last button parameter and additional 0 (zero) value should be specified.
The function returns clicked button id. The identifiers for the buttons are assigned automatically. The first button is identified as 0, the second one as 1, etc.
The defaultButton parameter allows to specify the button which is assigned for the Return or Enter key. Similarly, escapeButton parameter allows specifing the button which is assigned for Escape key. If these parameters are not specified (-1 by default), the first button is set as default button and the last one is defined as escape button.
| parent | parent widget |
| title | message box title |
| text | message box text |
| defaultButton | default button |
| escapeButton | escape button |
| btn | first button text |
References messageBox(), and messageList().
| int SUIT_MessageBox::question | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| const int | defaultButton, | ||
| const int | escapeButton, | ||
| char * | btn, | ||
| ... | |||
| ) | [static] |
The function accepts arbitrary number of parameters. Each parameter starting from btn should be of type const char* to specify the button text. After the last button parameter and additional 0 (zero) value should be specified.
The function returns clicked button id. The identifiers for the buttons are assigned automatically. The first button is identified as 0, the second one as 1, etc.
The defaultButton parameter allows to specify the button which is assigned for the Return or Enter key. Similarly, escapeButton parameter allows specifing the button which is assigned for Escape key. If these parameters are not specified (-1 by default), the first button is set as default button and the last one is defined as escape button.
| parent | parent widget |
| title | message box title |
| text | message box text |
| defaultButton | default button |
| escapeButton | escape button |
| btn | first button text |
References messageBox(), and messageList().
| int SUIT_MessageBox::messageBox | ( | SUIT_MessageBox::Icon | icon, |
| QWidget * | parent, | ||
| const QString & | title, | ||
| const QString & | text, | ||
| const ButtonInfos & | lst, | ||
| const int | defaultButton = -1, |
||
| const int | escapeButton = -1 |
||
| ) | [static, private] |
| icon | icon type |
| parent | parent widget |
| title | message box title |
| text | message box text |
| lst | list of buttons infos |
| defaultButton | default button |
| escapeButton | escape button |
| SUIT_MessageBox::ButtonInfos SUIT_MessageBox::messageList | ( | char * | txt, |
| va_list & | args | ||
| ) | [static, private] |
The last parameter in a sequence should be 0 (zero) value.
| txt | first argument which starts arbitrary sequence |
| args | arguments list from the stack |