- QAction* createAction( ActionId theId, const QString& theName, const QPixmap& theImage,
- const QString& theToolTip, const QKeySequence& theShortcut );
- QAction* getAction(ActionId theId);
- void updateUndoRedo();
- int findLocalPointIndex( int theSectionId, float theX, float theY );
- void updateLocalPointView();
- void setLocalPointContext( const bool theOpen );
- void addLocalPointToTable( const double theX, const double theY );
+ QAction* createAction( ActionId theId, const QString& theName, const QPixmap& theImage,
+ const QString& theToolTip, const QKeySequence& theShortcut );
+ QAction* getAction(ActionId theId);
+ ActionMode getActionMode() const;
+
+ void updateUndoRedo();
+
+ void removeSection();
+ void removePoint();
+ void insertPointToSelectedSegment( const int theXPosition,
+ const int theYPosition );
+ void moveSelectedPoints( const int theXPosition, const int theYPosition );
+ void updateLocalPointView();
+ 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() );
+
+ void getSelectedPonts( const int theSectionId, QList<int>& thePoints );
+ void setSelectedPonts( const int theSectionId, const QList<int>& thePoints = QList<int>() );
+
+ void startCurveModification( QList<int>& thePoints, const bool theFillPoints = true );
+ void finishCurveModification( const QList<int>& thePoints );
+
+ // curve algorithm
+ int findLocalPointIndex( int theSectionId, float theX, float theY );
+ void findSections( int thePointId, QList<int>& theSections );
+
+ // OCC algorithm
+ bool pointOnObject( Handle(AIS_InteractiveObject) theObject,
+ const int theX, const int theY,
+ gp_Pnt& thePoint, int& thePoint1, int& thePoint2 );
+ bool hasProjectPointOnCurve( const int theX, const int theY,
+ const Handle(Geom_Curve)& theCurve,
+ Standard_Real& theParameter );