1 #pragma once |
|
2 #include <QWidget> |
|
3 #include <QSplitter> |
|
4 #include "main.h" |
|
5 #include "../widgets/vec3editor.h" |
|
6 |
|
7 class Document; |
|
8 |
|
9 class PolygonObjectEditor : public QWidget |
|
10 { |
|
11 public: |
|
12 PolygonObjectEditor(Document* document, ldraw::id_t id); |
|
13 ~PolygonObjectEditor(); |
|
14 ldraw::id_t objectId() const; |
|
15 void setObjectId(ldraw::id_t id); |
|
16 void clear(); |
|
17 private: |
|
18 void buildWidgets(); |
|
19 void setupPointWidget(int n); |
|
20 Q_SLOT void pointChanged(const glm::vec3& value); |
|
21 Document* document; |
|
22 ldraw::id_t storedObjectId; |
|
23 std::vector<std::unique_ptr<Vec3Editor>> widgets; |
|
24 std::optional<QSplitter> splitter; |
|
25 class QFormLayout* formLayout = nullptr; |
|
26 }; |
|