diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-12-29 14:32:13 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-12-29 14:32:13 +0100 |
commit | 9f33eb49ccb7fa8fb80f00865819beb499e70025 (patch) | |
tree | 65e1f8fcbdd09780bf23a27eb01ca5ef72ab3c1f /src/outputwindow.h | |
parent | 16beb55484c20b8b1e92afdf5720fa3860d77309 (diff) |
Zoom canvas using scroll-wheel.
Diffstat (limited to 'src/outputwindow.h')
-rw-r--r-- | src/outputwindow.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/outputwindow.h b/src/outputwindow.h index 5e91f71..fc63a44 100644 --- a/src/outputwindow.h +++ b/src/outputwindow.h @@ -47,7 +47,10 @@ public: void stopScript(); void setSpeed(int s); + void setScale(double s); + double getScale() const; + void setColour(int r, int g, int b, int a); void loadPen(QString file); @@ -60,7 +63,8 @@ public slots: void reset(); protected: - void paintEvent(QPaintEvent * event); + void wheelEvent(QWheelEvent* event); + void paintEvent(QPaintEvent* event); private: class ColLine @@ -83,5 +87,5 @@ private: volatile bool loadpen; QString penfile; - volatile float scale; + volatile float scale{2.0f}; }; |