Salome HOME
IMP 10199 (add Volume Control)
[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 QListBox;
40
41 class SMESHGUI;
42 class SVTK_ViewWindow;
43 class SalomeApp_SelectionMgr;
44
45 /*!
46  *  Class       : SMESHGUI_DeleteGroupDlg
47  *  Description : Delete groups and their contents
48  */
49
50 class SMESHGUI_DeleteGroupDlg : public QDialog
51 {
52   Q_OBJECT
53
54 public:
55                           SMESHGUI_DeleteGroupDlg( SMESHGUI* );
56   virtual                 ~SMESHGUI_DeleteGroupDlg();
57
58   void                    Init ();
59
60 private:
61
62   void                    closeEvent (QCloseEvent*);
63   void                    enterEvent (QEvent*);
64
65 private slots:
66
67   void                    onOk();
68   bool                    onApply();
69   void                    onClose();
70
71   void                    onDeactivate();
72
73   void                    onSelectionDone();
74
75 private:
76
77   QFrame*                 createButtonFrame (QWidget*);
78   QFrame*                 createMainFrame   (QWidget*);
79   bool                    isValid();
80
81 private:
82
83   QPushButton*            myOkBtn;
84   QPushButton*            myApplyBtn;
85   QPushButton*            myCloseBtn;
86   QListBox*               myListBox;
87
88   SMESHGUI*               mySMESHGUI;
89   SalomeApp_SelectionMgr* mySelectionMgr;
90
91   QValueList<SMESH::SMESH_GroupBase_var> myListGrp;
92   bool                                   myBlockSelection;
93 };
94
95 #endif