1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // SMESH SMESHGUI : GUI for SMESH component
23 // File : SMESHGUI_AddMeshElementDlg.h
24 // Author : Nicolas REJNERI
28 #ifndef DIALOGBOX_ADD_FACE_H
29 #define DIALOGBOX_ADD_FACE_H
31 #include "SMESH_SMESHGUI.hxx"
33 #include "LightApp_SelectionMgr.h"
35 #include "SMDSAbs_ElementType.hxx"
55 class SVTK_ViewWindow;
59 struct TElementSimulation;
63 #include <SALOMEconfig.h>
64 #include CORBA_SERVER_HEADER(SMESH_Mesh)
66 //=================================================================================
67 // class : SMESHGUI_AddMeshElementDlg
69 //=================================================================================
70 class SMESHGUI_EXPORT SMESHGUI_AddMeshElementDlg : public QDialog
75 SMESHGUI_AddMeshElementDlg( SMESHGUI*,
77 SMDSAbs_ElementType ElementType = SMDSAbs_Edge,
78 int nbNodes = 2, bool modal = FALSE, WFlags fl = 0 );
79 ~SMESHGUI_AddMeshElementDlg();
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();
89 SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
90 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
91 int myNbOkNodes; /* to check when arguments is defined */
93 SVTK_Selector* mySelector;
95 QLineEdit* myEditCurrentArgument; /* Current LineEdit */
101 SMESH::SMESH_Mesh_var myMesh;
102 SMESH_Actor* myActor;
103 SMESH::TElementSimulation* mySimulation;
105 QButtonGroup* GroupConstructors;
106 QRadioButton* Constructor1;
107 QGroupBox * GroupButtons;
108 QPushButton * buttonOk;
109 QPushButton * buttonCancel;
110 QPushButton * buttonApply;
111 QPushButton * buttonHelp;
113 QLabel * TextLabelC1A1;
114 QPushButton * SelectButtonC1A1;
115 QLineEdit * LineEditC1A1;
119 QString myHelpFileName;
124 void ClickOnCancel();
127 void SetEditCurrentArgument() ;
128 void SelectionIntoArgument() ;
129 void DeactivateActiveDialog() ;
130 void ActivateThisDialog() ;
131 void CheckBox( int );
132 void onTextChange(const QString&);
135 QGridLayout* SMESHGUI_AddMeshElementDlgLayout;
136 QGridLayout* GroupConstructorsLayout;
137 QGridLayout* GroupButtonsLayout;
138 QGridLayout* GroupC1Layout;
141 #endif // DIALOGBOX_ADD_FACE_H