Salome HOME
1d86778a7d3366c47db0fabe5ad27fce239507c4
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_DeleteGroupDlg.h
1 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
3 // 
4 //  This library is free software; you can redistribute it and/or 
5 //  modify it under the terms of the GNU Lesser General Public 
6 //  License as published by the Free Software Foundation; either 
7 //  version 2.1 of the License. 
8 // 
9 //  This library is distributed in the hope that it will be useful, 
10 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 //  Lesser General Public License for more details. 
13 // 
14 //  You should have received a copy of the GNU Lesser General Public 
15 //  License along with this library; if not, write to the Free Software 
16 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
17 // 
18 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
19 //
20 //
21 //
22 //  File   : SMESHGUI_DeleteGroupDlg.h
23 //  Author : Sergey LITONIN
24 //  Module : SMESH
25
26
27 #ifndef SMESHGUI_DELETEGROUPDLG_H
28 #define SMESHGUI_DELETEGROUPDLG_H
29
30 #include <qdialog.h>
31 #include <qlist.h>
32
33 #include <SALOMEconfig.h>
34 #include CORBA_SERVER_HEADER(SMESH_Group)
35
36 class QCloseEvent;
37 class QFrame;
38 class QPushButton;
39 class SalomeApp_SelectionMgr;
40 class QListBox;
41
42 /*!
43  *  Class       : SMESHGUI_DeleteGroupDlg
44  *  Description : Delete groups and their contents
45  */
46
47 class SMESHGUI_DeleteGroupDlg : public QDialog
48 {
49   Q_OBJECT
50
51 public:
52                           SMESHGUI_DeleteGroupDlg (QWidget*,
53                                                    SalomeApp_SelectionMgr*);
54   virtual                 ~SMESHGUI_DeleteGroupDlg();
55
56   void                    Init (SalomeApp_SelectionMgr*);
57
58 private:
59
60   void                    closeEvent (QCloseEvent*);
61   void                    enterEvent (QEvent*);
62
63 private slots:
64
65   void                    onOk();
66   bool                    onApply();
67   void                    onClose();
68
69   void                    onDeactivate();
70
71   void                    onSelectionDone();
72
73 private:
74
75   QFrame*                 createButtonFrame (QWidget*);
76   QFrame*                 createMainFrame   (QWidget*);
77   bool                    isValid();
78
79 private:
80
81   QPushButton*            myOkBtn;
82   QPushButton*            myApplyBtn;
83   QPushButton*            myCloseBtn;
84   QListBox*               myListBox;
85   SalomeApp_SelectionMgr* mySelectionMgr;
86
87   QValueList<SMESH::SMESH_GroupBase_var> myListGrp;
88   bool                                   myBlockSelection;
89 };
90
91 #endif