src/editHistory.h

changeset 739
152b33a6d51b
parent 655
b376645315ab
child 768
29e6c5552388
equal deleted inserted replaced
738:16b63398aa1f 739:152b33a6d51b
28 virtual History::EHistoryType getType() const override \ 28 virtual History::EHistoryType getType() const override \
29 { \ 29 { \
30 return History::E##N##History; \ 30 return History::E##N##History; \
31 } \ 31 } \
32 \ 32 \
33 virtual QString getTypeName() const \ 33 virtual String getTypeName() const \
34 { \ 34 { \
35 return #N; \ 35 return #N; \
36 } 36 }
37 37
38 class AbstractHistoryEntry; 38 class AbstractHistoryEntry;
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) :

mercurial