Mon, 19 Jul 2021 23:41:52 +0300
added preview layer code and fixed build warnings
96 | 1 | #pragma once |
100 | 2 | #include <QMouseEvent> |
96 | 3 | #include "../main.h" |
104 | 4 | #include "../ui/canvas.h" |
96 | 5 | |
6 | class BaseTool : public QObject | |
7 | { | |
8 | Q_OBJECT | |
9 | ||
10 | public: | |
11 | BaseTool(QObject* parent = nullptr); | |
12 | ||
13 | virtual QString name() const = 0; | |
14 | virtual QString toolTip() const = 0; | |
15 | virtual bool mousePressed(QMouseEvent*) { return false; } | |
104 | 16 | virtual bool mouseClick(const Canvas::MouseClickInfo&) { return false; } |
96 | 17 | virtual bool mouseDoubleClicked(QMouseEvent*) { return false; } |
18 | virtual bool mouseMoved(QMouseEvent*) { return false; } | |
19 | virtual bool keyReleased(QKeyEvent*) { return false; } | |
20 | }; | |
103 | 21 |