+ ButtonInfos lst;
+ lst.append( ButtonInfo( 0, button ) );
+ return messageBox( SUIT_MessageBox::Information, parent, title, text, lst );
+}
+
+/*!
+ \brief Show question message box with one custom button.
+
+ \warning This function does not make a lot of sense because it provides
+ message box with only one button, i.e. it is impossible to give several
+ answers for the question (at least 'yes'/'no').
+ This function is implemented only for completeness.
+
+ Specified button becomes "default" button and "escape" button, i.e.
+ pressing \c Return or \c Enter and \c Escape keys is equivalent to clicking
+ this button.
+
+ \param parent parent widget
+ \param title message box title
+ \param text message box text
+ \param button button text
+ \return button id clicked by the user (QMessageBox::StandardButton)
+*/
+int SUIT_MessageBox::question( QWidget* parent, const QString& title, const QString& text,
+ const QString& button )
+{
+ ButtonInfos lst;
+ lst.append( ButtonInfo( 0, button ) );
+ return messageBox( SUIT_MessageBox::Question, parent, title, text, lst );
+}
+
+/*!
+ \brief Show critical message box with two custom buttons.
+
+ Parameters \a button1 and \a 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 \a defaultButton parameter allows to specify the button which is assigned
+ for the \c Return or \c Enter key. Similarly, \a escapeButton parameter
+ allows specifing the button which is assigned for \c 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.
+
+ \param parent parent widget
+ \param title message box title
+ \param text message box text
+ \param button1 first button text
+ \param button2 second button text
+ \param defaultButton default button
+ \param escapeButton escape button
+ \return button used button id
+*/
+int SUIT_MessageBox::critical( QWidget* parent, const QString& title, const QString& text,
+ const QString& button1, const QString& button2,
+ const int defaultButton, const int escapeButton )
+{
+ ButtonInfos lst;
+ int id = 0;
+ lst.append( ButtonInfo( id++, button1 ) );
+ lst.append( ButtonInfo( id++, button2 ) );
+ return messageBox( SUIT_MessageBox::Critical, parent, title, text, lst,
+ defaultButton, escapeButton );
+}
+
+/*!
+ \brief Show warning message box with two custom buttons.
+
+ Parameters \a button1 and \a 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 \a defaultButton parameter allows to specify the button which is assigned
+ for the \c Return or \c Enter key. Similarly, \a escapeButton parameter
+ allows specifing the button which is assigned for \c 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.
+
+ \param parent parent widget
+ \param title message box title
+ \param text message box text
+ \param button1 first button text
+ \param button2 second button text
+ \param defaultButton default button
+ \param escapeButton escape button
+ \return button used button id
+*/
+int SUIT_MessageBox::warning( QWidget* parent, const QString& title, const QString& text,
+ const QString& button1, const QString& button2,
+ const int defaultButton, const int escapeButton )
+{
+ ButtonInfos lst;
+ int id = 0;
+ lst.append( ButtonInfo( id++, button1 ) );
+ lst.append( ButtonInfo( id++, button2 ) );
+ return messageBox( SUIT_MessageBox::Warning, parent, title, text, lst,
+ defaultButton, escapeButton );
+}
+
+/*!
+ \brief Show information message box with two custom buttons.
+
+ Parameters \a button1 and \a 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 \a defaultButton parameter allows to specify the button which is assigned
+ for the \c Return or \c Enter key. Similarly, \a escapeButton parameter
+ allows specifing the button which is assigned for \c 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.
+
+ \param parent parent widget
+ \param title message box title
+ \param text message box text
+ \param button1 first button text
+ \param button2 second button text
+ \param defaultButton default button
+ \param escapeButton escape button
+ \return button used button id
+*/
+int SUIT_MessageBox::information( QWidget* parent, const QString& title, const QString& text,
+ const QString& button1, const QString& button2,
+ const int defaultButton, const int escapeButton )
+{
+ ButtonInfos lst;
+ int id = 0;
+ lst.append( ButtonInfo( id++, button1 ) );
+ lst.append( ButtonInfo( id++, button2 ) );
+ return messageBox( SUIT_MessageBox::Information, parent, title, text, lst,
+ defaultButton, escapeButton );
+}
+
+/*!
+ \brief Show question message box with two custom buttons.
+
+ Parameters \a button1 and \a 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 \a defaultButton parameter allows to specify the button which is assigned
+ for the \c Return or \c Enter key. Similarly, \a escapeButton parameter
+ allows specifing the button which is assigned for \c 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.
+
+ \param parent parent widget
+ \param title message box title
+ \param text message box text
+ \param button1 first button text
+ \param button2 second button text
+ \param defaultButton default button
+ \param escapeButton escape button
+ \return button used button id
+*/
+int SUIT_MessageBox::question( QWidget* parent, const QString& title, const QString& text,
+ const QString& button1, const QString& button2,
+ const int defaultButton, const int escapeButton )
+{
+ ButtonInfos lst;
+ int id = 0;
+ lst.append( ButtonInfo( id++, button1 ) );
+ lst.append( ButtonInfo( id++, button2 ) );
+ return messageBox( SUIT_MessageBox::Question, parent, title, text, lst,
+ defaultButton, escapeButton );
+}
+
+/*!
+ \brief Show critical message box with three custom buttons.
+
+ Parameters \a button1, \a button2 and \a 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 \a defaultButton parameter allows to specify the button which is assigned
+ for the \c Return or \c Enter key. Similarly, \a escapeButton parameter
+ allows specifing the button which is assigned for \c 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.
+
+ \param parent parent widget
+ \param title message box title
+ \param text message box text
+ \param button1 first button text
+ \param button2 second button text
+ \param button3 third button text
+ \param defaultButton default button
+ \param escapeButton escape button
+ \return button used button id
+*/
+int SUIT_MessageBox::critical( QWidget* parent, const QString& title, const QString& text,
+ const QString& button1, const QString& button2,
+ const QString& button3,
+ const int defaultButton, const int escapeButton )
+{
+ ButtonInfos lst;
+ int id = 0;
+ lst.append( ButtonInfo( id++, button1 ) );
+ lst.append( ButtonInfo( id++, button2 ) );
+ lst.append( ButtonInfo( id++, button3 ) );
+ return messageBox( SUIT_MessageBox::Critical, parent, title, text, lst,
+ defaultButton, escapeButton );
+}
+
+/*!
+ \brief Show warning message box with three custom buttons.
+
+ Parameters \a button1, \a button2 and \a 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 \a defaultButton parameter allows to specify the button which is assigned
+ for the \c Return or \c Enter key. Similarly, \a escapeButton parameter
+ allows specifing the button which is assigned for \c 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.
+
+ \param parent parent widget
+ \param title message box title
+ \param text message box text
+ \param button1 first button text
+ \param button2 second button text
+ \param button3 third button text
+ \param defaultButton default button
+ \param escapeButton escape button
+ \return button used button id
+*/
+int SUIT_MessageBox::warning( QWidget* parent, const QString& title, const QString& text,
+ const QString& button1, const QString& button2,
+ const QString& button3,
+ const int defaultButton, const int escapeButton )
+{
+ ButtonInfos lst;
+ int id = 0;
+ lst.append( ButtonInfo( id++, button1 ) );
+ lst.append( ButtonInfo( id++, button2 ) );
+ lst.append( ButtonInfo( id++, button3 ) );
+ return messageBox( SUIT_MessageBox::Warning, parent, title, text, lst,
+ defaultButton, escapeButton );
+}
+
+/*!
+ \brief Show information message box with three custom buttons.
+
+ Parameters \a button1, \a button2 and \a 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 \a defaultButton parameter allows to specify the button which is assigned
+ for the \c Return or \c Enter key. Similarly, \a escapeButton parameter
+ allows specifing the button which is assigned for \c 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.
+
+ \param parent parent widget
+ \param title message box title
+ \param text message box text
+ \param button1 first button text
+ \param button2 second button text
+ \param button3 third button text
+ \param defaultButton default button
+ \param escapeButton escape button
+ \return button used button id
+*/
+int SUIT_MessageBox::information( QWidget* parent, const QString& title, const QString& text,
+ const QString& button1, const QString& button2,
+ const QString& button3,
+ const int defaultButton, const int escapeButton )
+{
+ ButtonInfos lst;
+ int id = 0;
+ lst.append( ButtonInfo( id++, button1 ) );
+ lst.append( ButtonInfo( id++, button2 ) );
+ lst.append( ButtonInfo( id++, button3 ) );
+ return messageBox( SUIT_MessageBox::Information, parent, title, text, lst,
+ defaultButton, escapeButton );
+}
+
+/*!
+ \brief Show question message box with three custom buttons.
+
+ Parameters \a button1, \a button2 and \a 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 \a defaultButton parameter allows to specify the button which is assigned
+ for the \c Return or \c Enter key. Similarly, \a escapeButton parameter
+ allows specifing the button which is assigned for \c 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.
+
+ \param parent parent widget
+ \param title message box title
+ \param text message box text
+ \param button1 first button text
+ \param button2 second button text
+ \param button3 third button text
+ \param defaultButton default button
+ \param escapeButton escape button
+ \return button used button id
+*/
+int SUIT_MessageBox::question( QWidget* parent, const QString& title, const QString& text,
+ const QString& button1, const QString& button2,
+ const QString& button3,
+ const int defaultButton, const int escapeButton )
+{
+ ButtonInfos lst;
+ int id = 0;
+ lst.append( ButtonInfo( id++, button1 ) );
+ lst.append( ButtonInfo( id++, button2 ) );
+ lst.append( ButtonInfo( id++, button3 ) );
+ return messageBox( SUIT_MessageBox::Question, parent, title, text, lst,
+ defaultButton, escapeButton );
+}
+
+/*!
+ \brief Show critical message box with four custom buttons.
+
+ Parameters \a button1, \a button2, \a button3 and \a 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 \a defaultButton parameter allows to specify the button which is assigned
+ for the \c Return or \c Enter key. Similarly, \a escapeButton parameter
+ allows specifing the button which is assigned for \c 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.
+
+ \param parent parent widget
+ \param title message box title
+ \param text message box text
+ \param button1 first button text
+ \param button2 second button text
+ \param button3 third button text
+ \param button4 fourth button text
+ \param defaultButton default button
+ \param escapeButton escape button
+ \return button used button id
+*/
+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, const int escapeButton )
+{
+ ButtonInfos lst;
+ int id = 0;
+ lst.append( ButtonInfo( id++, button1 ) );
+ lst.append( ButtonInfo( id++, button2 ) );
+ lst.append( ButtonInfo( id++, button3 ) );
+ lst.append( ButtonInfo( id++, button4 ) );
+ return messageBox( SUIT_MessageBox::Critical, parent, title, text, lst,
+ defaultButton, escapeButton );
+}
+
+/*!
+ \brief Show warning message box with four custom buttons.
+
+ Parameters \a button1, \a button2, \a button3 and \a 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 \a defaultButton parameter allows to specify the button which is assigned
+ for the \c Return or \c Enter key. Similarly, \a escapeButton parameter
+ allows specifing the button which is assigned for \c 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.
+
+ \param parent parent widget
+ \param title message box title
+ \param text message box text
+ \param button1 first button text
+ \param button2 second button text
+ \param button3 third button text
+ \param button4 fourth button text
+ \param defaultButton default button
+ \param escapeButton escape button
+ \return button used button id
+*/
+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, const int escapeButton )
+{
+ ButtonInfos lst;
+ int id = 0;
+ lst.append( ButtonInfo( id++, button1 ) );
+ lst.append( ButtonInfo( id++, button2 ) );
+ lst.append( ButtonInfo( id++, button3 ) );
+ lst.append( ButtonInfo( id++, button4 ) );
+ return messageBox( SUIT_MessageBox::Warning, parent, title, text, lst,
+ defaultButton, escapeButton );
+}
+
+/*!
+ \brief Show information message box with four custom buttons.
+
+ Parameters \a button1, \a button2, \a button3 and \a 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 \a defaultButton parameter allows to specify the button which is assigned
+ for the \c Return or \c Enter key. Similarly, \a escapeButton parameter
+ allows specifing the button which is assigned for \c 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.
+
+ \param parent parent widget
+ \param title message box title
+ \param text message box text
+ \param button1 first button text
+ \param button2 second button text
+ \param button3 third button text
+ \param button4 fourth button text
+ \param defaultButton default button
+ \param escapeButton escape button
+ \return button used button id
+*/
+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, const int escapeButton )
+{
+ ButtonInfos lst;
+ int id = 0;
+ lst.append( ButtonInfo( id++, button1 ) );
+ lst.append( ButtonInfo( id++, button2 ) );
+ lst.append( ButtonInfo( id++, button3 ) );
+ lst.append( ButtonInfo( id++, button4 ) );
+ return messageBox( SUIT_MessageBox::Information, parent, title, text, lst,
+ defaultButton, escapeButton );
+}
+
+/*!
+ \brief Show question message box with four custom buttons.
+
+ Parameters \a button1, \a button2, \a button3 and \a 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 \a defaultButton parameter allows to specify the button which is assigned
+ for the \c Return or \c Enter key. Similarly, \a escapeButton parameter
+ allows specifing the button which is assigned for \c 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.
+
+ \param parent parent widget
+ \param title message box title
+ \param text message box text
+ \param button1 first button text
+ \param button2 second button text
+ \param button3 third button text
+ \param button4 fourth button text
+ \param defaultButton default button
+ \param escapeButton escape button
+ \return button used button id
+*/
+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, const int escapeButton )
+{
+ ButtonInfos lst;
+ int id = 0;
+ lst.append( ButtonInfo( id++, button1 ) );
+ lst.append( ButtonInfo( id++, button2 ) );
+ lst.append( ButtonInfo( id++, button3 ) );
+ lst.append( ButtonInfo( id++, button4 ) );
+ return messageBox( SUIT_MessageBox::Question, parent, title, text, lst,
+ defaultButton, escapeButton );
+}
+
+/*!
+ \brief Show critical message box with arbitrary number of user-specified
+ buttons.
+
+ List of buttons to be shown is specified via \a buttons parameter.