Salome HOME
Join modifications from branch BR_DEBUG_3_2_0b1
[modules/gui.git] / src / SUIT / SUIT_MessageBox.h
1 // Copyright (C) 2005  OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
2 // 
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either 
6 // version 2.1 of the License.
7 // 
8 // This library is distributed in the hope that it will be useful 
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public  
14 // License along with this library; if not, write to the Free Software 
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef SUIT_MESSAGEBOX_H
21 #define SUIT_MESSAGEBOX_H
22
23 #include "SUIT.h"
24
25 #include <qstring.h>
26 #include <qwidget.h>
27
28 #define SUIT_OK                      1
29 #define SUIT_CANCEL                  2
30 #define SUIT_YES                     3
31 #define SUIT_NO                      4
32 #define SUIT_HELP                    5
33
34 /*!
35   \class SUIT_MessageBox
36   \brief Message dialog box for SUIT-based application
37 */
38 class SUIT_EXPORT SUIT_MessageBox
39 {
40 public:
41     
42     /** @name One button message boxes.*/
43     //@{
44     static int info1 ( QWidget* parent, const QString& caption, const QString& text,
45                        const QString& textButton0 );
46     static int warn1 ( QWidget* parent, const QString& caption, const QString& text,
47                        const QString& textButton0 );
48     static int error1 ( QWidget* parent, const QString& caption, const QString& text,
49                        const QString& textButton0 );
50     static int question1 ( QWidget* parent, const QString& caption, const QString& text,
51                            const QString& textButton0 );
52     //@}
53
54     /** @name Two buttons message boxes.*/
55     //@{
56     static int info2 ( QWidget* parent, const QString& caption, const QString& text,
57                        const QString& textButton0, const QString& textButton1,
58                        int idButton0, int idButton1, int idDefault );
59     static int warn2 ( QWidget* parent, const QString& caption, const QString& text,
60                        const QString& textButton0, const QString& textButton1,
61                        int idButton0, int idButton1, int idDefault );
62     static int error2 ( QWidget* parent, const QString& caption, const QString& text,
63                        const QString& textButton0, const QString& textButton1,
64                        int idButton0, int idButton1, int idDefault );
65     static int question2 ( QWidget* parent, const QString& caption, const QString& text,
66                            const QString& textButton0, const QString& textButton1,
67                            int idButton0, int idButton1, int idDefault );
68     //@}
69
70     /** @name Three buttons message boxes.*/
71     //@{
72     static int info3 ( QWidget* parent, const QString& caption, const QString& text,
73                        const QString& textButton0, const QString& textButton1,
74                        const QString& textButton2, int idButton0, int idButton1,
75                        int idButton2, int idDefault );
76     static int warn3 ( QWidget* parent, const QString& caption, const QString& text,
77                        const QString& textButton0, const QString& textButton1,
78                        const QString& textButton2, int idButton0, int idButton1,
79                        int idButton2, int idDefault );
80     static int error3 ( QWidget* parent, const QString& caption, const QString& text,
81                        const QString& textButton0, const QString& textButton1,
82                        const QString& textButton2, int idButton0, int idButton1,
83                        int idButton2, int idDefault );
84     static int question3 ( QWidget* parent, const QString& caption, const QString& text,
85                            const QString& textButton0, const QString& textButton1,
86                            const QString& textButton2, int idButton0, int idButton1,
87                            int idButton2, int idDefault );
88     //@}
89 };
90
91 #endif