Version: 9.16.0
SMESHGUI_ShapeByMeshDlg.h
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, OPEN CASCADE
2//
3// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5//
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.
10//
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.
15//
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
19//
20// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21//
22
23// File : SMESHGUI_ShapeByMeshDlg.h
24// Author : Edward AGAPOV, Open CASCADE S.A.S.
25//
26#ifndef SMESHGUI_SHAPEBYMESHDLG_H
27#define SMESHGUI_SHAPEBYMESHDLG_H
28
29// SMESH includes
30#include "SMESH_SMESHGUI.hxx"
31
32#include "SMESHGUI_Dialog.h"
34
35// IDL includes
36#include <SALOMEconfig.h>
37#include CORBA_SERVER_HEADER(SMESH_Mesh)
38
39class QFrame;
40class QLineEdit;
41class QButtonGroup;
42class QGroupBox;
43
50{
51 Q_OBJECT
52
53public:
54 SMESHGUI_ShapeByMeshDlg(bool isMultipleAllowed);
56
57private:
58 QFrame* createMainFrame( QWidget* );
59
61 QButtonGroup* myElemTypeGroup;
62 QLineEdit* myElementId;
63 QLineEdit* myGeomName;
64
66 void setMultipleAllowed( bool );
67
69};
70
76{
77 Q_OBJECT
78
79public:
80 SMESHGUI_ShapeByMeshOp( bool = false );
82
83 virtual LightApp_Dialog* dlg() const;
84
85 void Init();
86 void SetMesh( SMESH::SMESH_Mesh_ptr );
87 SMESH::SMESH_Mesh_ptr GetMesh();
88 GEOM::GEOM_Object_ptr GetShape();
89
90protected:
91 virtual void commitOperation();
92 virtual void startOperation();
93
94 void activateSelection();
95 void setElementID( const QString& );
96
97protected slots:
98 virtual bool onApply();
99
100private slots:
101 void onSelectionDone();
102 void onTypeChanged( int );
103 void onElemIdChanged( const QString& );
104
105private:
107 SMESH::SMESH_Mesh_var myMesh;
108 GEOM::GEOM_Object_var myGeomObj;
109
113};
114
115#endif
#define SMESHGUI_EXPORT
Definition: SMESH_SMESHGUI.hxx:36
Definition: SMESHGUI_Dialog.h:44
Definition: SMESHGUI_SelectionOp.h:58
Dialog to publish a sub-shape of the mesh main shape by selecting mesh elements.
Definition: SMESHGUI_ShapeByMeshDlg.h:50
QButtonGroup * myElemTypeGroup
Definition: SMESHGUI_ShapeByMeshDlg.h:61
QLineEdit * myGeomName
Definition: SMESHGUI_ShapeByMeshDlg.h:63
bool myIsMultipleAllowed
Definition: SMESHGUI_ShapeByMeshDlg.h:65
QLineEdit * myElementId
Definition: SMESHGUI_ShapeByMeshDlg.h:62
QGroupBox * myElemTypeBox
Definition: SMESHGUI_ShapeByMeshDlg.h:60
Operation to publish a sub-shape of the mesh main shape by selecting mesh elements.
Definition: SMESHGUI_ShapeByMeshDlg.h:76
SMESH::SMESH_Mesh_ptr GetMesh()
Definition: SMESHGUI_ShapeByMeshDlg.cxx:222
void SetMesh(SMESH::SMESH_Mesh_ptr)
Definition: SMESHGUI_ShapeByMeshDlg.cxx:241
GEOM::GEOM_Object_var myGeomObj
Definition: SMESHGUI_ShapeByMeshDlg.h:108
SMESH::SMESH_Mesh_var myMesh
Definition: SMESHGUI_ShapeByMeshDlg.h:107
void setElementID(const QString &)
Definition: SMESHGUI_ShapeByMeshDlg.cxx:529
void activateSelection()
Definition: SMESHGUI_ShapeByMeshDlg.cxx:443
virtual ~SMESHGUI_ShapeByMeshOp()
Destructor.
Definition: SMESHGUI_ShapeByMeshDlg.cxx:205
bool myIsMultipleAllowed
Definition: SMESHGUI_ShapeByMeshDlg.h:112
virtual LightApp_Dialog * dlg() const
Gets dialog of this operation.
Definition: SMESHGUI_ShapeByMeshDlg.cxx:217
virtual bool onApply()
Definition: SMESHGUI_ShapeByMeshDlg.cxx:402
GEOM::GEOM_Object_ptr GetShape()
Definition: SMESHGUI_ShapeByMeshDlg.cxx:231
bool myIsManualIdEnter
Definition: SMESHGUI_ShapeByMeshDlg.h:110
virtual void startOperation()
This enumeration is used in typeById method to distinguish objects, mesh nodes and mesh elements,...
Definition: SMESHGUI_ShapeByMeshDlg.cxx:187
SMESHGUI_ShapeByMeshDlg * myDlg
Definition: SMESHGUI_ShapeByMeshDlg.h:106
void onSelectionDone()
Definition: SMESHGUI_ShapeByMeshDlg.cxx:411
void onElemIdChanged(const QString &)
Definition: SMESHGUI_ShapeByMeshDlg.cxx:484
SMESHGUI_ShapeByMeshOp(bool=false)
Constructor.
Definition: SMESHGUI_ShapeByMeshDlg.cxx:170
virtual void commitOperation()
Definition: SMESHGUI_ShapeByMeshDlg.cxx:306
bool myHasSolids
Definition: SMESHGUI_ShapeByMeshDlg.h:111
void onTypeChanged(int)
Definition: SMESHGUI_ShapeByMeshDlg.cxx:472