1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef SMESHGUI_FindElemByPointDLG_H
21 #define SMESHGUI_FindElemByPointDLG_H
24 #include "SMESH_SMESHGUI.hxx"
26 #include "SMESHGUI_Dialog.h"
27 #include "SMESHGUI_SelectionOp.h"
29 #include CORBA_SERVER_HEADER(SMESH_Mesh)
35 class SMESHGUI_SpinBox;
36 class SMESHGUI_MeshEditPreview;
37 class SMESHGUI_FindElemByPointDlg;
40 * \brief Operation to find elements by a point coordinates
42 class SMESHGUI_EXPORT SMESHGUI_FindElemByPointOp: public SMESHGUI_SelectionOp
47 SMESHGUI_FindElemByPointOp();
48 virtual ~SMESHGUI_FindElemByPointOp();
50 virtual LightApp_Dialog* dlg() const;
54 virtual void startOperation();
55 virtual void stopOperation();
57 virtual void activateSelection();
61 virtual void onFind();
62 virtual bool onApply();
67 void onSelectionDone();
68 void onElemSelected();
69 void onElemTypeChange(int);
70 void redisplayPreview();
75 SMESHGUI_FindElemByPointDlg* myDlg;
77 SUIT_SelectionFilter* myFilter;
79 SMESHGUI_MeshEditPreview* mySimulation; // to show point coordinates
80 SMESH::SMESH_IDSource_var myMeshOrPart;
81 SMESH::MeshPreviewStruct_var myPreview;
82 Handle(SALOME_InteractiveObject) myMeshIO;
86 * \brief Dialog to find elements by a point coordinates
89 class SMESHGUI_EXPORT SMESHGUI_FindElemByPointDlg : public SMESHGUI_Dialog
94 SMESHGUI_FindElemByPointDlg();
96 void setTypes(SMESH::array_of_ElementType_var & types);
99 QWidget* createMainFrame( QWidget* );
101 QLineEdit* myMeshName;
102 SMESHGUI_SpinBox* myX;
103 SMESHGUI_SpinBox* myY;
104 SMESHGUI_SpinBox* myZ;
105 QtxComboBox* myElemTypeCombo;
106 QPushButton* myFindBtn;
107 QListWidget* myFoundList;
109 QString myHelpFileName;
111 friend class SMESHGUI_FindElemByPointOp;
117 virtual void reject();
120 //void ButtonToggled( bool );
123 #endif // SMESHGUI_FindElemByPointDLG_H