src/ui/polygonobjecteditor.h

Mon, 24 Aug 2020 23:00:50 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Mon, 24 Aug 2020 23:00:50 +0300
changeset 92
c438a7db7c52
parent 89
7abaf1d64719
child 100
43ce3672648a
permissions
-rw-r--r--

merge commit

81
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
1 #pragma once
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
2 #include <QWidget>
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
3 #include "main.h"
83
b8bd338eb602 refactor, added splitter
Teemu Piippo <teemu@hecknology.net>
parents: 81
diff changeset
4 #include "../widgets/vec3editor.h"
81
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
5
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
6 class Model;
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
7
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
8 class PolygonObjectEditor : public QWidget
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
9 {
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
10 public:
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
11 PolygonObjectEditor(Model* model, ldraw::id_t id, QWidget* parent = nullptr);
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
12 ~PolygonObjectEditor();
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
13 ldraw::id_t objectId() const;
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
14 void setObjectId(ldraw::id_t id);
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
15 private:
89
7abaf1d64719 object editing
Teemu Piippo <teemu@hecknology.net>
parents: 86
diff changeset
16 void buildWidgets();
7abaf1d64719 object editing
Teemu Piippo <teemu@hecknology.net>
parents: 86
diff changeset
17 void setupPointWidget(int n);
7abaf1d64719 object editing
Teemu Piippo <teemu@hecknology.net>
parents: 86
diff changeset
18 Q_SLOT void pointChanged(const glm::vec3& value);
81
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
19 Model* model;
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
20 ldraw::id_t storedObjectId;
89
7abaf1d64719 object editing
Teemu Piippo <teemu@hecknology.net>
parents: 86
diff changeset
21 std::vector<std::unique_ptr<QWidget>> widgets;
7abaf1d64719 object editing
Teemu Piippo <teemu@hecknology.net>
parents: 86
diff changeset
22 std::optional<class QSplitter> splitter;
81
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
23 };

mercurial