1 // Copyright (C) 2007-2016 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, or (at your option) any later version.
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
23 // File : SMESHGUI_ShapeByMeshDlg.h
24 // Author : Edward AGAPOV, Open CASCADE S.A.S.
26 #ifndef SMESHGUI_SHAPEBYMESHDLG_H
27 #define SMESHGUI_SHAPEBYMESHDLG_H
30 #include "SMESH_SMESHGUI.hxx"
32 #include "SMESHGUI_Dialog.h"
33 #include "SMESHGUI_SelectionOp.h"
36 #include <SALOMEconfig.h>
37 #include CORBA_SERVER_HEADER(SMESH_Mesh)
45 * \brief Dialog to publish a sub-shape of the mesh main shape
46 * by selecting mesh elements
49 class SMESHGUI_EXPORT SMESHGUI_ShapeByMeshDlg : public SMESHGUI_Dialog
54 SMESHGUI_ShapeByMeshDlg(bool isMultipleAllowed);
55 virtual ~SMESHGUI_ShapeByMeshDlg();
58 QFrame* createMainFrame( QWidget* );
60 QGroupBox* myElemTypeBox;
61 QButtonGroup* myElemTypeGroup;
62 QLineEdit* myElementId;
63 QLineEdit* myGeomName;
65 bool myIsMultipleAllowed;
66 void setMultipleAllowed( bool );
68 friend class SMESHGUI_ShapeByMeshOp;
72 * \brief Operation to publish a sub-shape of the mesh main shape
73 * by selecting mesh elements
75 class SMESHGUI_ShapeByMeshOp: public SMESHGUI_SelectionOp
80 SMESHGUI_ShapeByMeshOp( bool = false );
81 virtual ~SMESHGUI_ShapeByMeshOp();
83 virtual LightApp_Dialog* dlg() const;
86 void SetMesh( SMESH::SMESH_Mesh_ptr );
87 SMESH::SMESH_Mesh_ptr GetMesh();
88 GEOM::GEOM_Object_ptr GetShape();
91 virtual void commitOperation();
92 virtual void startOperation();
94 void activateSelection();
95 void setElementID( const QString& );
98 virtual bool onApply();
101 void onSelectionDone();
102 void onTypeChanged( int );
103 void onElemIdChanged( const QString& );
106 SMESHGUI_ShapeByMeshDlg* myDlg;
107 SMESH::SMESH_Mesh_var myMesh;
108 GEOM::GEOM_Object_var myGeomObj;
110 bool myIsManualIdEnter;
112 bool myIsMultipleAllowed;