Salome HOME
Update mail address
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_EditMeshDlg.h
1 // Copyright (C) 2005  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 #ifndef DIALOGBOX_GETMESH_H
22 #define DIALOGBOX_GETMESH_H
23
24 #include "LightApp_SelectionMgr.h"
25 #include "SUIT_SelectionFilter.h"
26
27 // QT Includes
28 #include <qdialog.h>
29
30 // Open CASCADE Includes
31
32 class QGridLayout;
33 class QButtonGroup;
34 class QGroupBox;
35 class QLabel;
36 class QLineEdit;
37 class QPushButton;
38 class QRadioButton;
39 class SMESHGUI;
40
41 // IDL Headers
42 #include <SALOMEconfig.h>
43 #include CORBA_SERVER_HEADER(SMESH_Mesh)
44
45 //=================================================================================
46 // class    : SMESHGUI_EditMeshDlg
47 // purpose  : 
48 //=================================================================================
49 class SMESHGUI_EditMeshDlg : public QDialog
50 {
51   Q_OBJECT;
52
53  public:
54   SMESHGUI_EditMeshDlg (SMESHGUI  * theModule,
55                         const char* title,
56                         const char* icon,
57                         int         theAction);
58   ~SMESHGUI_EditMeshDlg();
59
60  private:
61   void Init();
62   void closeEvent (QCloseEvent*);
63   void enterEvent (QEvent*);              /* mouse enter the QWidget */
64   void hideEvent  (QHideEvent*);          /* ESC key */
65
66  private:
67   SMESHGUI*               mySMESHGUI;     /* Current SMESHGUI object */
68   LightApp_SelectionMgr*  mySelectionMgr; /* User shape selection */
69
70   SMESH::SMESH_Mesh_var   myMesh;
71   SUIT_SelectionFilter*   myMeshFilter;
72
73   int myAction;
74
75   // Widgets
76   QButtonGroup* GroupConstructors;
77   QRadioButton* Constructor1;
78
79   QGroupBox* GroupButtons;
80   QPushButton* buttonOk;
81   QPushButton* buttonCancel;
82   QPushButton* buttonApply;
83   QPushButton* buttonHelp;
84
85   QGroupBox* GroupMesh;
86   QLabel* TextLabelMesh;
87   QPushButton* SelectButton;
88   QLineEdit* LineEditMesh;
89
90   //protected:
91   QGridLayout* DlgLayout;
92   QGridLayout* GroupConstructorsLayout;
93   QGridLayout* GroupButtonsLayout;
94   QGridLayout* GroupMeshLayout;
95
96   QString myHelpFileName;
97
98  private slots:
99   void ClickOnOk();
100   void ClickOnCancel();
101   void ClickOnApply();
102   void ClickOnHelp();
103   void SelectionIntoArgument();
104   void DeactivateActiveDialog();
105   void ActivateThisDialog();
106 };
107
108 #endif // DIALOGBOX_GETMESH_H