summaryrefslogtreecommitdiffhomepage
path: root/spline-widget/qfunctionconfigurator.h
diff options
context:
space:
mode:
Diffstat (limited to 'spline-widget/qfunctionconfigurator.h')
-rw-r--r--spline-widget/qfunctionconfigurator.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/spline-widget/qfunctionconfigurator.h b/spline-widget/qfunctionconfigurator.h
index 4a9cb5f1..ce8208a8 100644
--- a/spline-widget/qfunctionconfigurator.h
+++ b/spline-widget/qfunctionconfigurator.h
@@ -19,6 +19,7 @@ class SPLINE_WIDGET_EXPORT QFunctionConfigurator : public QWidget
{
Q_OBJECT
Q_PROPERTY(QColor colorBezier READ colorBezier WRITE setColorBezier)
+ enum { pointSize = 5 };
public:
QFunctionConfigurator(QWidget *parent = 0);
@@ -39,6 +40,8 @@ public:
_background = QPixmap();
update();
}
+ void set_snap(int x, int y) { snap_x = x; snap_y = y; }
+ void get_snap(int& x, int& y) const { x = snap_x; y = snap_y; }
protected slots:
void paintEvent(QPaintEvent *e) override;
void mousePressEvent(QMouseEvent *e) override;
@@ -72,4 +75,5 @@ private:
QPixmap _background;
QPixmap _function;
bool _draw_function;
+ int snap_x, snap_y;
};