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"
27 #include "MyGEOMBase_Skeleton.hxx"
30 class DlgRef_2Sel1Spin;
33 class DlgRef_1Sel3Spin;
34 class DlgRef_1Sel2Spin;
44 #include <QItemSelection>
45 #include <SUIT_ViewManager.h>
46 #include <SUIT_Session.h>
47 #include <OCCViewer_ViewWindow.h>
48 #include <OCCViewer_ViewManager.h>
50 #include "SVTK_Selection.h"
51 #include <SVTK_ViewModel.h>
57 class PatternDataSelectionModel;
62 //=================================================================================
63 // class : MyBasicGUI_PointDlg
65 //=================================================================================
66 typedef class HEXABLOCK_EXPORT MyBasicGUI_PointDlg : public MyGEOMBase_Skeleton
71 MyBasicGUI_PointDlg( QWidget* = 0, Qt::WindowFlags = 0 );
72 ~MyBasicGUI_PointDlg();
74 bool acceptMouseEvent() const { return ( getConstructorId() == 0 ); }
75 void OnPointSelected( const gp_Pnt& );
78 double getParameter() const;
79 double getUParameter() const;
80 double getVParameter() const;
81 void updateParamCoord(bool theIsUpdate);
86 DlgRef_3Spin* GroupXYZ;
87 DlgRef_1Sel3Spin* GroupRefPoint;
88 DlgRef_2Sel1Spin* GroupOnCurve;
89 DlgRef_2Sel* GroupLineIntersection;
90 DlgRef_1Sel2Spin* GroupOnSurface;
92 QGroupBox* myCoordGrp;
99 QGroupBox* myParamGroup;
100 QButtonGroup* myParamCoord;
104 QAction* action_line1_edge;
105 QAction* action_line1_wire;
106 QAction* action_line2_edge;
107 QAction* action_line2_wire;
110 void ConstructorsClicked( int );
111 void SetDoubleSpinBoxStep( double );
112 void ClickParamCoord( int );
113 void onBtnPopup( QAction* );
115 //void onRefPointChanged(const QString& pointName);
116 //void onStartPointSelected(const QString& pointName);
117 void onParamValueChanged(double newValue);
118 void onXCoordChanged(double newValue);
119 void onYCoordChanged(double newValue);
120 void onZCoordChanged(double newValue);
121 void onUpdateResults(const QString& data);
126 TopoDS_Vertex computeGeomVertex(bool preview=false);
127 TopoDS_Vertex computeGeomPointXYZ();
128 TopoDS_Vertex computeGeomPointRef();
129 TopoDS_Vertex computeGeomPointEdge();
130 TopoDS_Vertex computeGeomPointInt();
131 TopoDS_Vertex computeGeomPointSurf();
134 virtual void showEvent ( QShowEvent * event );
136 virtual bool apply(QModelIndex& result);
137 virtual void _initInputWidget( Mode editmode );
138 void updateInputs(const int constructorId);
140 TopoDS_Vertex currentVertex;
141 QMap<int, double> paramInputValue;
142 QMap<int, QVector3D*> coordsInputValue;
145 void onWindowActivated( SUIT_ViewManager* vm );
146 void updateHelpFileName();
147 virtual void onSelectionChanged( const QItemSelection& sel, const QItemSelection& unsel );
154 #endif // MYBASICGUI_POINTDLG_H