src/ui/polygonobjecteditor.h

Sun, 06 Mar 2022 10:32:54 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Sun, 06 Mar 2022 10:32:54 +0200
changeset 171
b497f5e66749
parent 152
03f8e6d42e13
child 178
a23024fc98e0
permissions
-rw-r--r--

add missing file

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>
100
43ce3672648a fix build
Teemu Piippo <teemu@hecknology.net>
parents: 89
diff changeset
3 #include <QSplitter>
81
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
4 #include "main.h"
83
b8bd338eb602 refactor, added splitter
Teemu Piippo <teemu@hecknology.net>
parents: 81
diff changeset
5 #include "../widgets/vec3editor.h"
81
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
6
152
03f8e6d42e13 Major refactoring
Teemu Piippo <teemu@hecknology.net>
parents: 100
diff changeset
7 class Document;
81
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
8
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
9 class PolygonObjectEditor : public QWidget
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
10 {
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
11 public:
152
03f8e6d42e13 Major refactoring
Teemu Piippo <teemu@hecknology.net>
parents: 100
diff changeset
12 PolygonObjectEditor(Document* document, ldraw::id_t id);
81
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
13 ~PolygonObjectEditor();
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
14 ldraw::id_t objectId() const;
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
15 void setObjectId(ldraw::id_t id);
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
16 private:
89
7abaf1d64719 object editing
Teemu Piippo <teemu@hecknology.net>
parents: 86
diff changeset
17 void buildWidgets();
7abaf1d64719 object editing
Teemu Piippo <teemu@hecknology.net>
parents: 86
diff changeset
18 void setupPointWidget(int n);
7abaf1d64719 object editing
Teemu Piippo <teemu@hecknology.net>
parents: 86
diff changeset
19 Q_SLOT void pointChanged(const glm::vec3& value);
152
03f8e6d42e13 Major refactoring
Teemu Piippo <teemu@hecknology.net>
parents: 100
diff changeset
20 Document* document;
81
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
21 ldraw::id_t storedObjectId;
89
7abaf1d64719 object editing
Teemu Piippo <teemu@hecknology.net>
parents: 86
diff changeset
22 std::vector<std::unique_ptr<QWidget>> widgets;
100
43ce3672648a fix build
Teemu Piippo <teemu@hecknology.net>
parents: 89
diff changeset
23 std::optional<QSplitter> splitter;
81
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
24 };

mercurial