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