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
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 #include "hexa_base.hxx"
67 #include "HEXABLOCKGUI_Export.hxx"
68 typedef class HEXABLOCK_EXPORT MyBasicGUI_PointDlg : public MyGEOMBase_Skeleton
73 MyBasicGUI_PointDlg( QWidget* = 0, Qt::WindowFlags = 0 );
74 ~MyBasicGUI_PointDlg();
76 bool acceptMouseEvent() const { return ( getConstructorId() == 0 ); }
77 void OnPointSelected( const gp_Pnt& );
80 double getParameter() const;
81 double getUParameter() const;
82 double getVParameter() const;
83 void updateParamCoord(bool theIsUpdate);
88 DlgRef_3Spin* GroupXYZ;
89 DlgRef_1Sel3Spin* GroupRefPoint;
90 DlgRef_2Sel1Spin* GroupOnCurve;
91 DlgRef_2Sel* GroupLineIntersection;
92 DlgRef_1Sel2Spin* GroupOnSurface;
94 QGroupBox* myCoordGrp;
101 QGroupBox* myParamGroup;
102 QButtonGroup* myParamCoord;
106 QAction* action_line1_edge;
107 QAction* action_line1_wire;
108 QAction* action_line2_edge;
109 QAction* action_line2_wire;
112 void ConstructorsClicked( int );
113 void SetDoubleSpinBoxStep( double );
114 void ClickParamCoord( int );
115 void onBtnPopup( QAction* );
117 void onRefPointChanged(const QString& pointName);
118 void onStartPointSelected(const QString& pointName);
119 void onParamValueChanged(double newValue);
120 void onXCoordChanged(double newValue);
121 void onYCoordChanged(double newValue);
122 void onZCoordChanged(double newValue);
123 void onUpdateResults(const QString& data);
128 TopoDS_Vertex computeGeomVertex(bool preview=false);
129 TopoDS_Vertex computeGeomPointXYZ();
130 TopoDS_Vertex computeGeomPointRef();
131 TopoDS_Vertex computeGeomPointEdge();
132 TopoDS_Vertex computeGeomPointInt();
133 TopoDS_Vertex computeGeomPointSurf();
136 virtual void showEvent ( QShowEvent * event );
138 virtual bool apply(QModelIndex& result);
139 virtual void _initInputWidget( Mode editmode );
140 void updateInputs(const int constructorId);
142 TopoDS_Vertex currentVertex;
143 QMap<int, double> paramInputValue;
144 QMap<int, QVector3D*> coordsInputValue;
147 void onWindowActivated( SUIT_ViewManager* vm );
148 void updateHelpFileName();
149 virtual void onSelectionChanged( const QItemSelection& sel, const QItemSelection& unsel );
156 #endif // MYBASICGUI_POINTDLG_H