X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHEXABLOCKGUI%2FMyBasicGUI_PointDlg.hxx;h=16982661a012e6be62a8ab6a61e14adeec3d6a00;hb=5347e8abe119e8704d59c83638836f0fd94c732e;hp=0598c0ee521b2ec379cd4662628991aee0d2e7d2;hpb=6b02c4b9784848b0a660e0e54f88447af8433c50;p=modules%2Fhexablock.git diff --git a/src/HEXABLOCKGUI/MyBasicGUI_PointDlg.hxx b/src/HEXABLOCKGUI/MyBasicGUI_PointDlg.hxx index 0598c0e..1698266 100755 --- a/src/HEXABLOCKGUI/MyBasicGUI_PointDlg.hxx +++ b/src/HEXABLOCKGUI/MyBasicGUI_PointDlg.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2009-2012 CEA/DEN, EDF R&D +// Copyright (C) 2009-2013 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -21,18 +21,16 @@ #ifndef MYBASICGUI_POINTDLG_H #define MYBASICGUI_POINTDLG_H - - +#include "HEXABLOCKGUI_Export.hxx" #include "MyGEOMBase_Skeleton.hxx" -#include "GEOM_GenericObjPtr.h" #include -class DlgRef_2Sel1Spin; -class DlgRef_3Spin; -class DlgRef_2Sel; -class DlgRef_1Sel3Spin; -class DlgRef_1Sel2Spin; +class MyDlgRef_2Sel1Spin; +class MyDlgRef_3Spin; +class MyDlgRef_2Sel; +class MyDlgRef_1Sel3Spin; +class MyDlgRef_1Sel2Spin; class QLineEdit; class QGroupBox; @@ -47,9 +45,6 @@ class gp_Pnt; #include #include #include -// #include - - #include "SVTK_Selection.h" #include @@ -67,112 +62,88 @@ namespace HEXABLOCK // class : MyBasicGUI_PointDlg // purpose : //================================================================================= -typedef class MyBasicGUI_PointDlg : public MyGEOMBase_Skeleton -{ +typedef class HEXABLOCK_EXPORT MyBasicGUI_PointDlg : public MyGEOMBase_Skeleton +{ Q_OBJECT public: - MyBasicGUI_PointDlg( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0 ); + MyBasicGUI_PointDlg( QWidget* = 0, Qt::WindowFlags = 0 ); ~MyBasicGUI_PointDlg(); bool acceptMouseEvent() const { return ( getConstructorId() == 0 ); } - void OnPointSelected( const gp_Pnt& ); // called by BasicGUI::OnMousePress() - -protected: - // redefined from GEOMBase_Helper - - virtual GEOM::GEOM_IOperations_ptr createOperation(); - virtual bool isValid( QString& ); - virtual bool execute( ObjectList& ); - virtual void addSubshapesToStudy(); + void OnPointSelected( const gp_Pnt& ); private: - void Init(); - void enterEvent( QEvent* ); double getParameter() const; double getUParameter() const; double getVParameter() const; void updateParamCoord(bool theIsUpdate); private: - GEOM::GeomObjPtr myEdge; - GEOM::GeomObjPtr myFace; - GEOM::GeomObjPtr myRefPoint; - GEOM::GeomObjPtr myLine1; - GEOM::GeomObjPtr myLine2; - bool myBusy; - DlgRef_3Spin* GroupXYZ; - DlgRef_1Sel3Spin* GroupRefPoint; - DlgRef_2Sel1Spin* GroupOnCurve; - DlgRef_2Sel* GroupLineIntersection; - DlgRef_1Sel2Spin* GroupOnSurface; - + MyDlgRef_3Spin* GroupXYZ; + MyDlgRef_1Sel3Spin* GroupRefPoint; + MyDlgRef_2Sel1Spin* GroupOnCurve; + MyDlgRef_2Sel* GroupLineIntersection; + MyDlgRef_1Sel2Spin* GroupOnSurface; + QGroupBox* myCoordGrp; QLineEdit* myX; QLineEdit* myY; QLineEdit* myZ; - + QGroupBox* myParamGroup; QButtonGroup* myParamCoord; QMenu* myBtnPopup; - QMap myActions; - - TopAbs_ShapeEnum myNeedType; - + QMenu* myBtnPopup2; + QAction* action_line1_edge; + QAction* action_line1_wire; + QAction* action_line2_edge; + QAction* action_line2_wire; -public slots: - virtual void onHelpRequested(); - private slots: - void ClickOnOk(); - bool ClickOnApply(); - void ActivateThisDialog(); - void DeactivateActiveDialog(); - void SelectionIntoArgument(); - void SetEditCurrentArgument(); void ConstructorsClicked( int ); - void ValueChangedInSpinBox( double ); void SetDoubleSpinBoxStep( double ); void ClickParamCoord( int ); - void CheckBoxClicked( int ); void onBtnPopup( QAction* ); void updateSize(); + // void onRefPointChanged(const QString& pointName); + // void onStartPointSelected(const QString& pointName); + void onParamValueChanged(double newValue); + void onXCoordChanged(double newValue); + void onYCoordChanged(double newValue); + void onZCoordChanged(double newValue); + void onUpdateResults(const QString& data); // HEXABLOCK public: - void setDocumentModel( HEXABLOCK::GUI::DocumentModel* m ); - void setPatternDataSelectionModel( HEXABLOCK::GUI::PatternDataSelectionModel* s ); - bool onAccept( const bool publish = true, const bool useTransaction = true ); void clear(); + TopoDS_Vertex computeGeomVertex(bool preview=false); + TopoDS_Vertex computeGeomPointXYZ(); + TopoDS_Vertex computeGeomPointRef(); + TopoDS_Vertex computeGeomPointEdge(); + TopoDS_Vertex computeGeomPointInt(); + TopoDS_Vertex computeGeomPointSurf(); protected: - virtual bool eventFilter( QObject *obj, QEvent *event ); - virtual void hideEvent ( QHideEvent * event ); virtual void showEvent ( QShowEvent * event ); - void _initInputWidget(); - void _initViewManager(); - void _highlightWidget(QObject* obj, Qt::GlobalColor clr); - bool _isLineOrListWidget(QObject*); + + virtual bool apply(QModelIndex& result); + virtual void _initInputWidget( Mode editmode ); + void updateInputs(const int constructorId); + + TopoDS_Vertex currentVertex; + QMap paramInputValue; + QMap coordsInputValue; protected slots: - void onSelectionChanged( const QItemSelection& sel, const QItemSelection& unsel ); void onWindowActivated( SUIT_ViewManager* vm ); void updateHelpFileName(); - - -private: - HEXABLOCK::GUI::DocumentModel* _documentModel; - HEXABLOCK::GUI::PatternDataSelectionModel* _patternDataSelectionModel; -// QLineEdit* _vertex_le; - - QObject* _currentObj; - bool _selectionMutex; - + virtual void onSelectionChanged( const QItemSelection& sel, const QItemSelection& unsel ); } VertexAssocDialog;