X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROCurveCreator%2FCurveCreator_Widget.h;h=f17cf3d17f567238a4f2f6fd6798965141e3740e;hb=297574150f5c46ad0196e3e9b459fbc67a13fdd5;hp=0129da991c4d7b19e4bae08cac6ea254da9e9148;hpb=5ab983d4b8b4d9d77dd3da5069659afc8c338b80;p=modules%2Fhydro.git diff --git a/src/HYDROCurveCreator/CurveCreator_Widget.h b/src/HYDROCurveCreator/CurveCreator_Widget.h index 0129da99..f17cf3d1 100644 --- a/src/HYDROCurveCreator/CurveCreator_Widget.h +++ b/src/HYDROCurveCreator/CurveCreator_Widget.h @@ -124,10 +124,10 @@ protected: }; enum ActionMode { + NoneMode, AdditionMode, ModificationMode, - DetectionMode, - NoneMode + DetectionMode }; private: @@ -140,10 +140,11 @@ private: void removeSection(); void removePoint(); - bool insertPointToSelectedSegment( const int theXPosition, + void insertPointToSelectedSegment( const int theXPosition, const int theYPosition ); + void moveSelectedPoints( const int theXPosition, const int theYPosition ); void updateLocalPointView(); - void setLocalPointContext( const bool theOpen ); + void setLocalPointContext( const bool theOpen, const bool isUpdateTable = false ); void addLocalPointToTable( const double theX, const double theY ); void setDragStarted( const bool theState, const QPoint& thePoint = QPoint() ); @@ -151,9 +152,12 @@ private: void getSelectedPonts( const int theSectionId, QList& thePoints ); void setSelectedPonts( const int theSectionId, const QList& thePoints = QList() ); + void startCurveModification( QList& thePoints, const bool theFillPoints = true ); + void finishCurveModification( const QList& thePoints ); // curve algorithm int findLocalPointIndex( int theSectionId, float theX, float theY ); + void findSections( int thePointId, QList& theSections ); // OCC algorithm bool pointOnObject( Handle(AIS_InteractiveObject) theObject, @@ -161,7 +165,7 @@ private: gp_Pnt& thePoint, int& thePoint1, int& thePoint2 ); bool hasProjectPointOnCurve( const int theX, const int theY, const Handle(Geom_Curve)& theCurve, - gp_Pnt& theOutPoint ); + Standard_Real& theParameter ); private: QMap myActionMap; @@ -173,8 +177,10 @@ private: int mySection; int myPointNum; bool myDragStarted; - QList myDragPoints; QPoint myDragStartPosition; + int myDragInteractionStyle; + QList myDragPoints; + bool myDragged; QByteArray myGuiState; };