Salome HOME
Fix bug 12796: Warning missed for the bad file 'test18.med'
[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.salome-platform.org/ or email : webmaster.salome@opencascade.com
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 LightApp_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   void                    keyPressEvent(QKeyEvent*);
65
66 private slots:
67
68   void                    onOk();
69   bool                    onApply();
70   void                    onClose();
71   void                    onHelp();
72
73   void                    onDeactivate();
74
75   void                    onSelectionDone();
76
77 private:
78
79   QFrame*                 createButtonFrame (QWidget*);
80   QFrame*                 createMainFrame   (QWidget*);
81   bool                    isValid();
82
83 private:
84
85   QPushButton*            myOkBtn;
86   QPushButton*            myApplyBtn;
87   QPushButton*            myCloseBtn;
88   QPushButton*            myHelpBtn;
89   QListBox*               myListBox;
90
91   SMESHGUI*               mySMESHGUI;
92   LightApp_SelectionMgr*  mySelectionMgr;
93
94   QValueList<SMESH::SMESH_GroupBase_var> myListGrp;
95   bool                                   myBlockSelection;
96
97   QString                 myHelpFileName;
98 };
99
100 #endif