Sun, 19 Jan 2020 02:54:48 +0200
commit work on GL rendering
#pragma once #include "model.h" #include "linetypes/object.h" class Model::EditContext { public: template<typename T, typename... Args> T* append(Args&&... args); void append(std::unique_ptr<linetypes::Object>&& object); template<typename T, typename... Args> T* insert(int position, Args&&... args); void setObjectProperty( linetypes::Object* object, linetypes::Property property, const QVariant &value); private: EditContext(Model& model); friend class Model; Model& model; }; template<typename T, typename... Args> T* Model::EditContext::append(Args&&... args) { return this->model.append<T>(args...); } template<typename T, typename... Args> T* Model::EditContext::insert(int position, Args&&... args) { return this->model.insert<T>(position, args...); }