1 // Copyright (C) 2007-2014 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_MakeNodeAtPointDlg.h
24 // Author : Edward AGAPOV, Open CASCADE S.A.S.
26 #ifndef SMESHGUI_MAKENODEATPOINTDLG_H
27 #define SMESHGUI_MAKENODEATPOINTDLG_H
30 #include "SMESH_SMESHGUI.hxx"
32 #include "SMESHGUI_Dialog.h"
33 #include "SMESHGUI_SelectionOp.h"
41 class SMESHGUI_SpinBox;
42 class SMESHGUI_MeshEditPreview;
43 class SMESHGUI_MakeNodeAtPointDlg;
46 * \brief Operation to make a mesh pass through a point
48 class SMESHGUI_EXPORT SMESHGUI_MakeNodeAtPointOp: public SMESHGUI_SelectionOp
53 SMESHGUI_MakeNodeAtPointOp();
54 virtual ~SMESHGUI_MakeNodeAtPointOp();
56 virtual LightApp_Dialog* dlg() const;
60 virtual void startOperation();
61 virtual void stopOperation();
63 virtual void activateSelection();
65 bool isValid( QString& );
68 virtual bool onApply();
71 void onSelectionDone();
72 void redisplayPreview();
73 void onTextChange( const QString& );
74 void onUpdateDestination();
75 void onDestCoordChanged();
78 int GetConstructorId();
80 SMESHGUI_MakeNodeAtPointDlg* myDlg;
82 SUIT_SelectionFilter* myFilter;
83 int myMeshOldDisplayMode;
84 SMESHGUI_MeshEditPreview* mySimulation;
85 SMESH_Actor* myMeshActor;
87 bool myUpdateDestination;
88 bool myDestCoordChanged;
92 * \brief Dialog to make a mesh pass through a point
95 class SMESHGUI_EXPORT SMESHGUI_MakeNodeAtPointDlg : public SMESHGUI_Dialog
100 SMESHGUI_MakeNodeAtPointDlg();
103 QWidget* createMainFrame( QWidget* );
105 QWidget* myMainFrame;
107 QButtonGroup* myButtonGroup;
108 QRadioButton* myRButNodeToMove;
109 QRadioButton* myRButMoveWithoutNode;
110 QPushButton* myDestBtn;
111 QPushButton* myUpdateBtn;
112 QGroupBox* myDestinationGrp;
113 QGroupBox* myNodeToMoveGrp;
114 QPushButton* myIdBtn;
116 SMESHGUI_SpinBox* myCurrentX;
117 SMESHGUI_SpinBox* myCurrentY;
118 SMESHGUI_SpinBox* myCurrentZ;
119 SMESHGUI_SpinBox* myDestinationX;
120 SMESHGUI_SpinBox* myDestinationY;
121 SMESHGUI_SpinBox* myDestinationZ;
122 QLabel* myDestDXLabel;
123 QLabel* myDestDYLabel;
124 QLabel* myDestDZLabel;
125 SMESHGUI_SpinBox* myDestDX;
126 SMESHGUI_SpinBox* myDestDY;
127 SMESHGUI_SpinBox* myDestDZ;
128 QCheckBox* myPreviewChkBox;
130 QString myHelpFileName;
132 friend class SMESHGUI_MakeNodeAtPointOp;
135 void ButtonToggled( bool );
136 void ConstructorsClicked( int );
139 #endif // SMESHGUI_MAKENODEATPOINTDLG_H