diff -r 1de2b8d64e9f -r 98906a94732f src/model.h --- a/src/model.h Tue Jan 28 23:34:49 2020 +0200 +++ b/src/model.h Thu Jan 30 19:20:11 2020 +0200 @@ -42,33 +42,33 @@ QVariant data(const QModelIndex& index, int role) const override; QVariant getHeaderProperty(const HeaderProperty property); const QString& getName() const; - QVariant getObjectProperty(const int index, const linetypes::Property property) 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, linetypes::GetPolygonsContext* context) const; + void getObjectPolygons(const int index, std::vector& polygons_out, ldraw::GetPolygonsContext* context) const; signals: - void objectAdded(linetypes::Id id, int position); + void objectAdded(ldraw::Id id, int position); private: - using ModelObjectPointer = std::unique_ptr; + using ModelObjectPointer = std::unique_ptr; template - linetypes::Id append(Args&&... args); + ldraw::Id append(Args&&... args); void append(ModelObjectPointer&& object); template - linetypes::Id insert(int position, Args&&... args); + ldraw::Id insert(int position, Args&&... args); bool modified = false; QString path; LDHeader header; std::vector body; - std::map objectsById; + std::map objectsById; mutable std::vector cachedPolygons; mutable bool needRecache = true; }; template -linetypes::Id Model::append(Args&&... args) +ldraw::Id Model::append(Args&&... args) { emit layoutAboutToBeChanged(); this->body.push_back(std::make_unique(args...)); - linetypes::Object* pointer = this->body.back().get(); + ldraw::Object* pointer = this->body.back().get(); this->objectsById[pointer->id] = pointer; emit objectAdded(pointer->id, this->body.size() - 1); emit layoutChanged(); @@ -76,11 +76,11 @@ } template -linetypes::Id Model::insert(int position, Args&&... args) +ldraw::Id Model::insert(int position, Args&&... args) { emit layoutAboutToBeChanged(); this->body.insert(position, std::make_unique(args...)); - linetypes::Object* pointer = this->body[position].get(); + ldraw::Object* pointer = this->body[position].get(); this->objectsById[pointer->id] = pointer; emit objectAdded(pointer->id, position); emit layoutChanged();