X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fbeziercurve%2Fbeziersplineeditor.h;h=d0f267ca9c66fc7cc8527b645d0c97c5325d9c78;hb=f33651cfeacdc62d6b56de27cf4e433f26ce2d07;hp=eee65c8cb819a3346e8cd0318f924c080ecd263d;hpb=d62dc84c034423b48e37ede84b8bf20e25608f27;p=kdenlive diff --git a/src/beziercurve/beziersplineeditor.h b/src/beziercurve/beziersplineeditor.h index eee65c8c..d0f267ca 100644 --- a/src/beziercurve/beziersplineeditor.h +++ b/src/beziercurve/beziersplineeditor.h @@ -29,20 +29,21 @@ class BezierSplineEditor : public QWidget Q_OBJECT public: - BezierSplineEditor(QWidget* parent = 0); - virtual ~BezierSplineEditor(); + explicit BezierSplineEditor(QWidget* parent = 0); + ~BezierSplineEditor(); - CubicBezierSpline spline(); + CubicBezierSpline spline() const; void setSpline(const CubicBezierSpline &spline); /** @brief Returns the selected point or else BPoint. */ BPoint getCurrentPoint(); - /** @brief Replaces current point with @param p (index stays the same). */ - void updateCurrentPoint(const BPoint &p); + /** @brief Replaces current point with @param p (index stays the same). + * @param final (default = true) emit signal modified? */ + void updateCurrentPoint(const BPoint &p, bool final = true); /** @brief Number of lines used in grid. */ - int gridLines(); + int gridLines() const; /** @brief Sets the number of grid lines to draw (in one direction) to @param lines. */ void setGridLines(int lines); @@ -64,6 +65,7 @@ protected: void mousePressEvent(QMouseEvent *event); void mouseReleaseEvent(QMouseEvent * event); void mouseMoveEvent(QMouseEvent * event); + void mouseDoubleClickEvent(QMouseEvent *event); void leaveEvent(QEvent *event); void resizeEvent(QResizeEvent *event); @@ -98,7 +100,7 @@ private: * @param sel Is filled with the type of the closest point (h1, p, h2) * * If no point is near enough -1 is returned. */ - int nearestPointInRange(QPointF p, int wWidth, int wHeight, point_types *sel); + int nearestPointInRange(const QPointF &p, int wWidth, int wHeight, point_types *sel); signals: void modified();