1 // Copyright (C) 2009-2014 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, or (at your option) any later version.
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);
83 MyDlgRef_3Spin* GroupXYZ;
84 MyDlgRef_1Sel3Spin* GroupRefPoint;
85 MyDlgRef_2Sel1Spin* GroupOnCurve;
86 MyDlgRef_2Sel* GroupLineIntersection;
87 MyDlgRef_1Sel2Spin* GroupOnSurface;
89 QGroupBox* myCoordGrp;
96 QGroupBox* myParamGroup;
97 QButtonGroup* myParamCoord;
101 QAction* action_line1_edge;
102 QAction* action_line1_wire;
103 QAction* action_line2_edge;
104 QAction* action_line2_wire;
107 void ConstructorsClicked( int );
108 void SetDoubleSpinBoxStep( double );
109 void ClickParamCoord( int );
110 void onBtnPopup( QAction* );
112 // void onRefPointChanged(const QString& pointName);
113 // void onStartPointSelected(const QString& pointName);
114 void onParamValueChanged(double newValue);
115 void onXCoordChanged(double newValue);
116 void onYCoordChanged(double newValue);
117 void onZCoordChanged(double newValue);
118 void onUpdateResults(const QString& data);
123 TopoDS_Vertex computeGeomVertex(bool preview=false);
124 TopoDS_Vertex computeGeomPointXYZ();
125 TopoDS_Vertex computeGeomPointRef();
126 TopoDS_Vertex computeGeomPointEdge();
127 TopoDS_Vertex computeGeomPointInt();
128 TopoDS_Vertex computeGeomPointSurf();
131 virtual void showEvent ( QShowEvent * event );
133 virtual bool apply(QModelIndex& result);
134 virtual void _initInputWidget( Mode editmode );
135 void updateInputs(const int constructorId);
137 TopoDS_Vertex currentVertex;
138 QMap<int, double> paramInputValue;
139 QMap<int, QVector3D*> coordsInputValue;
142 void onWindowActivated( SUIT_ViewManager* vm );
143 void updateHelpFileName();
144 virtual void onSelectionChanged( const QItemSelection& sel, const QItemSelection& unsel );
151 #endif // MYBASICGUI_POINTDLG_H