- QAction* createAction( ActionId theId, const QString& theName, const QPixmap& theImage,
- const QString& theToolTip, const QKeySequence& theShortcut );
- QAction* getAction(ActionId theId);
- void updateUndoRedo();
+ OCCViewer_Viewer* getOCCViewer();
+
+ QAction* createAction( ActionId theId, const QString& theName, const QPixmap& theImage,
+ const QString& theToolTip, const QKeySequence& theShortcut );
+
+ void updateActionsStates();
+ void updateUndoRedo();
+
+ void removeSection();
+ void removePoint();
+ void addNewPoint(const CurveCreator::Coordinates& theCoords);
+ void insertPointToSelectedSegment( const int theXPosition,
+ const int theYPosition );
+ void moveSelectedPoints( const int theXPosition, const int theYPosition );
+
+ void setDragStarted( const bool theState, const QPoint& thePoint = QPoint() );
+
+ void getSelectedPoints( CurveCreator_ICurve::SectionToPointList& thePoints );
+
+ void stopActionMode();
+
+ void startCurveModification( CurveCreator_ICurve::SectionToPointList& thePoints,
+ const bool theFillPoints = true );
+ void finishCurveModification( const CurveCreator_ICurve::SectionToPointList& thePoints =
+ CurveCreator_ICurve::SectionToPointList() );
+
+ // curve algorithm
+ int findLocalPointIndex( int theSectionId, double theX, double theY );
+ void findSectionsToPoints( const double theX, const double theY,
+ CurveCreator_ICurve::SectionToPointList& thePoints );
+ void convert( const CurveCreator_ICurve::SectionToPointList& thePoints,
+ QMap<int, QList<int> >& theConvPoints );
+
+ bool contains( const CurveCreator_ICurve::SectionToPointList& theList,
+ const CurveCreator_ICurve::SectionToPoint& theValue ) const;
+
+protected:
+ // Boundary points of mouse to select the points
+ QPoint myStartPoint;
+ QPoint myEndPoint;
+