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 // File : SMESHGUI_ShapeByMeshDlg.h
23 // Author : Edward AGAPOV, Open CASCADE S.A.S.
25 #ifndef SMESHGUI_SHAPEBYMESHDLG_H
26 #define SMESHGUI_SHAPEBYMESHDLG_H
29 #include "SMESH_SMESHGUI.hxx"
31 #include "SMESHGUI_Dialog.h"
32 #include "SMESHGUI_SelectionOp.h"
35 #include <SALOMEconfig.h>
36 #include CORBA_SERVER_HEADER(SMESH_Mesh)
44 * \brief Dialog to publish a sub-shape of the mesh main shape
45 * by selecting mesh elements
48 class SMESHGUI_EXPORT SMESHGUI_ShapeByMeshDlg : public SMESHGUI_Dialog
53 SMESHGUI_ShapeByMeshDlg();
54 virtual ~SMESHGUI_ShapeByMeshDlg();
57 QFrame* createMainFrame( QWidget* );
59 QGroupBox* myElemTypeBox;
60 QButtonGroup* myElemTypeGroup;
61 QLineEdit* myElementId;
62 QLineEdit* myGeomName;
64 bool myIsMultipleAllowed;
65 void setMultipleAllowed( bool );
67 friend class SMESHGUI_ShapeByMeshOp;
71 * \brief Operation to publish a sub-shape of the mesh main shape
72 * by selecting mesh elements
74 class SMESHGUI_ShapeByMeshOp: public SMESHGUI_SelectionOp
79 SMESHGUI_ShapeByMeshOp( bool = false );
80 virtual ~SMESHGUI_ShapeByMeshOp();
82 virtual LightApp_Dialog* dlg() const;
85 void SetMesh( SMESH::SMESH_Mesh_ptr );
86 SMESH::SMESH_Mesh_ptr GetMesh();
87 GEOM::GEOM_Object_ptr GetShape();
90 virtual void commitOperation();
91 virtual void startOperation();
93 void activateSelection();
94 void setElementID( const QString& );
97 virtual bool onApply();
100 void onSelectionDone();
101 void onTypeChanged( int );
102 void onElemIdChanged( const QString& );
105 SMESHGUI_ShapeByMeshDlg* myDlg;
106 SMESH::SMESH_Mesh_var myMesh;
107 GEOM::GEOM_Object_var myGeomObj;
109 bool myIsManualIdEnter;
111 bool myIsMultipleAllowed;