Salome HOME
PAL15429 Computation of the mesh, based on "014.brep" via Tetrahedron(NETGEN), is...
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_AddMeshElementDlg.h
1 //  Copyright (C) 2007-2008  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 //  SMESH SMESHGUI : GUI for SMESH component
23 //  File   : SMESHGUI_AddMeshElementDlg.h
24 //  Author : Nicolas REJNERI
25 //  Module : SMESH
26 //  $Header$
27 //
28 #ifndef DIALOGBOX_ADD_FACE_H
29 #define DIALOGBOX_ADD_FACE_H
30
31 #include "SMESH_SMESHGUI.hxx"
32
33 #include "LightApp_SelectionMgr.h"
34
35 #include "SMDSAbs_ElementType.hxx"
36
37
38 // QT Includes
39 #include <qvariant.h>
40 #include <qdialog.h>
41
42 class QVBoxLayout; 
43 class QHBoxLayout; 
44 class QGridLayout; 
45 class QButtonGroup;
46 class QGroupBox;
47 class QLabel;
48 class QLineEdit;
49 class QPushButton;
50 class QRadioButton;
51 class QCheckBox;
52 class SMESHGUI;
53 class SMESH_Actor;
54 class SMDS_Mesh;
55 class SVTK_ViewWindow;
56 class SVTK_Selector;
57
58 namespace SMESH{
59   struct TElementSimulation;
60 }
61
62 // IDL Headers
63 #include <SALOMEconfig.h>
64 #include CORBA_SERVER_HEADER(SMESH_Mesh)
65
66 //=================================================================================
67 // class    : SMESHGUI_AddMeshElementDlg
68 // purpose  :
69 //=================================================================================
70 class SMESHGUI_EXPORT SMESHGUI_AddMeshElementDlg : public QDialog
71
72     Q_OBJECT
73
74 public:
75     SMESHGUI_AddMeshElementDlg( SMESHGUI*,
76                                 const char* = 0, 
77                                 SMDSAbs_ElementType ElementType = SMDSAbs_Edge,
78                                 int nbNodes = 2, bool modal = FALSE, WFlags fl = 0 );
79     ~SMESHGUI_AddMeshElementDlg();
80
81 private:
82     void Init ();
83     void closeEvent (QCloseEvent*);
84     void hideEvent (QHideEvent*);                 /* ESC key */
85     void enterEvent (QEvent*);                    /* mouse enter the QWidget */
86     void keyPressEvent(QKeyEvent*);
87     void displaySimulation();
88
89     SMESHGUI*                   mySMESHGUI;              /* Current SMESHGUI object */
90     LightApp_SelectionMgr*      mySelectionMgr;          /* User shape selection */
91     int                         myNbOkNodes;               /* to check when arguments is defined */
92     bool                        myBusy;
93     SVTK_Selector*              mySelector;
94
95     QLineEdit*                  myEditCurrentArgument;   /* Current  LineEdit */
96
97     int                         myElementType;
98     int                         myNbNodes;
99     bool                        myIsPoly;
100
101     SMESH::SMESH_Mesh_var       myMesh;
102     SMESH_Actor*                myActor;
103     SMESH::TElementSimulation*  mySimulation;
104     
105     QButtonGroup* GroupConstructors;
106     QRadioButton* Constructor1;
107     QGroupBox   * GroupButtons;
108     QPushButton * buttonOk;
109     QPushButton * buttonCancel;
110     QPushButton * buttonApply;
111     QPushButton * buttonHelp;
112     QGroupBox   * GroupC1;
113     QLabel      * TextLabelC1A1;
114     QPushButton * SelectButtonC1A1;
115     QLineEdit   * LineEditC1A1;
116
117     QCheckBox   * Reverse;
118
119     QString       myHelpFileName;
120
121 private slots:
122
123     void ClickOnOk();
124     void ClickOnCancel();
125     void ClickOnApply();
126     void ClickOnHelp();
127     void SetEditCurrentArgument() ;
128     void SelectionIntoArgument() ;
129     void DeactivateActiveDialog() ;
130     void ActivateThisDialog() ;
131     void CheckBox( int );
132     void onTextChange(const QString&);
133
134 protected:
135     QGridLayout* SMESHGUI_AddMeshElementDlgLayout;
136     QGridLayout* GroupConstructorsLayout;
137     QGridLayout* GroupButtonsLayout;
138     QGridLayout* GroupC1Layout;
139 };
140
141 #endif // DIALOGBOX_ADD_FACE_H