Fri, 07 Feb 2020 23:59:06 +0200
selection works now
47 | 1 | #pragma once |
2 | #include "gl/partrenderer.h" | |
3 | ||
4 | class Canvas : public PartRenderer | |
5 | { | |
6 | Q_OBJECT | |
7 | public: | |
8 | Canvas( | |
9 | Model* model, | |
10 | DocumentManager* documents, | |
11 | const ldraw::ColorTable& colorTable, | |
12 | QWidget* parent = nullptr); | |
51 | 13 | public slots: |
14 | void handleSelectionChange(const QSet<ldraw::Id>& selectedIds, const QSet<ldraw::Id>& deselectedIds); | |
47 | 15 | protected: |
16 | void mouseMoveEvent(QMouseEvent* event) override; | |
51 | 17 | void mousePressEvent(QMouseEvent* event) override; |
18 | void mouseReleaseEvent(QMouseEvent* event) override; | |
47 | 19 | signals: |
20 | void newStatusText(const QString& newStatusText); | |
51 | 21 | void selectionChanged(const QSet<ldraw::Id>& newSelection); |
22 | private: | |
23 | QPoint lastMousePosition; | |
24 | int totalMouseMove = 0; | |
25 | QSet<ldraw::Id> selection; | |
47 | 26 | }; |