1 // Copyright (C) 2009-2013 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #ifndef MYBASICGUI_POINTDLG_H
22 #define MYBASICGUI_POINTDLG_H
24 #include "HEXABLOCKGUI_Export.hxx"
26 #include "MyGEOMBase_Skeleton.hxx"
29 class MyDlgRef_2Sel1Spin;
32 class MyDlgRef_1Sel3Spin;
33 class MyDlgRef_1Sel2Spin;
43 #include <QItemSelection>
44 #include <SUIT_ViewManager.h>
45 #include <SUIT_Session.h>
46 #include <OCCViewer_ViewWindow.h>
47 #include <OCCViewer_ViewManager.h>
49 #include "SVTK_Selection.h"
50 #include <SVTK_ViewModel.h>
56 class PatternDataSelectionModel;
61 //=================================================================================
62 // class : MyBasicGUI_PointDlg
64 //=================================================================================
65 typedef class HEXABLOCK_EXPORT MyBasicGUI_PointDlg : public MyGEOMBase_Skeleton
70 MyBasicGUI_PointDlg( QWidget* = 0, Qt::WindowFlags = 0 );
71 ~MyBasicGUI_PointDlg();
73 bool acceptMouseEvent() const { return ( getConstructorId() == 0 ); }
74 void OnPointSelected( const gp_Pnt& );
77 double getParameter() const;
78 double getUParameter() const;
79 double getVParameter() const;
80 void updateParamCoord(bool theIsUpdate);
85 MyDlgRef_3Spin* GroupXYZ;
86 MyDlgRef_1Sel3Spin* GroupRefPoint;
87 MyDlgRef_2Sel1Spin* GroupOnCurve;
88 MyDlgRef_2Sel* GroupLineIntersection;
89 MyDlgRef_1Sel2Spin* GroupOnSurface;
91 QGroupBox* myCoordGrp;
98 QGroupBox* myParamGroup;
99 QButtonGroup* myParamCoord;
103 QAction* action_line1_edge;
104 QAction* action_line1_wire;
105 QAction* action_line2_edge;
106 QAction* action_line2_wire;
109 void ConstructorsClicked( int );
110 void SetDoubleSpinBoxStep( double );
111 void ClickParamCoord( int );
112 void onBtnPopup( QAction* );
114 // void onRefPointChanged(const QString& pointName);
115 // void onStartPointSelected(const QString& pointName);
116 void onParamValueChanged(double newValue);
117 void onXCoordChanged(double newValue);
118 void onYCoordChanged(double newValue);
119 void onZCoordChanged(double newValue);
120 void onUpdateResults(const QString& data);
125 TopoDS_Vertex computeGeomVertex(bool preview=false);
126 TopoDS_Vertex computeGeomPointXYZ();
127 TopoDS_Vertex computeGeomPointRef();
128 TopoDS_Vertex computeGeomPointEdge();
129 TopoDS_Vertex computeGeomPointInt();
130 TopoDS_Vertex computeGeomPointSurf();
133 virtual void showEvent ( QShowEvent * event );
135 virtual bool apply(QModelIndex& result);
136 virtual void _initInputWidget( Mode editmode );
137 void updateInputs(const int constructorId);
139 TopoDS_Vertex currentVertex;
140 QMap<int, double> paramInputValue;
141 QMap<int, QVector3D*> coordsInputValue;
144 void onWindowActivated( SUIT_ViewManager* vm );
145 void updateHelpFileName();
146 virtual void onSelectionChanged( const QItemSelection& sel, const QItemSelection& unsel );
153 #endif // MYBASICGUI_POINTDLG_H