1 // Copyright (C) 2007-2021 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_InteractiveOp.h"
35 #include <vtkSmartPointer.h>
43 class SMESHGUI_SpinBox;
44 class SMESHGUI_MeshEditPreview;
45 class SMESHGUI_MakeNodeAtPointDlg;
49 * \brief Operation to make a mesh pass through a point
51 class SMESHGUI_EXPORT SMESHGUI_MakeNodeAtPointOp: public SMESHGUI_InteractiveOp
56 SMESHGUI_MakeNodeAtPointOp(int defaultConstructor = 0);
57 virtual ~SMESHGUI_MakeNodeAtPointOp();
59 virtual LightApp_Dialog* dlg() const;
63 virtual void startOperation() override;
64 virtual void stopOperation() override;
66 virtual void activateSelection() override;
68 bool isValid( QString& );
70 virtual void processStyleEvents(unsigned long event,
71 void* calldata) override;
73 virtual void processInteractorEvents(unsigned long event,
74 void* calldata) override;
77 virtual bool onApply();
80 void onSelectionDone();
81 void redisplayPreview();
82 void onTextChange( const QString& );
83 void onUpdateDestination();
84 void onDestCoordChanged();
87 void constructorChanged();
90 int GetConstructorId();
92 int myDefaultConstructor;
93 SMESHGUI_MakeNodeAtPointDlg* myDlg;
95 SUIT_SelectionFilter* myFilter;
97 SMESHGUI_MeshEditPreview* mySimulation;
98 SMESH_Actor* myMeshActor;
100 bool myUpdateDestination;
101 bool myDestCoordChanged;
105 * \brief Dialog to make a mesh pass through a point
108 class SMESHGUI_EXPORT SMESHGUI_MakeNodeAtPointDlg : public SMESHGUI_Dialog
113 SMESHGUI_MakeNodeAtPointDlg();
116 QWidget* createMainFrame( QWidget* );
118 QWidget* myMainFrame;
120 QButtonGroup* myButtonGroup;
121 QRadioButton* myRButNodeToMove;
122 QRadioButton* myRButMoveWithoutNode;
123 QRadioButton* myRButMoveInteractive;
124 QPushButton* myDestBtn;
125 QPushButton* myUpdateBtn;
126 QGroupBox* myDestinationGrp;
127 QGroupBox* myNodeToMoveGrp;
128 QPushButton* myIdBtn;
130 SMESHGUI_SpinBox* myCurrentX;
131 SMESHGUI_SpinBox* myCurrentY;
132 SMESHGUI_SpinBox* myCurrentZ;
133 SMESHGUI_SpinBox* myDestinationX;
134 SMESHGUI_SpinBox* myDestinationY;
135 SMESHGUI_SpinBox* myDestinationZ;
136 QLabel* myDestDXLabel;
137 QLabel* myDestDYLabel;
138 QLabel* myDestDZLabel;
139 SMESHGUI_SpinBox* myDestDX;
140 SMESHGUI_SpinBox* myDestDY;
141 SMESHGUI_SpinBox* myDestDZ;
142 QCheckBox* myPreviewChkBox;
144 QString myHelpFileName;
146 friend class SMESHGUI_MakeNodeAtPointOp;
149 void ButtonToggled( bool );
150 void ConstructorsClicked( int );
153 #endif // SMESHGUI_MAKENODEATPOINTDLG_H