src/ui/objecteditor.h

changeset 180
5b7a8f2270ff
parent 178
a23024fc98e0
child 181
79de20dc6a1e
equal deleted inserted replaced
179:7b9b85b459de 180:5b7a8f2270ff
10 { 10 {
11 Q_OBJECT 11 Q_OBJECT
12 public: 12 public:
13 explicit ObjectEditor(Document* document, ldraw::id_t id = ldraw::NULL_ID); 13 explicit ObjectEditor(Document* document, ldraw::id_t id = ldraw::NULL_ID);
14 void setObjectId(ldraw::id_t id); 14 void setObjectId(ldraw::id_t id);
15 void clear();
16 private: 15 private:
16 Q_SLOT void handleColorChange(ldraw::Color value);
17 Q_SLOT void handleVec3Change(const glm::vec3& value);
17 Document* const document; 18 Document* const document;
18 ldraw::id_t objectId = ldraw::NULL_ID; 19 ldraw::id_t objectId = ldraw::NULL_ID;
19 std::optional<PolygonObjectEditor> polygonEditor;
20 QWidget* formContainer; 20 QWidget* formContainer;
21 class QLabel* objectTypeNameLabel; 21 class QLabel* objectTypeNameLabel;
22 class QLabel* objectTypeIconLabel; 22 class QLabel* objectTypeIconLabel;
23 QMap<ldraw::Property, QPair<QWidget*, QWidget*>> propertyWidgets; 23 QMap<ldraw::Property, QPair<QWidget*, QWidget*>> propertyWidgets;
24 QWidget* makeEditorWidgetForProperty(ldraw::Property property);
25 void handlePropertyChange(QObject* caller, const QVariant& value);
24 }; 26 };

mercurial