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.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // File : SMESHGUI_ShapeByMeshDlg.h
21 // Author : Edward AGAPOV, Open CASCADE S.A.S.
24 #ifndef SMESHGUI_SHAPEBYMESHDLG_H
25 #define SMESHGUI_SHAPEBYMESHDLG_H
28 #include "SMESH_SMESHGUI.hxx"
30 #include "SMESHGUI_Dialog.h"
31 #include "SMESHGUI_SelectionOp.h"
34 #include <SALOMEconfig.h>
35 #include CORBA_SERVER_HEADER(SMESH_Mesh)
43 * \brief Dialog to publish a sub-shape of the mesh main shape
44 * by selecting mesh elements
47 class SMESHGUI_EXPORT SMESHGUI_ShapeByMeshDlg : public SMESHGUI_Dialog
52 SMESHGUI_ShapeByMeshDlg();
53 virtual ~SMESHGUI_ShapeByMeshDlg();
56 QFrame* createMainFrame( QWidget* );
58 QGroupBox* myElemTypeBox;
59 QButtonGroup* myElemTypeGroup;
60 QLineEdit* myElementId;
61 QLineEdit* myGeomName;
63 bool myIsMultipleAllowed;
64 void setMultipleAllowed( bool );
66 friend class SMESHGUI_ShapeByMeshOp;
70 * \brief Operation to publish a sub-shape of the mesh main shape
71 * by selecting mesh elements
73 class SMESHGUI_ShapeByMeshOp: public SMESHGUI_SelectionOp
78 SMESHGUI_ShapeByMeshOp( bool = false );
79 virtual ~SMESHGUI_ShapeByMeshOp();
81 virtual LightApp_Dialog* dlg() const;
84 void SetMesh( SMESH::SMESH_Mesh_ptr );
85 SMESH::SMESH_Mesh_ptr GetMesh();
86 GEOM::GEOM_Object_ptr GetShape();
89 virtual void commitOperation();
90 virtual void startOperation();
92 void activateSelection();
93 void setElementID( const QString& );
96 virtual bool onApply();
99 void onSelectionDone();
100 void onTypeChanged( int );
101 void onElemIdChanged( const QString& );
104 SMESHGUI_ShapeByMeshDlg* myDlg;
105 SMESH::SMESH_Mesh_var myMesh;
106 GEOM::GEOM_Object_var myGeomObj;
108 bool myIsManualIdEnter;
110 bool myIsMultipleAllowed;