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_AddNodeOnFaceDlg.h
24 // Author : Edward AGAPOV, Open CASCADE S.A.S.
26 #ifndef SMESHGUI_AddNodeOnFaceDLG_H
27 #define SMESHGUI_AddNodeOnFaceDLG_H
30 #include "SMESH_SMESHGUI.hxx"
32 #include "SMESHGUI_Dialog.h"
33 #include "SMESHGUI_InteractiveOp.h"
41 class SMESHGUI_SpinBox;
42 class SMESHGUI_MeshEditPreview;
43 class SMESHGUI_AddNodeOnFaceDlg;
47 * \brief Operation to split a face into triangles by creating a new node
48 * on the face and connecting it to the face nodes
50 class SMESHGUI_EXPORT SMESHGUI_AddNodeOnFaceOp: public SMESHGUI_InteractiveOp
55 SMESHGUI_AddNodeOnFaceOp();
56 virtual ~SMESHGUI_AddNodeOnFaceOp();
58 virtual LightApp_Dialog* dlg() const;
62 virtual void startOperation() override;
63 virtual void stopOperation() override;
65 virtual void activateSelection() override;
67 bool isValid( QString& );
69 virtual void processStyleEvents(unsigned long event,
70 void* calldata) override;
72 virtual void processInteractorEvents(unsigned long event,
73 void* calldata) override;
77 virtual bool onApply();
80 void onSelectionDone();
81 void redisplayPreview();
82 void onSelTypeChange();
83 void onTextChange( const QString& );
84 // void onDestCoordChanged();
87 void pointLocationChanged(bool);
88 void onDestCoordChanged();
91 SMESHGUI_AddNodeOnFaceDlg* myDlg;
93 SUIT_SelectionFilter* myFilter;
95 SMESHGUI_MeshEditPreview* mySimulation;
96 SMESH_Actor* myMeshActor;
98 bool myUpdateDestination;
99 bool myDestCoordChanged;
100 vtkCellPicker* myFacePicker;
104 * \brief Dialog to split a face into triangles by creating a new node
105 * on the face and connecting it to the face nodes
108 class SMESHGUI_EXPORT SMESHGUI_AddNodeOnFaceDlg : public SMESHGUI_Dialog
113 SMESHGUI_AddNodeOnFaceDlg();
116 QWidget* createMainFrame( QWidget* );
118 QWidget* myMainFrame;
120 QPushButton* myDestBtn;
121 QPushButton* myIdBtn;
123 SMESHGUI_SpinBox* myDestinationX;
124 SMESHGUI_SpinBox* myDestinationY;
125 SMESHGUI_SpinBox* myDestinationZ;
126 QCheckBox* myPointOnFace;
127 QCheckBox* myPreviewChkBox;
129 QString myHelpFileName;
131 friend class SMESHGUI_AddNodeOnFaceOp;
134 void selTypeChanged();
137 void ButtonToggled( bool );
140 #endif // SMESHGUI_AddNodeOnFaceDLG_H