94 public: |
94 public: |
95 virtual ~AbstractHistoryEntry() {} |
95 virtual ~AbstractHistoryEntry() {} |
96 virtual void undo() const = 0; |
96 virtual void undo() const = 0; |
97 virtual void redo() const = 0; |
97 virtual void redo() const = 0; |
98 virtual History::EHistoryType getType() const = 0; |
98 virtual History::EHistoryType getType() const = 0; |
99 virtual QString getTypeName() const = 0; |
99 virtual String getTypeName() const = 0; |
100 }; |
100 }; |
101 |
101 |
102 // ============================================================================= |
102 // ============================================================================= |
103 // |
103 // |
104 class DelHistory : public AbstractHistoryEntry |
104 class DelHistory : public AbstractHistoryEntry |
105 { |
105 { |
106 PROPERTY (private, int, index, setIndex, STOCK_WRITE) |
106 PROPERTY (private, int, index, setIndex, STOCK_WRITE) |
107 PROPERTY (private, QString, code, setCode, STOCK_WRITE) |
107 PROPERTY (private, String, code, setCode, STOCK_WRITE) |
108 |
108 |
109 public: |
109 public: |
110 IMPLEMENT_HISTORY_TYPE (Del) |
110 IMPLEMENT_HISTORY_TYPE (Del) |
111 DelHistory (int idx, LDObject* obj); |
111 DelHistory (int idx, LDObject* obj); |
112 }; |
112 }; |
114 // ============================================================================= |
114 // ============================================================================= |
115 // |
115 // |
116 class EditHistory : public AbstractHistoryEntry |
116 class EditHistory : public AbstractHistoryEntry |
117 { |
117 { |
118 PROPERTY (private, int, index, setIndex, STOCK_WRITE) |
118 PROPERTY (private, int, index, setIndex, STOCK_WRITE) |
119 PROPERTY (private, QString, oldCode, setOldCode, STOCK_WRITE) |
119 PROPERTY (private, String, oldCode, setOldCode, STOCK_WRITE) |
120 PROPERTY (private, QString, newCode, setNewCode, STOCK_WRITE) |
120 PROPERTY (private, String, newCode, setNewCode, STOCK_WRITE) |
121 |
121 |
122 public: |
122 public: |
123 IMPLEMENT_HISTORY_TYPE (Edit) |
123 IMPLEMENT_HISTORY_TYPE (Edit) |
124 |
124 |
125 EditHistory (int idx, QString oldCode, QString newCode) : |
125 EditHistory (int idx, String oldCode, String newCode) : |
126 m_index (idx), |
126 m_index (idx), |
127 m_oldCode (oldCode), |
127 m_oldCode (oldCode), |
128 m_newCode (newCode) {} |
128 m_newCode (newCode) {} |
129 }; |
129 }; |
130 |
130 |
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
133 // ============================================================================= |
133 // ============================================================================= |
134 class AddHistory : public AbstractHistoryEntry |
134 class AddHistory : public AbstractHistoryEntry |
135 { |
135 { |
136 PROPERTY (private, int, index, setIndex, STOCK_WRITE) |
136 PROPERTY (private, int, index, setIndex, STOCK_WRITE) |
137 PROPERTY (private, QString, code, setCode, STOCK_WRITE) |
137 PROPERTY (private, String, code, setCode, STOCK_WRITE) |
138 |
138 |
139 public: |
139 public: |
140 IMPLEMENT_HISTORY_TYPE (Add) |
140 IMPLEMENT_HISTORY_TYPE (Add) |
141 |
141 |
142 AddHistory (int idx, LDObject* obj) : |
142 AddHistory (int idx, LDObject* obj) : |