src/ui/objecteditor.h

Sat, 05 Mar 2022 13:18:28 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Sat, 05 Mar 2022 13:18:28 +0200
changeset 160
536efae7137e
parent 152
03f8e6d42e13
child 177
f69d53c053df
permissions
-rw-r--r--

Add document closing

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"
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
4 #include "../model.h"
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
5 #include "polygonobjecteditor.h"
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: 81
diff changeset
7 class Document;
03f8e6d42e13 Major refactoring
Teemu Piippo <teemu@hecknology.net>
parents: 81
diff changeset
8
81
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
9 class ObjectEditor : 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 Q_OBJECT
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
12 public:
152
03f8e6d42e13 Major refactoring
Teemu Piippo <teemu@hecknology.net>
parents: 81
diff changeset
13 explicit ObjectEditor(Document* document, ldraw::id_t id = ldraw::NULL_ID);
81
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:
152
03f8e6d42e13 Major refactoring
Teemu Piippo <teemu@hecknology.net>
parents: 81
diff changeset
16 Document* const document;
81
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
17 ldraw::id_t objectId = ldraw::NULL_ID;
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
18 std::optional<PolygonObjectEditor> polygonEditor;
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
19 };

mercurial