src/document.h

changeset 204
52e10e8d88cc
parent 203
1909a0123c72
child 205
1a4342d80de7
--- a/src/document.h	Tue Jun 07 21:35:29 2022 +0300
+++ b/src/document.h	Wed Jun 08 19:33:00 2022 +0300
@@ -24,6 +24,20 @@
 #include "model.h"
 #include "vertexmap.h"
 
+struct AppendToModel
+{
+	ModelElement newElement;
+};
+
+struct DeleteFromModel
+{
+	int position;
+};
+
+using ModelAction = std::variant<AppendToModel, DeleteFromModel>;
+
+Q_DECLARE_METATYPE(ModelAction)
+
 class EditorTabWidget : public QWidget
 {
 	Q_OBJECT
@@ -46,9 +60,9 @@
 Q_SIGNALS:
 	void newStatusText(const QString& newStatusText);
 	void splitterChanged();
+	void modelAction(const ModelAction& action);
 private:
 	void closeShape();
 	DrawState drawState;
-	DocumentManager* const documents;
 	VertexMap vertexMap;
 };

mercurial