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