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
30 #include "SMESHGUI_Dialog.h"
31 #include "SMESHGUI_SelectionOp.h"
34 #include <SALOMEconfig.h>
35 #include CORBA_SERVER_HEADER(GEOM_Gen)
36 #include CORBA_SERVER_HEADER(SMESH_Mesh)
42 class LightApp_SelectionMgr;
43 class SVTK_ViewWindow;
48 * \brief Dialog to publish a sub-shape of the mesh main shape
49 * by selecting mesh elements
52 class SMESHGUI_ShapeByMeshDlg : public SMESHGUI_Dialog
57 SMESHGUI_ShapeByMeshDlg();
58 virtual ~SMESHGUI_ShapeByMeshDlg();
62 // void closeEvent (QCloseEvent* e);
63 // void enterEvent (QEvent*);
67 //QFrame* createButtonFrame (QWidget*);
68 QFrame* createMainFrame (QWidget*);
69 //void displayPreview();
70 //void erasePreview();
73 QButtonGroup* myElemTypeGroup;
74 QLineEdit* myElementId;
75 QLineEdit* myGeomName;
77 // QPushButton* myOkBtn;
78 // QPushButton* myCloseBtn;
80 // SMESHGUI* mySMESHGUI;
81 // LightApp_SelectionMgr* mySelectionMgr;
82 // SVTK_ViewWindow* myViewWindow;
84 friend class SMESHGUI_ShapeByMeshOp;
87 class SMESHGUI_ShapeByMeshOp: public SMESHGUI_SelectionOp
92 SMESHGUI_ShapeByMeshOp();
93 virtual ~SMESHGUI_ShapeByMeshOp();
95 virtual LightApp_Dialog* dlg() const;
98 void SetMesh (SMESH::SMESH_Mesh_ptr);
99 SMESH::SMESH_Mesh_ptr GetMesh () { return myMesh; }
100 GEOM::GEOM_Object_ptr GetShape();
104 virtual void commitOperation();
105 virtual void startOperation();
106 //virtual void selectionDone();
107 //virtual SUIT_SelectionFilter* createFilter( const int ) const;
108 //virtual bool isValid( SUIT_Operation* ) const;
110 void activateSelection();
111 void setElementID(const QString&);
115 /* void PublishShape(); */
120 virtual bool onApply() { return true; }
121 /* void onCreateHyp( const int theHypType, const int theIndex ); */
122 /* void onEditHyp( const int theHypType, const int theIndex ); */
123 /* void onHypoSet( const QString& theSetName ); */
124 /* void onGeomSelectionByMesh( bool ); */
125 /* void onPublishShapeByMeshDlg(); */
126 /* void onCloseShapeByMeshDlg(); */
133 // void onDeactivate();
135 void onSelectionDone();
136 void onTypeChanged (int);
137 void onElemIdChanged (const QString&);
141 SMESHGUI_ShapeByMeshDlg* myDlg;
142 SMESH::SMESH_Mesh_var myMesh;
143 GEOM::GEOM_Object_var myGeomObj;
145 bool myIsManualIdEnter;