summaryrefslogtreecommitdiff
path: root/src/outputwindow.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2018-12-29 21:30:28 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2018-12-30 11:42:13 +0100
commit6f2c3b90ce29a20e14cc769841056d4b36c42d50 (patch)
tree41c555a7363bdb248d3306698d83692a0c89262b /src/outputwindow.h
parent58183c47c2b3235f8f56dc6492bb41b775dd6f26 (diff)
Implement drag'n'move.
Diffstat (limited to 'src/outputwindow.h')
-rw-r--r--src/outputwindow.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/outputwindow.h b/src/outputwindow.h
index bb7ef7b..182499a 100644
--- a/src/outputwindow.h
+++ b/src/outputwindow.h
@@ -65,6 +65,9 @@ public slots:
void reset();
protected:
+ void mouseMoveEvent(QMouseEvent* event);
+ void mousePressEvent(QMouseEvent* event);
+ void mouseReleaseEvent(QMouseEvent* event);
void wheelEvent(QWheelEvent* event);
void paintEvent(QPaintEvent* event);
@@ -92,4 +95,9 @@ private:
QString penfile;
volatile float scale{2.0f};
+
+ bool dragging{false};
+ QPoint dragOffsetOrigo{0, 0};
+ QPoint dragOffset{0, 0};
+ QPoint offset{0, 0};
};