1 // Copyright (C) 2007-2022 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_AddNodeOnSegmentDlg.h
24 // Author : Edward AGAPOV, Open CASCADE S.A.S.
26 #ifndef SMESHGUI_AddNodeOnSegmentDLG_H
27 #define SMESHGUI_AddNodeOnSegmentDLG_H
29 #include "SMESHGUI_Dialog.h"
30 #include "SMESHGUI_InteractiveOp.h"
38 class SMESHGUI_SpinBox;
39 class SMESHGUI_MeshEditPreview;
40 class SMESHGUI_AddNodeOnSegmentDlg;
43 * \brief Operation to make a mesh pass through a point
45 class SMESHGUI_EXPORT SMESHGUI_AddNodeOnSegmentOp: public SMESHGUI_InteractiveOp
50 SMESHGUI_AddNodeOnSegmentOp();
51 virtual ~SMESHGUI_AddNodeOnSegmentOp();
53 virtual LightApp_Dialog* dlg() const;
57 virtual void startOperation() override;
58 virtual void stopOperation() override;
60 virtual void activateSelection();
62 bool isValid( QString&, SMESH::smIdType& n1, SMESH::smIdType& n2 );
64 virtual void processStyleEvents(unsigned long event,
65 void* calldata) override;
67 virtual void processInteractorEvents(unsigned long event,
68 void* calldata) override;
72 virtual bool onApply() override;
76 void onSelectionDone();
77 void redisplayPreview();
78 void onTextChange( const QString& );
79 void onSelTypeChange();
85 SMESHGUI_AddNodeOnSegmentDlg* myDlg;
88 SMESHGUI_MeshEditPreview* mySimulation;
89 SMESH_Actor* myMeshActor;
94 * \brief Dialog to make a mesh pass through a point
97 class SMESHGUI_EXPORT SMESHGUI_AddNodeOnSegmentDlg : public SMESHGUI_Dialog
102 SMESHGUI_AddNodeOnSegmentDlg();
106 void selTypeChanged();
109 QWidget* createMainFrame( QWidget* );
111 QPushButton* mySegmentBtn;
112 QLineEdit* mySegment;
113 QPushButton* myPositionBtn;
114 SMESHGUI_SpinBox* myPositionSpin;
115 QCheckBox* myPreviewChkBox;
117 QString myHelpFileName;
119 friend class SMESHGUI_AddNodeOnSegmentOp;
122 void ButtonToggled( bool );
125 #endif // SMESHGUI_AddNodeOnSegmentDLG_H