Salome HOME
09dd4ff96c82a3caf70b82ecbb3d8b82c3062ae5
[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 // File   : SMESHGUI_DeleteGroupDlg.h
21 // Author : Sergey LITONIN, Open CASCADE S.A.S.
22 //
23
24 #ifndef SMESHGUI_DELETEGROUPDLG_H
25 #define SMESHGUI_DELETEGROUPDLG_H
26
27 // SMESH includes
28 #include "SMESH_SMESHGUI.hxx"
29
30 // Qt includes
31 #include <QDialog>
32
33 // IDL includes
34 #include <SALOMEconfig.h>
35 #include CORBA_SERVER_HEADER(SMESH_Group)
36
37 class QPushButton;
38 class QListWidget;
39 class SMESHGUI;
40 class LightApp_SelectionMgr;
41
42 /*!
43  *  Class       : SMESHGUI_DeleteGroupDlg
44  *  Description : Delete groups and their contents
45  */
46
47 class SMESHGUI_EXPORT SMESHGUI_DeleteGroupDlg : public QDialog
48 {
49   Q_OBJECT
50
51 public:
52   SMESHGUI_DeleteGroupDlg( SMESHGUI* );
53   virtual ~SMESHGUI_DeleteGroupDlg();
54
55   void                    Init ();
56
57 private:
58   void                    closeEvent( QCloseEvent* );
59   void                    enterEvent( QEvent* );
60   void                    keyPressEvent( QKeyEvent* );
61
62 private slots:
63   void                    onOk();
64   bool                    onApply();
65   void                    onClose();
66   void                    onHelp();
67
68   void                    onDeactivate();
69
70   void                    onSelectionDone();
71
72 private:
73   QWidget*                createButtonFrame( QWidget* );
74   QWidget*                createMainFrame( QWidget* );
75   bool                    isValid();
76
77 private:
78   QPushButton*            myOkBtn;
79   QPushButton*            myApplyBtn;
80   QPushButton*            myCloseBtn;
81   QPushButton*            myHelpBtn;
82   QListWidget*            myListBox;
83
84   SMESHGUI*               mySMESHGUI;
85   LightApp_SelectionMgr*  mySelectionMgr;
86
87   QList<SMESH::SMESH_GroupBase_var> myListGrp;
88   bool                    myBlockSelection;
89
90   QString                 myHelpFileName;
91 };
92
93 #endif // SMESHGUI_DELETEGROUPDLG_H