src/tools/drawtool.h

changeset 121
000781318c36
parent 111
1f42c03fafca
child 122
b54b350dff5d
equal deleted inserted replaced
120:8c9fff699241 121:000781318c36
8 public: 8 public:
9 Q_INVOKABLE DrawTool(QObject* parent = nullptr); 9 Q_INVOKABLE DrawTool(QObject* parent = nullptr);
10 10
11 QString name() const override; 11 QString name() const override;
12 QString toolTip() const override; 12 QString toolTip() const override;
13 bool mouseClick(Document* document, Canvas* canvas) override; 13 bool mouseClick(Document* document, Canvas* canvas, QMouseEvent* event) override;
14 bool mouseMove(Document* document, Canvas* canvas) override; 14 bool mouseMove(Document* document, Canvas* canvas, QMouseEvent* event) override;
15 void reset() override; 15 void reset() override;
16 void overpaint(Canvas*, QPainter*) const override; 16 void overpaint(Canvas*, QPainter*) const override;
17 private: 17 private:
18 void closeShape(Document *document); 18 void closeShape(Document *document);
19 std::vector<glm::vec3> polygon; 19 std::vector<glm::vec3> polygon;
20 std::vector<glm::vec3> previewPolygon; 20 std::vector<glm::vec3> previewPolygon;
21 glm::vec3 previewPoint; 21 glm::vec3 previewPoint;
22 void updatePreviewPolygon();
22 }; 23 };

mercurial