1 // Copyright (C) 2007-2016 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();
80 int GetConstructorId();
82 SMESHGUI_MakeNodeAtPointDlg* myDlg;
84 SUIT_SelectionFilter* myFilter;
85 int myMeshOldDisplayMode;
87 SMESHGUI_MeshEditPreview* mySimulation;
88 SMESH_Actor* myMeshActor;
90 bool myUpdateDestination;
91 bool myDestCoordChanged;
95 * \brief Dialog to make a mesh pass through a point
98 class SMESHGUI_EXPORT SMESHGUI_MakeNodeAtPointDlg : public SMESHGUI_Dialog
103 SMESHGUI_MakeNodeAtPointDlg();
106 QWidget* createMainFrame( QWidget* );
108 QWidget* myMainFrame;
110 QButtonGroup* myButtonGroup;
111 QRadioButton* myRButNodeToMove;
112 QRadioButton* myRButMoveWithoutNode;
113 QPushButton* myDestBtn;
114 QPushButton* myUpdateBtn;
115 QGroupBox* myDestinationGrp;
116 QGroupBox* myNodeToMoveGrp;
117 QPushButton* myIdBtn;
119 SMESHGUI_SpinBox* myCurrentX;
120 SMESHGUI_SpinBox* myCurrentY;
121 SMESHGUI_SpinBox* myCurrentZ;
122 SMESHGUI_SpinBox* myDestinationX;
123 SMESHGUI_SpinBox* myDestinationY;
124 SMESHGUI_SpinBox* myDestinationZ;
125 QLabel* myDestDXLabel;
126 QLabel* myDestDYLabel;
127 QLabel* myDestDZLabel;
128 SMESHGUI_SpinBox* myDestDX;
129 SMESHGUI_SpinBox* myDestDY;
130 SMESHGUI_SpinBox* myDestDZ;
131 QCheckBox* myPreviewChkBox;
133 QString myHelpFileName;
135 friend class SMESHGUI_MakeNodeAtPointOp;
138 void ButtonToggled( bool );
139 void ConstructorsClicked( int );
142 #endif // SMESHGUI_MAKENODEATPOINTDLG_H