1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
18 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
22 // File : SMESHGUI_ShapeByMeshDlg.h
23 // Author : Edward AGAPOV
27 #ifndef SMESHGUI_ShapeByMeshDlg_H
28 #define SMESHGUI_ShapeByMeshDlg_H
33 #include <SALOMEconfig.h>
34 #include CORBA_SERVER_HEADER(GEOM_Gen)
35 #include CORBA_SERVER_HEADER(SMESH_Mesh)
41 class LightApp_SelectionMgr;
42 class SVTK_ViewWindow;
47 * \brief Dialog to publish a sub-shape of the mesh main shape
48 * by selecting mesh elements
51 class SMESHGUI_ShapeByMeshDlg : public QDialog
56 SMESHGUI_ShapeByMeshDlg( SMESHGUI* theModule,
57 const char* theName = 0);
58 virtual ~SMESHGUI_ShapeByMeshDlg();
61 void SetMesh (SMESH::SMESH_Mesh_ptr);
62 SMESH::SMESH_Mesh_ptr GetMesh () { return myMesh; }
63 GEOM::GEOM_Object_ptr GetShape();
72 void closeEvent (QCloseEvent* e);
73 void enterEvent (QEvent*);
82 void onSelectionDone();
83 void onTypeChanged (int);
84 void onElemIdChanged (const QString&);
88 QFrame* createButtonFrame (QWidget*);
89 QFrame* createMainFrame (QWidget*);
90 //void displayPreview();
91 //void erasePreview();
92 void activateSelection();
93 void setElementID(const QString&);
97 QButtonGroup* myElemTypeGroup;
98 QLineEdit* myElementId;
99 QLineEdit* myGeomName;
101 QPushButton* myOkBtn;
102 QPushButton* myCloseBtn;
104 SMESHGUI* mySMESHGUI;
105 LightApp_SelectionMgr* mySelectionMgr;
106 SVTK_ViewWindow* myViewWindow;
108 SMESH::SMESH_Mesh_var myMesh;
109 GEOM::GEOM_Object_var myGeomObj;
111 bool myIsManualIdEnter;