src/edithistory.cpp

changeset 133
e39326ee48dc
child 136
e8444e0d7f1a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/edithistory.cpp	Tue Sep 21 19:58:06 2021 +0300
@@ -0,0 +1,36 @@
+#include "edithistory.h"
+
+EditHistory::EditHistory()
+{
+	
+}
+
+void InsertHistoryEntry::undo(Model::EditContext &editContext)
+{
+	editContext.remove(this->position);
+}
+
+void InsertHistoryEntry::redo(Model::EditContext &editContext)
+{
+	
+}
+
+void DeleteHistoryEntry::undo(Model::EditContext &editContext)
+{
+	static_cast<InsertHistoryEntry*>(this)->redo(editContext);
+}
+
+void DeleteHistoryEntry::redo(Model::EditContext &editContext)
+{
+	static_cast<InsertHistoryEntry*>(this)->undo(editContext);
+}
+
+void EditHistoryEntry::undo(Model::EditContext &editContext)
+{
+	
+}
+
+void EditHistoryEntry::redo(Model::EditContext &editContext)
+{
+	
+}

mercurial