src/model.h

changeset 1079
67c6e5d32e68
parent 1077
952d6b3e7d11
child 1082
1738bdaf36d6
--- a/src/model.h	Sun Jan 29 15:49:36 2017 +0200
+++ b/src/model.h	Sun Jan 29 21:02:11 2017 +0200
@@ -5,7 +5,7 @@
 class Model
 {
 public:
-	Model();
+	Model(DocumentManager* manager);
 	Model(const Model& other) = delete;
 	~Model();
 
@@ -27,6 +27,10 @@
 	QVector<LDObject*>::iterator begin();
 	QVector<LDObject*>::iterator end();
 	bool isEmpty() const;
+	DocumentManager* documentManager() const;
+	LDObject* insertFromString(int position, QString line);
+	LDObject* addFromString(QString line);
+	LDObject* replaceWithFromString(LDObject* object, QString line);
 
 	template<typename T, typename... Args>
 	T* emplace(Args&& ...args)
@@ -85,6 +89,7 @@
 	virtual LDObject* withdrawAt(int position);
 
 	QVector<LDObject*> _objects;
+	DocumentManager* _manager;
 	mutable int _triangleCount = 0;
 	mutable bool _needsTriangleRecount;
 };

mercurial