1436:241d3e452b32 | 1440:265b2e95a8e8 |
---|---|
79 }; | 79 }; |
80 | 80 |
81 class AddHistoryEntry : public AbstractHistoryEntry | 81 class AddHistoryEntry : public AbstractHistoryEntry |
82 { | 82 { |
83 public: | 83 public: |
84 AddHistoryEntry (const QModelIndex& index, EditHistory* parent); | 84 AddHistoryEntry (const Uuid& id, const int row, EditHistory* parent); |
85 void undo() override; | 85 void undo() override; |
86 void redo() override; | 86 void redo() override; |
87 | 87 |
88 private: | 88 private: |
89 int m_row; | 89 int m_row; |
99 }; | 99 }; |
100 | 100 |
101 class EditHistoryEntry : public AbstractHistoryEntry | 101 class EditHistoryEntry : public AbstractHistoryEntry |
102 { | 102 { |
103 public: | 103 public: |
104 EditHistoryEntry( | 104 EditHistoryEntry(const int row, |
105 const QModelIndex& index, | |
106 const Serializer::Archive& oldCode, | 105 const Serializer::Archive& oldCode, |
107 const Serializer::Archive& newCode, | 106 const Serializer::Archive& newCode, |
108 EditHistory* parent | 107 EditHistory* parent |
109 ); | 108 ); |
110 void undo() override; | 109 void undo() override; |
113 private: | 112 private: |
114 int row; | 113 int row; |
115 Serializer::Archive oldState; | 114 Serializer::Archive oldState; |
116 Serializer::Archive newState; | 115 Serializer::Archive newState; |
117 }; | 116 }; |
118 | |
119 class MoveHistoryEntry : public AbstractHistoryEntry | |
120 { | |
121 public: | |
122 MoveHistoryEntry(int top, int bottom, int destination, EditHistory* parent); | |
123 void undo() override; | |
124 void redo() override; | |
125 | |
126 private: | |
127 int top; | |
128 int bottom; | |
129 int destination; | |
130 }; |