diff -r 0f80a2e5e42b -r 1a9eac27698d src/model.h --- a/src/model.h Fri Feb 07 02:02:16 2020 +0200 +++ b/src/model.h Fri Feb 07 23:59:06 2020 +0200 @@ -44,7 +44,8 @@ const QString& getName() const; QVariant getObjectProperty(const int index, const ldraw::Property property) const; std::vector getPolygons(class DocumentManager* documents) const; - void getObjectPolygons(const int index, std::vector& polygons_out, ldraw::GetPolygonsContext* context) const; + QModelIndex lookup(ldraw::Id id) const; + ldraw::Id resolve(const QModelIndex& index) const; signals: void objectAdded(ldraw::Id id, int position); private: @@ -54,6 +55,12 @@ void append(ModelObjectPointer&& object); template ldraw::Id insert(int position, Args&&... args); + ldraw::Object* objectAt(const QModelIndex& index); + const ldraw::Object* objectAt(const QModelIndex& index) const; + void getObjectPolygons( + const int index, + std::vector& polygons_out, + ldraw::GetPolygonsContext* context) const; bool modified = false; QString path; LDHeader header;