]> SALOME platform Git repositories - modules/gui.git/blob - src/SUIT/SUIT_MessageBox.h
Salome HOME
f8cf626be96d4dadd4a5ea879c5b8674c3aeb6b0
[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/
18 //
19 /********************************************************************
20 **  Class:   SUIT_MessageBox
21 **  Descr:   Message dialog box for SUIT-based application
22 **  Module:  SUIT
23 **  Created: UI team, 02.10.00
24 *********************************************************************/
25 #ifndef SUIT_MESSAGEBOX_H
26 #define SUIT_MESSAGEBOX_H
27
28 #include "SUIT.h"
29
30 #include <qstring.h>
31 #include <qwidget.h>
32
33 #define SUIT_OK                      1
34 #define SUIT_CANCEL                  2
35 #define SUIT_YES                     3
36 #define SUIT_NO                      4
37 #define SUIT_HELP                    5
38
39 class SUIT_EXPORT SUIT_MessageBox
40 {
41 public:
42     
43     /** @name One button message boxes.*/
44     //@{
45     static int info1 ( QWidget* parent, const QString& caption, const QString& text,
46                        const QString& textButton0 );
47     static int warn1 ( QWidget* parent, const QString& caption, const QString& text,
48                        const QString& textButton0 );
49     static int error1 ( QWidget* parent, const QString& caption, const QString& text,
50                        const QString& textButton0 );
51     static int question1 ( QWidget* parent, const QString& caption, const QString& text,
52                            const QString& textButton0 );
53     //@}
54
55     /** @name Two buttons message boxes.*/
56     //@{
57     static int info2 ( QWidget* parent, const QString& caption, const QString& text,
58                        const QString& textButton0, const QString& textButton1,
59                        int idButton0, int idButton1, int idDefault );
60     static int warn2 ( QWidget* parent, const QString& caption, const QString& text,
61                        const QString& textButton0, const QString& textButton1,
62                        int idButton0, int idButton1, int idDefault );
63     static int error2 ( QWidget* parent, const QString& caption, const QString& text,
64                        const QString& textButton0, const QString& textButton1,
65                        int idButton0, int idButton1, int idDefault );
66     static int question2 ( QWidget* parent, const QString& caption, const QString& text,
67                            const QString& textButton0, const QString& textButton1,
68                            int idButton0, int idButton1, int idDefault );
69     //@}
70
71     /** @name Three buttons message boxes.*/
72     //@{
73     static int info3 ( QWidget* parent, const QString& caption, const QString& text,
74                        const QString& textButton0, const QString& textButton1,
75                        const QString& textButton2, int idButton0, int idButton1,
76                        int idButton2, int idDefault );
77     static int warn3 ( QWidget* parent, const QString& caption, const QString& text,
78                        const QString& textButton0, const QString& textButton1,
79                        const QString& textButton2, int idButton0, int idButton1,
80                        int idButton2, int idDefault );
81     static int error3 ( QWidget* parent, const QString& caption, const QString& text,
82                        const QString& textButton0, const QString& textButton1,
83                        const QString& textButton2, int idButton0, int idButton1,
84                        int idButton2, int idDefault );
85     static int question3 ( QWidget* parent, const QString& caption, const QString& text,
86                            const QString& textButton0, const QString& textButton1,
87                            const QString& textButton2, int idButton0, int idButton1,
88                            int idButton2, int idDefault );
89     //@}
90 };
91
92 #endif