Rev 24782 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4430 | cbradney | 1 | /* |
2 | For general Scribus (>=1.3.2) copyright and licensing information please refer |
||
3 | to the COPYING file provided with the program. Following this notice may exist |
||
4 | a copyright and/or license notice that predates the release of Scribus 1.3.2 |
||
5 | for which a new license (GPL+exception) is in place. |
||
6 | */ |
||
2218 | cbradney | 7 | /*************************************************************************** |
1111 | tsoots | 8 | * Copyright (C) 2005 by Riku Leino * |
5116 | tsoots | 9 | * riku@scribus.info * |
1111 | tsoots | 10 | * * |
11 | * This program is free software; you can redistribute it and/or modify * |
||
12 | * it under the terms of the GNU General Public License as published by * |
||
13 | * the Free Software Foundation; either version 2 of the License, or * |
||
14 | * (at your option) any later version. * |
||
15 | * * |
||
16 | * This program is distributed in the hope that it will be useful, * |
||
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
||
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
||
19 | * GNU General Public License for more details. * |
||
20 | * * |
||
21 | * You should have received a copy of the GNU General Public License * |
||
22 | * along with this program; if not, write to the * |
||
23 | * Free Software Foundation, Inc., * |
||
18122 | mrdocs | 24 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * |
1111 | tsoots | 25 | ***************************************************************************/ |
26 | |||
27 | #include "undomanager.h" |
||
11576 | avox | 28 | |
29 | #include <QDebug> |
||
30 | #include <QList> |
||
31 | #include <QPixmap> |
||
32 | |||
1197 | tsoots | 33 | #include "prefscontext.h" |
34 | #include "prefsfile.h" |
||
11576 | avox | 35 | #include "prefsmanager.h" |
36 | #include "scconfig.h" |
||
37 | #include "scpaths.h" |
||
5116 | tsoots | 38 | #include "scraction.h" |
5781 | cbradney | 39 | #include "scribuscore.h" |
11576 | avox | 40 | #include "undogui.h" |
5116 | tsoots | 41 | #include "undostack.h" |
19416 | jghali | 42 | #include "undotransaction.h" |
1693 | craig | 43 | |
23757 | craig | 44 | UndoManager* UndoManager::m_instance = nullptr; |
45 | bool UndoManager::m_undoEnabled = true; |
||
46 | int UndoManager::m_undoEnabledCounter = 0; |
||
1111 | tsoots | 47 | |
48 | UndoManager* UndoManager::instance() |
||
49 | { |
||
23757 | craig | 50 | if (m_instance == nullptr) |
51 | m_instance = new UndoManager(); |
||
1111 | tsoots | 52 | |
23757 | craig | 53 | return m_instance; |
1111 | tsoots | 54 | } |
55 | |||
56 | void UndoManager::setUndoEnabled(bool isEnabled) |
||
57 | { |
||
23757 | craig | 58 | if (isEnabled && m_undoEnabledCounter == 0) |
1430 | tsoots | 59 | return; // nothing to do undo is already enabled. |
23757 | craig | 60 | if (isEnabled && m_undoEnabledCounter > 0) |
61 | --m_undoEnabledCounter; |
||
1430 | tsoots | 62 | else if (!isEnabled) |
23757 | craig | 63 | ++m_undoEnabledCounter; |
1430 | tsoots | 64 | |
23757 | craig | 65 | m_undoEnabled = m_undoEnabledCounter == 0; |
66 | if (m_undoEnabled) |
||
1111 | tsoots | 67 | connectGuis(); |
23757 | craig | 68 | else if (m_undoEnabledCounter == 1) |
1430 | tsoots | 69 | disconnectGuis(); // disconnect only once when setUndoEnabled(false) has been called |
22601 | craig | 70 | // no need to call again if next setUndoEnabled() call will also be false. |
1111 | tsoots | 71 | } |
72 | |||
73 | bool UndoManager::undoEnabled() |
||
74 | { |
||
23757 | craig | 75 | return m_undoEnabled; |
1111 | tsoots | 76 | } |
77 | |||
78 | UndoManager::UndoManager() |
||
79 | { |
||
1190 | tsoots | 80 | if (!UndoManager::IGuides) |
81 | initIcons(); |
||
23060 | craig | 82 | prefs_ = PrefsManager::instance().prefsFile->getContext("undo"); |
2198 | cbradney | 83 | languageChange(); |
5938 | tsoots | 84 | setUndoEnabled(prefs_->getBool("enabled", true)); |
1111 | tsoots | 85 | } |
86 | |||
13371 | jghali | 87 | UndoTransaction UndoManager::beginTransaction(const TransactionSettings& settings) |
88 | { |
||
89 | return UndoManager::beginTransaction(settings.targetName, settings.targetPixmap, settings.actionName, |
||
90 | settings.description, settings.actionPixmap); |
||
91 | } |
||
11576 | avox | 92 | |
93 | UndoTransaction UndoManager::beginTransaction(const QString &targetName, |
||
94 | QPixmap *targetPixmap, |
||
95 | const QString &name, |
||
96 | const QString &description, |
||
97 | QPixmap *actionPixmap) |
||
1213 | tsoots | 98 | { |
23757 | craig | 99 | if (!m_undoEnabled) |
22521 | craig | 100 | return UndoTransaction(nullptr); |
11576 | avox | 101 | |
102 | /** @brief Dummy object for storing transaction target's name */ |
||
24730 | jghali | 103 | UndoObject* transactionTarget = new DummyUndoObject(); |
104 | TransactionState* transactionState = new TransactionState(); |
||
105 | transactionTarget->setUName(targetName); // Name which will be in action history |
||
1250 | tsoots | 106 | if (targetPixmap) |
24730 | jghali | 107 | transactionTarget->setUPixmap(targetPixmap); |
1228 | tsoots | 108 | if (name.length() > 0) // if left to 0 length action will be fetched from the |
24730 | jghali | 109 | transactionState->setName(name); // last added UndoState in this transaction |
1238 | tsoots | 110 | if (description.length() > 0) |
24730 | jghali | 111 | transactionState->setDescription(description); // tool tip for action history |
1250 | tsoots | 112 | if (actionPixmap) |
24730 | jghali | 113 | transactionState->setPixmap(actionPixmap); // for action history |
11576 | avox | 114 | |
115 | // Holds the state and data of this transaction: |
||
24730 | jghali | 116 | auto *transaction = new TransactionData(); |
117 | transaction->transactionObject = transactionTarget; |
||
118 | transaction->transactionState = transactionState; |
||
23757 | craig | 119 | transaction->stackLevel = m_transactions.size(); |
11576 | avox | 120 | transaction->UM = this; |
121 | |||
23757 | craig | 122 | m_transactions.push_back(transaction); |
11576 | avox | 123 | |
124 | // qDebug() << "UndoManager::beginTransaction" << targetName << name << transaction; |
||
125 | return UndoTransaction(transaction); |
||
1213 | tsoots | 126 | } |
127 | |||
24730 | jghali | 128 | bool UndoManager::isTransactionMode() const |
1213 | tsoots | 129 | { |
23757 | craig | 130 | return !m_transactions.empty(); |
1213 | tsoots | 131 | } |
132 | |||
1111 | tsoots | 133 | void UndoManager::registerGui(UndoGui* gui) |
134 | { |
||
22601 | craig | 135 | if (gui == nullptr) |
1111 | tsoots | 136 | return; |
137 | |||
138 | setUndoEnabled(false); |
||
139 | setState(gui); |
||
23757 | craig | 140 | m_undoGuis.push_back(gui); |
1431 | tsoots | 141 | setUndoEnabled(true); |
1111 | tsoots | 142 | } |
143 | |||
144 | void UndoManager::setState(UndoGui* gui, int uid) |
||
145 | { |
||
146 | gui->clear(); |
||
1443 | tsoots | 147 | |
23757 | craig | 148 | if ( m_stacks[m_currentDoc].size() == 0 ) |
4293 | mrdocs | 149 | return; |
150 | |||
23757 | craig | 151 | UndoStack& currentStack = m_stacks[m_currentDoc]; |
5116 | tsoots | 152 | |
20691 | craig | 153 | StateList::iterator itstartU = currentStack.m_undoActions_.begin(); // undo actions |
154 | StateList::iterator itendU = currentStack.m_undoActions_.end(); |
||
5116 | tsoots | 155 | |
20691 | craig | 156 | StateList::iterator itstartR = currentStack.m_redoActions_.begin(); // redo actions |
157 | StateList::iterator itendR = currentStack.m_redoActions_.end(); |
||
19245 | jghali | 158 | |
1443 | tsoots | 159 | if (uid > -1) |
1477 | tsoots | 160 | { // find the range from where actions are added when in obj. spec. mode |
5116 | tsoots | 161 | StateList::iterator it2; |
20691 | craig | 162 | for (it2 = currentStack.m_undoActions_.begin(); |
163 | it2 != currentStack.m_undoActions_.end(); ++it2) |
||
1443 | tsoots | 164 | { |
5116 | tsoots | 165 | UndoState* tmp = *it2; |
1443 | tsoots | 166 | TransactionState *ts = dynamic_cast<TransactionState*>(tmp); |
5116 | tsoots | 167 | if (ts && !ts->containsOnly(uid)) |
1443 | tsoots | 168 | { |
20691 | craig | 169 | if (it2 != currentStack.m_undoActions_.begin()) |
5116 | tsoots | 170 | itendU = --it2; |
1443 | tsoots | 171 | break; |
172 | } |
||
173 | } |
||
5116 | tsoots | 174 | StateList::iterator it3; |
20691 | craig | 175 | for (it3 = currentStack.m_redoActions_.begin(); |
176 | it3 != currentStack.m_redoActions_.end(); ++it3) |
||
1477 | tsoots | 177 | { |
5116 | tsoots | 178 | UndoState* tmp = *it3; |
1477 | tsoots | 179 | TransactionState *ts = dynamic_cast<TransactionState*>(tmp); |
5116 | tsoots | 180 | if (ts && !ts->containsOnly(uid)) |
1477 | tsoots | 181 | { |
5116 | tsoots | 182 | itendR = it3; |
1477 | tsoots | 183 | break; |
184 | } |
||
185 | } |
||
1443 | tsoots | 186 | } |
1477 | tsoots | 187 | |
19245 | jghali | 188 | if (currentStack.undoItems() > 0) |
1443 | tsoots | 189 | { |
20691 | craig | 190 | if (itendU == currentStack.m_undoActions_.end()) |
5116 | tsoots | 191 | --itendU; |
192 | for (; itendU >= itstartU; --itendU) // insert undo actions |
||
193 | { |
||
194 | UndoState* state = *itendU; |
||
195 | UndoObject* target = state->undoObject(); |
||
1443 | tsoots | 196 | |
5116 | tsoots | 197 | if (target && (uid == -1 || target->getUId() == static_cast<uint>(uid))) |
198 | gui->insertUndoItem(target, state); |
||
199 | if (itendU == itstartU) |
||
200 | break; |
||
201 | } |
||
202 | } |
||
203 | |||
19245 | jghali | 204 | if (currentStack.redoItems() > 0) |
5116 | tsoots | 205 | { |
12140 | jghali | 206 | if (itendR > itstartR) |
207 | --itendR; |
||
5116 | tsoots | 208 | for (; itstartR <= itendR; ++itstartR) // insert redo actions |
1443 | tsoots | 209 | { |
5116 | tsoots | 210 | UndoState* state = *itstartR; |
211 | UndoObject* target = state->undoObject(); |
||
212 | |||
213 | if (target && (uid == -1 || target->getUId() == static_cast<uint>(uid))) |
||
1443 | tsoots | 214 | gui->insertRedoItem(target, state); |
5116 | tsoots | 215 | if (itendR == itstartR) |
216 | break; |
||
1443 | tsoots | 217 | } |
1111 | tsoots | 218 | } |
219 | } |
||
220 | |||
221 | void UndoManager::connectGuis() |
||
222 | { |
||
23757 | craig | 223 | for (uint i = 0; i < m_undoGuis.size(); ++i) |
1111 | tsoots | 224 | { |
23757 | craig | 225 | UndoGui *gui = m_undoGuis[i]; |
1111 | tsoots | 226 | |
5116 | tsoots | 227 | connect(gui, SIGNAL(undo(int)), this, SLOT(undo(int))); |
228 | connect(gui, SIGNAL(redo(int)), this, SLOT(redo(int))); |
||
22601 | craig | 229 | connect(this, SIGNAL(newAction(UndoObject*,UndoState*)), gui, SLOT(insertUndoItem(UndoObject*,UndoState*))); |
1111 | tsoots | 230 | connect(this, SIGNAL(popBack()), gui, SLOT(popBack())); |
231 | connect(this, SIGNAL(undoSignal(int)), gui, SLOT(updateUndo(int))); |
||
232 | connect(this, SIGNAL(redoSignal(int)), gui, SLOT(updateRedo(int))); |
||
1457 | tsoots | 233 | connect(this, SIGNAL(clearRedo()), gui, SLOT(clearRedo())); |
4985 | cbradney | 234 | gui->setEnabled(true); |
235 | gui->updateUndoActions(); |
||
1111 | tsoots | 236 | } |
237 | } |
||
238 | |||
239 | void UndoManager::disconnectGuis() |
||
240 | { |
||
23757 | craig | 241 | for (uint i = 0; i < m_undoGuis.size(); ++i) |
1111 | tsoots | 242 | { |
23757 | craig | 243 | UndoGui *gui = m_undoGuis[i]; |
1111 | tsoots | 244 | |
5116 | tsoots | 245 | disconnect(gui, SIGNAL(undo(int)), this, SLOT(undo(int))); |
246 | disconnect(gui, SIGNAL(redo(int)), this, SLOT(redo(int))); |
||
1111 | tsoots | 247 | disconnect(this, SIGNAL(newAction(UndoObject*, UndoState*)), |
248 | gui, SLOT(insertUndoItem(UndoObject*, UndoState*))); |
||
249 | disconnect(this, SIGNAL(popBack()), gui, SLOT(popBack())); |
||
250 | disconnect(this, SIGNAL(undoSignal(int)), gui, SLOT(updateUndo(int))); |
||
251 | disconnect(this, SIGNAL(redoSignal(int)), gui, SLOT(updateRedo(int))); |
||
1457 | tsoots | 252 | disconnect(this, SIGNAL(clearRedo()), gui, SLOT(clearRedo())); |
4985 | cbradney | 253 | gui->setEnabled(false); |
1111 | tsoots | 254 | } |
255 | } |
||
256 | |||
257 | void UndoManager::removeGui(UndoGui* gui) |
||
258 | { |
||
23757 | craig | 259 | std::vector<UndoGui*>::iterator it = m_undoGuis.begin(); |
260 | while (it != m_undoGuis.end()) |
||
9783 | avox | 261 | { |
1111 | tsoots | 262 | if (*it == gui) |
23757 | craig | 263 | it = m_undoGuis.erase(it); |
9783 | avox | 264 | else |
265 | ++it; |
||
266 | } |
||
1111 | tsoots | 267 | } |
268 | |||
9783 | avox | 269 | |
1111 | tsoots | 270 | void UndoManager::switchStack(const QString& stackName) |
271 | { |
||
23757 | craig | 272 | if (stackName == m_currentDoc) |
6725 | tsoots | 273 | return; // already current stack |
23757 | craig | 274 | m_currentDoc = stackName; |
275 | if (!m_stacks.contains(m_currentDoc)) |
||
276 | m_stacks[m_currentDoc] = UndoStack(); |
||
1111 | tsoots | 277 | |
23757 | craig | 278 | m_stacks[m_currentDoc].setMaxSize(prefs_->getInt("historylength", 100)); |
279 | for (size_t i = 0; i < m_undoGuis.size(); ++i) |
||
280 | setState(m_undoGuis[i]); |
||
5116 | tsoots | 281 | |
10427 | cbradney | 282 | setTexts(); |
1111 | tsoots | 283 | } |
284 | |||
1252 | tsoots | 285 | void UndoManager::renameStack(const QString& newName) |
1111 | tsoots | 286 | { |
23757 | craig | 287 | if (m_currentDoc == newName) |
1190 | tsoots | 288 | return; |
1829 | tsoots | 289 | |
23757 | craig | 290 | if (m_stacks[m_currentDoc].size() == 0) |
23635 | jghali | 291 | { |
23757 | craig | 292 | m_currentDoc = newName; |
1880 | tsoots | 293 | return; |
294 | } |
||
295 | |||
23757 | craig | 296 | UndoStack tmp(m_stacks[m_currentDoc]); |
297 | m_stacks.remove(m_currentDoc); |
||
298 | m_stacks[newName] = tmp; |
||
299 | m_currentDoc = newName; |
||
1111 | tsoots | 300 | } |
301 | |||
1252 | tsoots | 302 | void UndoManager::removeStack(const QString& stackName) |
1111 | tsoots | 303 | { |
24730 | jghali | 304 | auto stackIt = m_stacks.find(stackName); |
305 | if (stackIt == m_stacks.end()) |
||
306 | return; |
||
307 | |||
308 | stackIt->clear(); |
||
309 | m_stacks.remove(stackName); |
||
310 | if (m_currentDoc == stackName) |
||
1111 | tsoots | 311 | { |
24730 | jghali | 312 | for (size_t i = 0; i < m_undoGuis.size(); ++i) |
313 | m_undoGuis[i]->clear(); |
||
314 | m_currentDoc = "__no_name__"; |
||
1111 | tsoots | 315 | } |
316 | } |
||
317 | |||
5938 | tsoots | 318 | void UndoManager::clearStack() |
319 | { |
||
23757 | craig | 320 | m_stacks[m_currentDoc].clear(); |
321 | for (size_t i = 0; i < m_undoGuis.size(); ++i) |
||
5938 | tsoots | 322 | { |
23757 | craig | 323 | m_undoGuis[i]->clear(); |
324 | setState(m_undoGuis[i]); |
||
5938 | tsoots | 325 | } |
326 | } |
||
327 | |||
1340 | tsoots | 328 | void UndoManager::action(UndoObject* target, UndoState* state, QPixmap *targetPixmap) |
1111 | tsoots | 329 | { |
22601 | craig | 330 | QPixmap *oldIcon = nullptr; |
1340 | tsoots | 331 | if (targetPixmap) |
332 | { |
||
333 | oldIcon = target->getUPixmap(); |
||
334 | target->setUPixmap(targetPixmap); |
||
335 | } |
||
1485 | tsoots | 336 | |
23757 | craig | 337 | if (!m_undoEnabled) // if so flush down the state |
1228 | tsoots | 338 | { |
24730 | jghali | 339 | auto *ts = dynamic_cast<TransactionState*>(state); |
1228 | tsoots | 340 | if (ts) // flush the TransactionObject too |
341 | delete target; |
||
342 | delete state; |
||
343 | return; |
||
344 | } |
||
345 | |||
11576 | avox | 346 | if (!isTransactionMode() && |
23757 | craig | 347 | (m_currentUndoObjectId == -1 || m_currentUndoObjectId == static_cast<long>(target->getUId()))) |
11576 | avox | 348 | { |
349 | // qDebug() << "UndoManager: new Action" << state->getName() << "for" << currentUndoObjectId_; |
||
1226 | tsoots | 350 | emit newAction(target, state); // send action to the guis |
11576 | avox | 351 | } |
1457 | tsoots | 352 | else |
11576 | avox | 353 | { |
1457 | tsoots | 354 | emit clearRedo(); |
11576 | avox | 355 | } |
356 | if (isTransactionMode()) |
||
357 | { |
||
358 | // qDebug() << "UndoManager: Action stored for transaction:" << transactions_.back() << target->getUName() << state->getName(); |
||
23757 | craig | 359 | m_transactions.back()->transactionState->pushBack(target, state); |
11576 | avox | 360 | } |
1213 | tsoots | 361 | else |
362 | { |
||
11576 | avox | 363 | // qDebug() << "UndoManager: Action executed:" << target->getUName() << state->getName(); |
5116 | tsoots | 364 | state->setUndoObject(target); |
23757 | craig | 365 | if (m_stacks[m_currentDoc].action(state)) |
16399 | jghali | 366 | emit popBack(); |
1213 | tsoots | 367 | } |
1340 | tsoots | 368 | if (targetPixmap) |
369 | target->setUPixmap(oldIcon); |
||
5116 | tsoots | 370 | |
10427 | cbradney | 371 | setTexts(); |
1111 | tsoots | 372 | } |
1477 | tsoots | 373 | |
1356 | tsoots | 374 | void UndoManager::action(UndoObject* target, UndoState* state, |
375 | const QString &targetName, QPixmap *targetPixmap) |
||
376 | { |
||
377 | QString oldName = target->getUName(); |
||
2877 | cbradney | 378 | if (!targetName.isEmpty()) |
1356 | tsoots | 379 | target->setUName(targetName); |
380 | action(target, state, targetPixmap); |
||
381 | target->setUName(oldName); |
||
382 | } |
||
1111 | tsoots | 383 | |
23757 | craig | 384 | UndoState* UndoManager::getLastUndo() |
385 | { |
||
386 | UndoState* state = m_stacks[m_currentDoc].getNextUndo(Um::GLOBAL_UNDO_MODE); |
||
17646 | craig | 387 | return state; |
17641 | craig | 388 | } |
389 | |||
1111 | tsoots | 390 | void UndoManager::undo(int steps) |
391 | { |
||
23757 | craig | 392 | if (!m_undoEnabled) |
5116 | tsoots | 393 | return; |
394 | |||
13349 | jghali | 395 | emit undoRedoBegin(); |
5116 | tsoots | 396 | setUndoEnabled(false); |
23757 | craig | 397 | m_stacks[m_currentDoc].undo(steps, m_currentUndoObjectId); |
5116 | tsoots | 398 | setUndoEnabled(true); |
399 | emit undoSignal(steps); |
||
400 | emit undoRedoDone(); |
||
10427 | cbradney | 401 | setTexts(); |
1111 | tsoots | 402 | } |
403 | |||
404 | void UndoManager::redo(int steps) |
||
405 | { |
||
23757 | craig | 406 | if (!m_undoEnabled) |
5116 | tsoots | 407 | return; |
408 | |||
13349 | jghali | 409 | emit undoRedoBegin(); |
5116 | tsoots | 410 | setUndoEnabled(false); |
23757 | craig | 411 | m_stacks[m_currentDoc].redo(steps, m_currentUndoObjectId); |
5116 | tsoots | 412 | setUndoEnabled(true); |
413 | emit redoSignal(steps); |
||
414 | emit undoRedoDone(); |
||
10427 | cbradney | 415 | setTexts(); |
1111 | tsoots | 416 | } |
417 | |||
24730 | jghali | 418 | bool UndoManager::hasUndoActions(int ) const |
1111 | tsoots | 419 | { |
5116 | tsoots | 420 | // TODO Needs to fixed for object specific mode |
24730 | jghali | 421 | auto currentStackIt = m_stacks.constFind(m_currentDoc); |
422 | if (currentStackIt != m_stacks.constEnd()) |
||
423 | return (currentStackIt->undoItems() > 0); |
||
424 | return false; |
||
5116 | tsoots | 425 | } |
1477 | tsoots | 426 | |
24730 | jghali | 427 | bool UndoManager::hasRedoActions(int ) const |
5116 | tsoots | 428 | { |
429 | // TODO Needs to be fixed for object specific mode |
||
24730 | jghali | 430 | auto currentStackIt = m_stacks.constFind(m_currentDoc); |
431 | if (currentStackIt != m_stacks.constEnd()) |
||
432 | return (currentStackIt->redoItems() > 0); |
||
433 | return false; |
||
1111 | tsoots | 434 | } |
435 | |||
5116 | tsoots | 436 | void UndoManager::showObject(int uid) |
1477 | tsoots | 437 | { |
23757 | craig | 438 | if (m_currentUndoObjectId == uid) |
5116 | tsoots | 439 | return; |
440 | setUndoEnabled(false); |
||
23757 | craig | 441 | m_currentUndoObjectId = uid; |
442 | for (uint i = 0; i < m_undoGuis.size(); ++i) |
||
5116 | tsoots | 443 | { |
444 | if (uid == -2) |
||
23757 | craig | 445 | m_undoGuis[i]->clear(); |
5116 | tsoots | 446 | else |
23757 | craig | 447 | setState(m_undoGuis[i], m_currentUndoObjectId); |
5116 | tsoots | 448 | } |
449 | setUndoEnabled(true); |
||
10427 | cbradney | 450 | setTexts(); |
1477 | tsoots | 451 | } |
452 | |||
5116 | tsoots | 453 | UndoObject* UndoManager::replaceObject(ulong uid, UndoObject *newUndoObject) |
1477 | tsoots | 454 | { |
22521 | craig | 455 | UndoObject *tmp = nullptr; |
456 | TransactionState* transaction_ = nullptr; |
||
23757 | craig | 457 | if (!m_transactions.empty()) |
458 | transaction_ = m_transactions.at(m_transactions.size()-1)->transactionState; |
||
459 | for (uint i = 0; i < m_stacks[m_currentDoc].m_undoActions_.size(); ++i) |
||
1477 | tsoots | 460 | { |
23757 | craig | 461 | UndoState *tmpState = m_stacks[m_currentDoc].m_undoActions_[i]; |
5116 | tsoots | 462 | TransactionState *ts = dynamic_cast<TransactionState*>(tmpState); |
463 | if (ts) |
||
464 | tmp = ts->replace(uid, newUndoObject); |
||
465 | else if (tmpState->undoObject() && tmpState->undoObject()->getUId() == uid) |
||
1477 | tsoots | 466 | { |
5116 | tsoots | 467 | tmp = tmpState->undoObject(); |
468 | tmpState->setUndoObject(newUndoObject); |
||
1477 | tsoots | 469 | } |
470 | } |
||
23757 | craig | 471 | for (uint i = 0; i < m_stacks[m_currentDoc].m_redoActions_.size(); ++i) |
17640 | craig | 472 | { |
23757 | craig | 473 | UndoState *tmpState = m_stacks[m_currentDoc].m_redoActions_[i]; |
17640 | craig | 474 | TransactionState *ts = dynamic_cast<TransactionState*>(tmpState); |
475 | if (ts) |
||
476 | tmp = ts->replace(uid, newUndoObject); |
||
477 | else if (tmpState->undoObject() && tmpState->undoObject()->getUId() == uid) |
||
478 | { |
||
479 | tmp = tmpState->undoObject(); |
||
480 | tmpState->setUndoObject(newUndoObject); |
||
481 | } |
||
482 | } |
||
5116 | tsoots | 483 | if (transaction_) // replace also in the currently open transaction |
484 | tmp = transaction_->replace(uid, newUndoObject); |
||
485 | return tmp; |
||
1477 | tsoots | 486 | } |
487 | |||
5116 | tsoots | 488 | void UndoManager::setHistoryLength(int steps) |
1213 | tsoots | 489 | { |
5116 | tsoots | 490 | if (steps >= 0) |
1213 | tsoots | 491 | { |
23757 | craig | 492 | m_stacks[m_currentDoc].setMaxSize(static_cast<uint>(steps)); |
493 | prefs_->set("historylength", m_stacks[m_currentDoc].maxSize()); |
||
1213 | tsoots | 494 | } |
495 | } |
||
496 | |||
7880 | fschmid | 497 | void UndoManager::setAllHistoryLengths(int steps) |
498 | { |
||
499 | if (steps >= 0) |
||
500 | { |
||
23757 | craig | 501 | for (StackMap::Iterator it = m_stacks.begin(); it != m_stacks.end(); ++it ) |
7880 | fschmid | 502 | { |
10469 | cbradney | 503 | it.value().setMaxSize(static_cast<uint>(steps)); |
7880 | fschmid | 504 | } |
505 | prefs_->set("historylength", steps); |
||
506 | } |
||
507 | } |
||
508 | |||
24730 | jghali | 509 | int UndoManager::getHistoryLength() const |
1111 | tsoots | 510 | { |
24730 | jghali | 511 | auto currentStackIt = m_stacks.constFind(m_currentDoc); |
512 | if ((currentStackIt != m_stacks.constEnd()) && (currentStackIt->redoItems() <= 0)) |
||
513 | return static_cast<int>(currentStackIt->maxSize()); |
||
514 | return -1; |
||
5116 | tsoots | 515 | } |
1477 | tsoots | 516 | |
24730 | jghali | 517 | bool UndoManager::isGlobalMode() const |
5116 | tsoots | 518 | { |
23757 | craig | 519 | return m_currentUndoObjectId == -1; |
5116 | tsoots | 520 | } |
1228 | tsoots | 521 | |
10427 | cbradney | 522 | void UndoManager::setTexts() |
5116 | tsoots | 523 | { |
19245 | jghali | 524 | ScribusMainWindow* scMW = ScCore->primaryMainWindow(); |
23757 | craig | 525 | UndoStack& currentStack = m_stacks[m_currentDoc]; |
19245 | jghali | 526 | |
527 | if (currentStack.undoItems() > 0) |
||
5116 | tsoots | 528 | { |
24730 | jghali | 529 | const UndoState *state = currentStack.getNextUndo(m_currentUndoObjectId); |
5116 | tsoots | 530 | if (state) |
19245 | jghali | 531 | scMW->scrActions["editUndoAction"]->setTexts(QString(Um::MenuUndo).arg(state->getName())); |
5116 | tsoots | 532 | else |
19245 | jghali | 533 | scMW->scrActions["editUndoAction"]->setTexts(Um::MenuUndoEmpty); |
5116 | tsoots | 534 | } |
535 | else |
||
19245 | jghali | 536 | scMW->scrActions["editUndoAction"]->setTexts(Um::MenuUndoEmpty); |
1228 | tsoots | 537 | |
19245 | jghali | 538 | if (currentStack.redoItems() > 0) |
5116 | tsoots | 539 | { |
24730 | jghali | 540 | const UndoState *state = currentStack.getNextRedo(m_currentUndoObjectId); |
5116 | tsoots | 541 | if (state) |
19245 | jghali | 542 | scMW->scrActions["editRedoAction"]->setTexts(QString(Um::MenuRedo).arg(state->getName())); |
5116 | tsoots | 543 | else |
19245 | jghali | 544 | scMW->scrActions["editRedoAction"]->setTexts(Um::MenuRedoEmpty); |
1111 | tsoots | 545 | } |
5116 | tsoots | 546 | else |
19245 | jghali | 547 | scMW->scrActions["editRedoAction"]->setTexts(Um::MenuRedoEmpty); |
1111 | tsoots | 548 | } |
549 | |||
5116 | tsoots | 550 | void UndoManager::deleteInstance() |
1477 | tsoots | 551 | { |
23757 | craig | 552 | delete m_instance; |
553 | m_instance = nullptr; |
||
1477 | tsoots | 554 | } |
555 | |||
5116 | tsoots | 556 | UndoManager::~UndoManager() |
1477 | tsoots | 557 | { |
5116 | tsoots | 558 | StackMap::iterator it; |
23757 | craig | 559 | for (it = m_stacks.begin(); it != m_stacks.end(); ++it) |
1477 | tsoots | 560 | { |
24730 | jghali | 561 | for (uint i = 0; i < it->size(); ++i) |
562 | it->clear(); |
||
1477 | tsoots | 563 | } |
23757 | craig | 564 | m_stacks.clear(); |
1477 | tsoots | 565 | } |
566 | |||
5116 | tsoots | 567 | /*************************************************************************************/ |
2199 | cbradney | 568 | |
2198 | cbradney | 569 | void UndoManager::languageChange() |
570 | { |
||
17735 | craig | 571 | UndoManager::ConnectPath = tr("Connect path"); |
2199 | cbradney | 572 | UndoManager::AddVGuide = tr("Add vertical guide"); |
573 | UndoManager::AddHGuide = tr("Add horizontal guide"); |
||
574 | UndoManager::DelVGuide = tr("Remove vertical guide"); |
||
575 | UndoManager::DelHGuide = tr("Remove horizontal guide"); |
||
9069 | subik | 576 | UndoManager::DelVAGuide = tr("Remove vertical auto guide"); |
577 | UndoManager::DelHAGuide = tr("Remove horizontal auto guide"); |
||
2199 | cbradney | 578 | UndoManager::MoveVGuide = tr("Move vertical guide"); |
579 | UndoManager::MoveHGuide = tr("Move horizontal guide"); |
||
580 | UndoManager::LockGuides = tr("Lock guides"); |
||
581 | UndoManager::UnlockGuides = tr("Unlock guides"); |
||
17644 | craig | 582 | UndoManager::Overprint = tr("Change overprint"); |
583 | UndoManager::BlendMode = tr("Change blend mode"); |
||
584 | UndoManager::ActionPDF = tr("Change action PDF"); |
||
2199 | cbradney | 585 | UndoManager::Move = tr("Move"); |
17640 | craig | 586 | UndoManager::NewMasterPage = tr("Add master page"); |
587 | UndoManager::DelMasterPage = tr("Del master page"); |
||
588 | UndoManager::ImportMasterPage = tr("Import master page"); |
||
589 | UndoManager::DuplicateMasterPage= tr("Duplicate master page"); |
||
19356 | jghali | 590 | UndoManager::ApplyMasterPage = tr("Apply Master Page"); |
591 | UndoManager::RenameMasterPage = tr("Rename Master Page"); |
||
17640 | craig | 592 | UndoManager::UniteItem = tr("Combine Polygons"); |
593 | UndoManager::SplitItem = tr("Split Polygons"); |
||
2199 | cbradney | 594 | UndoManager::Resize = tr("Resize"); |
595 | UndoManager::Rotate = tr("Rotate"); |
||
596 | UndoManager::MoveFromTo = tr("X1: %1, Y1: %2, %3\nX2: %4, Y2: %5, %6"); |
||
597 | UndoManager::ResizeFromTo = tr("W1: %1, H1: %2\nW2: %3, H2: %4"); |
||
4821 | cbradney | 598 | UndoManager::ImageOffset = tr("Change Image Offset"); |
599 | UndoManager::ImageScale = tr("Change Image Scale"); |
||
600 | UndoManager::ImageOffsetFromTo = tr("X1: %1, Y1: %2\nX2: %4, Y2: %5"); |
||
601 | UndoManager::ImageScaleFromTo = tr("X: %1, Y: %2\nX: %4, Y: %5"); |
||
2199 | cbradney | 602 | UndoManager::Selection = tr("Selection"); |
603 | UndoManager::Group = tr("Group"); |
||
604 | UndoManager::SelectionGroup = tr("Selection/Group"); |
||
605 | UndoManager::Create = tr("Create"); |
||
17640 | craig | 606 | UndoManager::LevelUp = tr("Level up"); |
17932 | jghali | 607 | UndoManager::LevelDown = tr("Level down"); |
608 | UndoManager::LevelTop = tr("Send to front"); |
||
609 | UndoManager::LevelBottom = tr("Send to bottom"); |
||
2199 | cbradney | 610 | UndoManager::CreateTo = tr("X: %1, Y: %2\nW: %3, H: %4"); |
611 | UndoManager::AlignDistribute = tr("Align/Distribute"); |
||
612 | UndoManager::ItemsInvolved = tr("Items involved"); |
||
13395 | jghali | 613 | UndoManager::ItemsInvolved2 = tr("More than 20 items involved"); |
2199 | cbradney | 614 | UndoManager::Cancel = tr("Cancel"); |
615 | UndoManager::SetFill = tr("Set fill color"); |
||
616 | UndoManager::ColorFromTo = tr("Color1: %1, Color2: %2"); |
||
617 | UndoManager::SetShade = tr("Set fill color shade"); |
||
618 | UndoManager::SetLineColor = tr("Set line color"); |
||
619 | UndoManager::SetLineShade = tr("Set line color shade"); |
||
620 | UndoManager::FlipH = tr("Flip horizontally"); |
||
621 | UndoManager::FlipV = tr("Flip vertically"); |
||
622 | UndoManager::Lock = tr("Lock"); |
||
17644 | craig | 623 | UndoManager::ResTyp = tr("Change image resolution"); |
2199 | cbradney | 624 | UndoManager::UnLock = tr("Unlock"); |
625 | UndoManager::SizeLock = tr("Lock size"); |
||
17709 | craig | 626 | UndoManager::GradTypeMask = tr("Set mask gradient type"); |
2199 | cbradney | 627 | UndoManager::SizeUnLock = tr("Unlock size"); |
4698 | cbradney | 628 | UndoManager::EnablePrint = tr("Enable Item Printing"); |
629 | UndoManager::DisablePrint = tr("Disable Item Printing"); |
||
2199 | cbradney | 630 | UndoManager::Ungroup = tr("Ungroup"); |
631 | UndoManager::Delete = tr("Delete"); |
||
632 | UndoManager::Rename = tr("Rename"); |
||
633 | UndoManager::FromTo = tr("From %1\nto %2"); |
||
634 | UndoManager::Paste = tr("Paste"); |
||
635 | UndoManager::Cut = tr("Cut"); |
||
17644 | craig | 636 | UndoManager::RoundCorner = tr("Change round corner"); |
2199 | cbradney | 637 | UndoManager::Transparency = tr("Set fill color transparency"); |
638 | UndoManager::LineTransparency = tr("Set line color transparency"); |
||
639 | UndoManager::LineStyle = tr("Set line style"); |
||
640 | UndoManager::LineEnd = tr("Set the style of line end"); |
||
641 | UndoManager::LineJoin = tr("Set the style of line join"); |
||
642 | UndoManager::LineWidth = tr("Set line width"); |
||
643 | UndoManager::NoStyle = tr("No style"); |
||
644 | UndoManager::CustomLineStyle = tr("Set custom line style"); |
||
645 | UndoManager::NoLineStyle = tr("Do not use custom line style"); |
||
646 | UndoManager::StartArrow = tr("Set start arrow"); |
||
647 | UndoManager::EndArrow = tr("Set end arrow"); |
||
7676 | cbradney | 648 | UndoManager::StartAndEndArrow = tr("Set start and end arrows"); |
2199 | cbradney | 649 | UndoManager::CreateTable = tr("Create table"); |
650 | UndoManager::RowsCols = tr("Rows: %1, Cols: %2"); |
||
24782 | jghali | 651 | UndoManager::CellBorders = tr("Set cell borders"); |
652 | UndoManager::CellFillColor = tr("Set cell fill color"); |
||
653 | UndoManager::CellFillShade = tr("Set cell fill shade"); |
||
654 | UndoManager::CellStyle = tr("Set cell style"); |
||
655 | UndoManager::TableFillColor = tr("Set table fill color"); |
||
656 | UndoManager::TableFillColorRst = tr("Reset table fill color"); |
||
657 | UndoManager::TableFillShade = tr("Set table fill shade"); |
||
658 | UndoManager::TableFillShadeRst = tr("Reset table fill shade"); |
||
659 | UndoManager::TableBorders = tr("Set table borders"); |
||
660 | UndoManager::TableLeftBorder = tr("Set table left border"); |
||
661 | UndoManager::TableLeftBorderRst = tr("Reset table left border"); |
||
662 | UndoManager::TableRightBorder = tr("Set table right border"); |
||
663 | UndoManager::TableRightBorderRst = tr("Reset table right border"); |
||
664 | UndoManager::TableBottomBorder = tr("Set table bottom border"); |
||
665 | UndoManager::TableBottomBorderRst = tr("Reset table bottom border"); |
||
666 | UndoManager::TableTopBorder = tr("Set table top border"); |
||
667 | UndoManager::TableTopBorderRst = tr("Reset table top border"); |
||
668 | UndoManager::TableStyle = tr("Set table style"); |
||
24802 | craig | 669 | UndoManager::TableRowHeight = tr("Set height of table row"); |
670 | UndoManager::TableColumnWidth = tr("Set width of table column"); |
||
2199 | cbradney | 671 | UndoManager::SetFont = tr("Set font"); |
672 | UndoManager::SetFontSize = tr("Set font size"); |
||
17709 | craig | 673 | UndoManager::StartArrowScale = tr("Set start arrow scale"); |
674 | UndoManager::EndArrowScale = tr("Set end arrow scale"); |
||
675 | UndoManager::SetFontSize = tr("Set font size"); |
||
2199 | cbradney | 676 | UndoManager::SetFontWidth = tr("Set font width"); |
17709 | craig | 677 | UndoManager::SetFontHeight = tr("Set font height"); |
678 | UndoManager::GradType = tr("Change fill gradient type"); |
||
679 | UndoManager::GradVal = tr("Change fill gradient values"); |
||
680 | UndoManager::GradValStroke = tr("Change stroke gradient values"); |
||
681 | UndoManager::GradCol = tr("Change gradient color"); |
||
682 | UndoManager::GradTypeStroke = tr("Change stroke gradient type"); |
||
2199 | cbradney | 683 | UndoManager::SetFontFill = tr("Set font fill color"); |
684 | UndoManager::SetFontStroke = tr("Set font stroke color"); |
||
685 | UndoManager::SetFontFillShade = tr("Set font fill color shade"); |
||
686 | UndoManager::SetFontStrokeShade = tr("Set font stroke color shade"); |
||
687 | UndoManager::SetKerning = tr("Set kerning"); |
||
688 | UndoManager::SetLineSpacing = tr("Set line spacing"); |
||
689 | UndoManager::SetStyle = tr("Set paragraph style"); |
||
690 | UndoManager::SetLanguage = tr("Set language"); |
||
691 | UndoManager::AlignText = tr("Align text"); |
||
692 | UndoManager::SetFontEffect = tr("Set font effect"); |
||
693 | UndoManager::ImageFrame = tr("Image frame"); |
||
694 | UndoManager::TextFrame = tr("Text frame"); |
||
17744 | craig | 695 | UndoManager::Layer = tr("Layer"); |
11850 | herm | 696 | UndoManager::LatexFrame = tr("Render frame"); |
2199 | cbradney | 697 | UndoManager::Polygon = tr("Polygon"); |
17709 | craig | 698 | UndoManager::EditPolygon = tr("Edit polygon"); |
17735 | craig | 699 | UndoManager::EditArc = tr("Edit arc"); |
700 | UndoManager::EditSpiral = tr("Edit spiral"); |
||
2199 | cbradney | 701 | UndoManager::BezierCurve = tr("Bezier curve"); |
702 | UndoManager::Polyline = tr("Polyline"); |
||
3676 | cbradney | 703 | UndoManager::PathText = tr("Text on a Path"); |
2199 | cbradney | 704 | UndoManager::ConvertTo = tr("Convert to"); |
24103 | jghali | 705 | UndoManager::ImportAI = tr("Import AI drawing"); |
706 | UndoManager::ImportApplePages = tr("Import Apple Pages document"); |
||
707 | UndoManager::ImportBarcode = tr("Import Barcode"); |
||
708 | UndoManager::ImportCDR = tr("Import CorelDraw drawing"); |
||
709 | UndoManager::ImportCGM = tr("Import CGM drawing"); |
||
710 | UndoManager::ImportCVG = tr("Import Calamus CVG drawing"); |
||
711 | UndoManager::ImportDRW = tr("Import Micrografx Draw drawing"); |
||
712 | UndoManager::ImportEMF = tr("Import EMF drawing"); |
||
713 | UndoManager::ImportEPS = tr("Import EPS image"); |
||
714 | UndoManager::ImportFreehand = tr("Import FreeHand document"); |
||
715 | UndoManager::ImportIDML = tr("Import IDML document"); |
||
716 | UndoManager::ImportOOoDraw = tr("Import OpenOffice.org Draw image"); |
||
717 | UndoManager::ImportPageMaker = tr("Import PageMaker document"); |
||
718 | UndoManager::ImportPDF = tr("Import PDF document"); |
||
719 | UndoManager::ImportPict = tr("Import Macintosh Pict drawing"); |
||
720 | UndoManager::ImportPublisher = tr("Import MS Publisher document"); |
||
721 | UndoManager::ImportQXP = tr("Import QuarkXPress document"); |
||
722 | UndoManager::ImportShape = tr("Import Shape drawing"); |
||
723 | UndoManager::ImportSML = tr("Import Kivio stencil"); |
||
2199 | cbradney | 724 | UndoManager::ImportSVG = tr("Import SVG image"); |
24103 | jghali | 725 | UndoManager::ImportSVM = tr("Import SVM image"); |
13957 | herm | 726 | UndoManager::ImportUniconv = tr("Import Uniconvertor image"); |
24103 | jghali | 727 | UndoManager::ImportViva = tr("Import Viva Designer document"); |
728 | UndoManager::ImportVSD = tr("Import Visio document"); |
||
729 | UndoManager::ImportWMF = tr("Import WMF drawing"); |
||
730 | UndoManager::ImportWPG = tr("Import WordPerfect graphic"); |
||
731 | UndoManager::ImportXara = tr("Import Xara image"); |
||
11615 | fschmid | 732 | UndoManager::ImportXfig = tr("Import XFig drawing"); |
24103 | jghali | 733 | UndoManager::ImportXPS = tr("Import XPS document"); |
734 | UndoManager::ImportZMF = tr("Import Zoner Draw image"); |
||
17641 | craig | 735 | UndoManager::Columns = tr("Change columns"); |
736 | UndoManager::ColumnsGap = tr("Change columns gap"); |
||
737 | UndoManager::TextFrameDist = tr("Change text to frame distance"); |
||
2199 | cbradney | 738 | UndoManager::ScratchSpace = tr("Scratch space"); |
5620 | jghali | 739 | UndoManager::ObjectFrame = tr("Text flows around the frame"); |
2199 | cbradney | 740 | UndoManager::BoundingBox = tr("Text flows around bounding box"); |
741 | UndoManager::ContourLine = tr("Text flows around contour line"); |
||
17709 | craig | 742 | UndoManager::ImageClip = tr("Text flows around image clipping path"); |
2199 | cbradney | 743 | UndoManager::NoTextFlow = tr("No text flow"); |
5620 | jghali | 744 | UndoManager::NoObjectFrame = tr("No object frame"); |
2199 | cbradney | 745 | UndoManager::NoBoundingBox = tr("No bounding box"); |
746 | UndoManager::NoContourLine = tr("No contour line"); |
||
17644 | craig | 747 | UndoManager::ShowImage = tr("Show image"); |
2199 | cbradney | 748 | UndoManager::PageNmbr = tr("Page %1"); |
749 | UndoManager::ImageScaling = tr("Set image scaling"); |
||
750 | UndoManager::FrameSize = tr("Frame size"); |
||
17709 | craig | 751 | UndoManager::MeshGradient = tr("Create mesh gradient"); |
752 | UndoManager::ChangeMeshGradient = tr("Change mesh gradient"); |
||
753 | UndoManager::Mode = tr("Change Mode"); |
||
2199 | cbradney | 754 | UndoManager::FreeScaling = tr("Free scaling"); |
755 | UndoManager::KeepRatio = tr("Keep aspect ratio"); |
||
756 | UndoManager::BreakRatio = tr("Break aspect ratio"); |
||
757 | UndoManager::EditContourLine = tr("Edit contour line"); |
||
758 | UndoManager::EditShape = tr("Edit shape"); |
||
13346 | subik | 759 | UndoManager::ChangeShapeType = tr("Change shape type"); |
2199 | cbradney | 760 | UndoManager::ResetContourLine = tr("Reset contour line"); |
761 | UndoManager::AddPage = tr("Add page"); |
||
762 | UndoManager::AddPages = tr("Add pages"); |
||
17641 | craig | 763 | UndoManager::ReplaceText = tr("Replace text"); |
764 | UndoManager::FirstLineOffset = tr("Change First Line Offset"); |
||
765 | UndoManager::DeleteText = tr("Delete text"); |
||
766 | UndoManager::InsertText = tr("Insert text"); |
||
767 | UndoManager::AppendText = tr("Append text"); |
||
768 | UndoManager::ImportText = tr("Import text"); |
||
769 | UndoManager::ClearText = tr("Clear text"); |
||
19188 | craig | 770 | UndoManager::TruncateText = tr("Truncate text"); |
17641 | craig | 771 | UndoManager::AddLoremIpsum = tr("Add Lorem Ipsum"); |
17826 | craig | 772 | UndoManager::InsertMark = tr("Insert mark"); |
773 | UndoManager::InsertNote = tr("Insert note"); |
||
774 | UndoManager::EditMark = tr("Edit mark"); |
||
775 | UndoManager::DeleteMark = tr("Delete mark"); |
||
776 | UndoManager::DeleteNote = tr("Delete note"); |
||
777 | UndoManager::NewNotesStyle = tr("Add note style"); |
||
778 | UndoManager::EditNotesStyle = tr("Edit note style"); |
||
779 | UndoManager::DeleteNotesStyle = tr("Delete note style"); |
||
780 | UndoManager::DeleteNotesStyle = tr("Delete note style"); |
||
2199 | cbradney | 781 | UndoManager::DeletePage = tr("Delete page"); |
782 | UndoManager::DeletePages = tr("Delete pages"); |
||
16509 | craig | 783 | UndoManager::ChangePageProps = tr("Change page properties"); |
2199 | cbradney | 784 | UndoManager::AddLayer = tr("Add layer"); |
17932 | jghali | 785 | UndoManager::DuplicateLayer = tr("Duplicate layer %1"); |
2199 | cbradney | 786 | UndoManager::DeleteLayer = tr("Delete layer"); |
787 | UndoManager::RenameLayer = tr("Rename layer"); |
||
788 | UndoManager::RaiseLayer = tr("Raise layer"); |
||
17709 | craig | 789 | UndoManager::GradPos = tr("Change gradient position"); |
2199 | cbradney | 790 | UndoManager::LowerLayer = tr("Lower layer"); |
791 | UndoManager::SendToLayer = tr("Send to layer"); |
||
792 | UndoManager::PrintLayer = tr("Enable printing of layer"); |
||
793 | UndoManager::DoNotPrintLayer = tr("Disable printing of layer"); |
||
794 | UndoManager::SetLayerName = tr("Change name of the layer"); |
||
17932 | jghali | 795 | UndoManager::FlowLayer = tr("Enable text flow around for lower layers"); |
796 | UndoManager::DisableFlowLayer = tr("Disable text flow around for lower layers"); |
||
797 | UndoManager::SetLayerBlendMode = tr("Set layer blend mode"); |
||
16497 | craig | 798 | UndoManager::SetLayerTransparency=tr("Set layer opacity"); |
17932 | jghali | 799 | UndoManager::SetLayerLocked = tr("Lock layer"); |
800 | UndoManager::SetLayerUnlocked = tr("Unlock layer"); |
||
2199 | cbradney | 801 | UndoManager::GetImage = tr("Get image"); |
10321 | mrdocs | 802 | UndoManager::ChangeFormula = tr("Change formula"); |
17709 | craig | 803 | UndoManager::Duplicate = tr("Duplicate"); |
4739 | tsoots | 804 | UndoManager::MultipleDuplicate = tr("Multiple duplicate"); |
17709 | craig | 805 | UndoManager::RemoveMeshPatch = tr("Remove mesh patch"); |
5184 | avox | 806 | UndoManager::ApplyTextStyle = tr("Apply text style"); |
17641 | craig | 807 | UndoManager::RemoveTextStyle = tr("Remove text style"); |
5184 | avox | 808 | UndoManager::MenuUndo = tr("&Undo: %1", "f.e. Undo: Move"); |
5116 | tsoots | 809 | UndoManager::MenuUndoEmpty = tr("&Undo"); |
5184 | avox | 810 | UndoManager::MenuRedo = tr("&Redo: %1", "f.e. Redo: Move"); |
5116 | tsoots | 811 | UndoManager::MenuRedoEmpty = tr("&Redo"); |
6139 | tsoots | 812 | UndoManager::EditContour = tr("Edit contour line"); |
6263 | tsoots | 813 | UndoManager::ResetControlPoint = tr("Reset control point"); |
814 | UndoManager::ResetControlPoints = tr("Reset control points"); |
||
6266 | tsoots | 815 | UndoManager::ImageEffects = tr("Apply image effects"); |
6820 | tsoots | 816 | UndoManager::InsertFrame = tr("Insert frame"); |
7100 | tsoots | 817 | UndoManager::AdjustFrameToImage = tr("Adjust frame to the image size"); |
7896 | tsoots | 818 | UndoManager::RemoveAllGuides = tr("Remove all guides"); |
17709 | craig | 819 | UndoManager::RemoveAllPageGuides= tr("Remove page guides"); |
7897 | tsoots | 820 | UndoManager::Copy = tr("Copy"); |
821 | UndoManager::CopyPage = tr("Copy page"); |
||
17213 | craig | 822 | UndoManager::MovePage = tr("Move page"); |
19889 | craig | 823 | UndoManager::SwapPage = tr("Swap page"); |
17640 | craig | 824 | UndoManager::ImportPage = tr("Import page"); |
8952 | tsoots | 825 | UndoManager::ToOutlines = tr("Convert to outlines"); |
17932 | jghali | 826 | UndoManager::LinkTextFrame = tr("Link text frame"); |
827 | UndoManager::UnlinkTextFrame = tr("Unlink text frame"); |
||
17224 | craig | 828 | UndoManager::ClearImage = tr("Clear image frame content"); |
17932 | jghali | 829 | UndoManager::PathOperation = tr("Path Operation"); |
17640 | craig | 830 | UndoManager::ChangePageAttrs = tr("Change Page Attributes"); |
17709 | craig | 831 | UndoManager::Transform = tr("Transform"); |
17791 | jghali | 832 | UndoManager::WeldItems = tr("Weld Items"); |
19863 | craig | 833 | UndoManager::UnweldItems = tr("Unweld Items"); |
19324 | jghali | 834 | UndoManager::SoftShadow = tr("Drop Shadow"); |
835 | UndoManager::SoftShadowColor = tr("Drop Shadow Color"); |
||
836 | UndoManager::SoftShadowShade = tr("Drop Shadow Shade"); |
||
837 | UndoManager::SoftShadowBlurRadius= tr("Drop Shadow Blur Radius"); |
||
838 | UndoManager::SoftShadowXOffset = tr("Drop Shadow X Offset"); |
||
839 | UndoManager::SoftShadowYOffset = tr("Drop Shadow Y Offset"); |
||
840 | UndoManager::SoftShadowOpacity = tr("Drop Shadow Opacity"); |
||
841 | UndoManager::SoftShadowBlendMode= tr("Drop Shadow Blend Mode"); |
||
2198 | cbradney | 842 | } |
843 | |||
1190 | tsoots | 844 | void UndoManager::initIcons() |
845 | { |
||
1693 | craig | 846 | QString iconDir = ScPaths::instance().iconDir(); |
1247 | tsoots | 847 | |
1250 | tsoots | 848 | /*** Icons for UndoObjects *******************************************/ |
9142 | cbradney | 849 | UndoManager::IImageFrame = new QPixmap(iconDir + "16/insert-image.png"); |
850 | UndoManager::ITextFrame = new QPixmap(iconDir + "16/insert-text-frame.png"); |
||
10321 | mrdocs | 851 | UndoManager::ILatexFrame = new QPixmap(iconDir + "16/insert-latex.png"); |
21740 | craig | 852 | UndoManager::ILine = new QPixmap(iconDir + "stift.png"); |
9162 | cbradney | 853 | UndoManager::IPolygon = new QPixmap(iconDir + "16/draw-polygon.png"); |
854 | UndoManager::IPolyline = new QPixmap(iconDir + "16/draw-bezier-curves.png"); |
||
1250 | tsoots | 855 | // UndoManager::IPathText = new QPixmap(iconDir + "?"; |
1254 | tsoots | 856 | UndoManager::IGroup = new QPixmap(iconDir + "u_group.png"); |
1250 | tsoots | 857 | /*** Icons for actions ***********************************************/ |
858 | UndoManager::IMove = new QPixmap(iconDir + "u_move.png"); |
||
859 | UndoManager::IResize = new QPixmap(iconDir + "u_resize.png"); |
||
860 | UndoManager::IRotate = new QPixmap(iconDir + "u_rotate.png"); |
||
1247 | tsoots | 861 | UndoManager::IAlignDistribute = new QPixmap(iconDir + "u_align.png"); |
1250 | tsoots | 862 | UndoManager::IGuides = new QPixmap(iconDir + "u_margins.png"); |
863 | UndoManager::ILockGuides = new QPixmap(iconDir + "u_margins_locked.png"); |
||
1286 | tsoots | 864 | UndoManager::IFill = new QPixmap(iconDir + "u_fill.png"); |
865 | UndoManager::IShade = new QPixmap(iconDir + "u_shade.png"); |
||
1340 | tsoots | 866 | UndoManager::IFlipH = new QPixmap(iconDir + "u_fliph.png"); |
867 | UndoManager::IFlipV = new QPixmap(iconDir + "u_flipv.png"); |
||
1290 | tsoots | 868 | UndoManager::ILock = new QPixmap(iconDir + "u_lock.png"); |
869 | UndoManager::IUnLock = new QPixmap(iconDir + "u_unlock.png"); |
||
4698 | cbradney | 870 | UndoManager::IEnablePrint = new QPixmap(iconDir + "u_enableprint.png"); |
871 | UndoManager::IDisablePrint = new QPixmap(iconDir + "u_disableprint.png"); |
||
1340 | tsoots | 872 | UndoManager::IDelete = new QPixmap(iconDir + "u_delete.png"); |
873 | UndoManager::ICreate = new QPixmap(iconDir + "u_create.png"); |
||
9142 | cbradney | 874 | UndoManager::IPaste = new QPixmap(iconDir + "16/edit-paste.png"); |
1369 | tsoots | 875 | UndoManager::ICut = new QPixmap(iconDir + "u_cut.png"); |
1371 | tsoots | 876 | UndoManager::ITransparency = new QPixmap(iconDir + "u_transp.png"); |
1383 | tsoots | 877 | UndoManager::ILineStyle = new QPixmap(iconDir + "u_line.png"); |
1391 | tsoots | 878 | UndoManager::IArrow = new QPixmap(iconDir + "u_arrow.png"); |
1396 | tsoots | 879 | UndoManager::ITable = new QPixmap(iconDir + "frame_table.png"); |
1399 | tsoots | 880 | UndoManager::IFont = new QPixmap(iconDir + "u_font.png"); |
24103 | jghali | 881 | UndoManager::IAI = new QPixmap(iconDir + "u_eps.png"); // using the icon for EPS for now |
882 | UndoManager::IEPS = new QPixmap(iconDir + "u_eps.png"); |
||
1440 | tsoots | 883 | UndoManager::IImportOOoDraw = new QPixmap(iconDir + "ooo_draw.png"); |
884 | UndoManager::ISVG = new QPixmap(iconDir + "u_svg.png"); |
||
13957 | herm | 885 | UndoManager::IUniconv = new QPixmap(iconDir + "u_svg.png"); // using the icon for SVG for now |
24103 | jghali | 886 | UndoManager::IWMF = new QPixmap(iconDir + "u_eps.png"); // using the icon for EPS for now |
11615 | fschmid | 887 | UndoManager::IXFIG = new QPixmap(iconDir + "u_eps.png"); // using the icon for EPS for now |
1495 | tsoots | 888 | UndoManager::IImageScaling = new QPixmap(iconDir + "u_scale_image.png"); |
1509 | tsoots | 889 | UndoManager::IBorder = new QPixmap(iconDir + "u_shape.png"); |
9162 | cbradney | 890 | UndoManager::IDocument = new QPixmap(iconDir + "16/document-new.png"); |
1688 | tsoots | 891 | // UndoManager::ILayer = new QPixmap(iconDir + "u_layer.png"); |
892 | // UndoManager::ILayerAction = new QPixmap(iconDir + "u_layer_action.png"); |
||
1697 | tsoots | 893 | // UndoManager::IUp = new QPixmap(iconDir + "u_up.png"); |
894 | // UndoManager::IDown = new QPixmap(iconDir + "u_down.png"); |
||
1832 | tsoots | 895 | // UndoManager::IGetImage = new QPixmap(iconDir + "u_get_image.png"); |
4739 | tsoots | 896 | UndoManager::IMultipleDuplicate = new QPixmap(iconDir + "u_multiple.png"); |
1190 | tsoots | 897 | } |
17735 | craig | 898 | QString UndoManager::ConnectPath = ""; |
2199 | cbradney | 899 | QString UndoManager::AddVGuide = ""; |
900 | QString UndoManager::AddHGuide = ""; |
||
901 | QString UndoManager::DelVGuide = ""; |
||
902 | QString UndoManager::DelHGuide = ""; |
||
9069 | subik | 903 | QString UndoManager::DelVAGuide = ""; |
904 | QString UndoManager::DelHAGuide = ""; |
||
17709 | craig | 905 | QString UndoManager::Mode = ""; |
2199 | cbradney | 906 | QString UndoManager::MoveVGuide = ""; |
907 | QString UndoManager::MoveHGuide = ""; |
||
17640 | craig | 908 | QString UndoManager::UniteItem = ""; |
909 | QString UndoManager::SplitItem = ""; |
||
2199 | cbradney | 910 | QString UndoManager::LockGuides = ""; |
911 | QString UndoManager::UnlockGuides = ""; |
||
17644 | craig | 912 | QString UndoManager::Overprint = ""; |
913 | QString UndoManager::BlendMode = ""; |
||
914 | QString UndoManager::ActionPDF = ""; |
||
2199 | cbradney | 915 | QString UndoManager::Move = ""; |
17640 | craig | 916 | QString UndoManager::NewMasterPage = ""; |
17709 | craig | 917 | QString UndoManager::GradType = ""; |
918 | QString UndoManager::GradPos = ""; |
||
919 | QString UndoManager::GradVal = ""; |
||
920 | QString UndoManager::GradValStroke = ""; |
||
921 | QString UndoManager::GradCol = ""; |
||
922 | QString UndoManager::GradTypeStroke = ""; |
||
17640 | craig | 923 | QString UndoManager::ImportMasterPage = ""; |
924 | QString UndoManager::DuplicateMasterPage= ""; |
||
925 | QString UndoManager::DelMasterPage = ""; |
||
19356 | jghali | 926 | QString UndoManager::ApplyMasterPage = ""; |
927 | QString UndoManager::RenameMasterPage = ""; |
||
2199 | cbradney | 928 | QString UndoManager::Resize = ""; |
929 | QString UndoManager::Rotate = ""; |
||
930 | QString UndoManager::MoveFromTo = ""; |
||
4821 | cbradney | 931 | QString UndoManager::ImageOffset = ""; |
932 | QString UndoManager::ImageScale = ""; |
||
17644 | craig | 933 | QString UndoManager::ResTyp = ""; |
934 | QString UndoManager::ShowImage = ""; |
||
17709 | craig | 935 | QString UndoManager::RemoveMeshPatch = ""; |
936 | QString UndoManager::StartArrowScale = ""; |
||
937 | QString UndoManager::EndArrowScale = ""; |
||
4821 | cbradney | 938 | QString UndoManager::ImageOffsetFromTo = ""; |
939 | QString UndoManager::ImageScaleFromTo = ""; |
||
2199 | cbradney | 940 | QString UndoManager::ResizeFromTo = ""; |
941 | QString UndoManager::Selection = ""; |
||
942 | QString UndoManager::Group = ""; |
||
943 | QString UndoManager::SelectionGroup = ""; |
||
944 | QString UndoManager::Create = ""; |
||
17644 | craig | 945 | QString UndoManager::RoundCorner = ""; |
2199 | cbradney | 946 | QString UndoManager::CreateTo = ""; |
947 | QString UndoManager::AlignDistribute = ""; |
||
948 | QString UndoManager::ItemsInvolved = ""; |
||
13395 | jghali | 949 | QString UndoManager::ItemsInvolved2 = ""; |
22371 | jghali | 950 | int UndoManager::ItemsInvolvedLimit = 20; |
2199 | cbradney | 951 | QString UndoManager::Cancel = ""; |
17641 | craig | 952 | QString UndoManager::TextFrameDist = ""; |
2199 | cbradney | 953 | QString UndoManager::SetFill = ""; |
954 | QString UndoManager::ColorFromTo = ""; |
||
955 | QString UndoManager::SetShade = ""; |
||
956 | QString UndoManager::SetLineColor = ""; |
||
957 | QString UndoManager::SetLineShade = ""; |
||
958 | QString UndoManager::FlipH = ""; |
||
959 | QString UndoManager::FlipV = ""; |
||
960 | QString UndoManager::Lock = ""; |
||
17640 | craig | 961 | QString UndoManager::LevelUp = ""; |
962 | QString UndoManager::LevelTop = ""; |
||
963 | QString UndoManager::LevelBottom = ""; |
||
964 | QString UndoManager::LevelDown = ""; |
||
2199 | cbradney | 965 | QString UndoManager::UnLock = ""; |
966 | QString UndoManager::SizeLock = ""; |
||
967 | QString UndoManager::SizeUnLock = ""; |
||
4698 | cbradney | 968 | QString UndoManager::EnablePrint = ""; |
969 | QString UndoManager::DisablePrint = ""; |
||
2199 | cbradney | 970 | QString UndoManager::Ungroup = ""; |
971 | QString UndoManager::Delete = ""; |
||
972 | QString UndoManager::Rename = ""; |
||
973 | QString UndoManager::FromTo = ""; |
||
974 | QString UndoManager::Paste = ""; |
||
975 | QString UndoManager::Cut = ""; |
||
976 | QString UndoManager::Transparency = ""; |
||
977 | QString UndoManager::LineTransparency = ""; |
||
978 | QString UndoManager::LineStyle = ""; |
||
17641 | craig | 979 | QString UndoManager::FirstLineOffset = ""; |
2199 | cbradney | 980 | QString UndoManager::LineEnd = ""; |
981 | QString UndoManager::LineJoin = ""; |
||
982 | QString UndoManager::LineWidth = ""; |
||
983 | QString UndoManager::NoStyle = ""; |
||
984 | QString UndoManager::CustomLineStyle = ""; |
||
985 | QString UndoManager::NoLineStyle = ""; |
||
986 | QString UndoManager::StartArrow = ""; |
||
987 | QString UndoManager::EndArrow = ""; |
||
7676 | cbradney | 988 | QString UndoManager::StartAndEndArrow = ""; |
2199 | cbradney | 989 | QString UndoManager::CreateTable = ""; |
990 | QString UndoManager::RowsCols = ""; |
||
24782 | jghali | 991 | QString UndoManager::CellBorders = ""; |
992 | QString UndoManager::CellFillColor = ""; |
||
993 | QString UndoManager::CellFillShade = ""; |
||
994 | QString UndoManager::CellStyle = ""; |
||
995 | QString UndoManager::TableFillColor = ""; |
||
996 | QString UndoManager::TableFillColorRst = ""; |
||
997 | QString UndoManager::TableFillShade = ""; |
||
998 | QString UndoManager::TableFillShadeRst = ""; |
||
999 | QString UndoManager::TableBorders = ""; |
||
1000 | QString UndoManager::TableLeftBorder = ""; |
||
1001 | QString UndoManager::TableLeftBorderRst = ""; |
||
1002 | QString UndoManager::TableRightBorder = ""; |
||
1003 | QString UndoManager::TableRightBorderRst = ""; |
||
1004 | QString UndoManager::TableBottomBorder = ""; |
||
1005 | QString UndoManager::TableBottomBorderRst = ""; |
||
1006 | QString UndoManager::TableTopBorder = ""; |
||
1007 | QString UndoManager::TableTopBorderRst = ""; |
||
1008 | QString UndoManager::TableStyle = ""; |
||
24802 | craig | 1009 | QString UndoManager::TableRowHeight = ""; |
1010 | QString UndoManager::TableColumnWidth = ""; |
||
2199 | cbradney | 1011 | QString UndoManager::SetFont = ""; |
1012 | QString UndoManager::SetFontSize = ""; |
||
1013 | QString UndoManager::SetFontWidth = ""; |
||
3676 | cbradney | 1014 | QString UndoManager::SetFontHeight = ""; |
2199 | cbradney | 1015 | QString UndoManager::SetFontFill = ""; |
1016 | QString UndoManager::SetFontStroke = ""; |
||
1017 | QString UndoManager::SetFontFillShade = ""; |
||
1018 | QString UndoManager::SetFontStrokeShade = ""; |
||
1019 | QString UndoManager::SetKerning = ""; |
||
1020 | QString UndoManager::SetLineSpacing = ""; |
||
1021 | QString UndoManager::SetStyle = ""; |
||
1022 | QString UndoManager::SetLanguage = ""; |
||
1023 | QString UndoManager::AlignText = ""; |
||
1024 | QString UndoManager::SetFontEffect = ""; |
||
1025 | QString UndoManager::ImageFrame = ""; |
||
1026 | QString UndoManager::TextFrame = ""; |
||
17744 | craig | 1027 | QString UndoManager::Layer = ""; |
10321 | mrdocs | 1028 | QString UndoManager::LatexFrame = ""; |
2199 | cbradney | 1029 | QString UndoManager::Polygon = ""; |
17709 | craig | 1030 | QString UndoManager::EditPolygon = ""; |
17735 | craig | 1031 | QString UndoManager::EditArc = ""; |
1032 | QString UndoManager::EditSpiral = ""; |
||
2199 | cbradney | 1033 | QString UndoManager::BezierCurve = ""; |
1034 | QString UndoManager::Polyline = ""; |
||
3676 | cbradney | 1035 | QString UndoManager::PathText = ""; |
2199 | cbradney | 1036 | QString UndoManager::ConvertTo = ""; |
24103 | jghali | 1037 | QString UndoManager::ImportAI = ""; |
1038 | QString UndoManager::ImportApplePages = ""; |
||
1039 | QString UndoManager::ImportBarcode = ""; |
||
1040 | QString UndoManager::ImportCDR = ""; |
||
1041 | QString UndoManager::ImportCGM = ""; |
||
1042 | QString UndoManager::ImportCVG = ""; |
||
1043 | QString UndoManager::ImportDRW = ""; |
||
1044 | QString UndoManager::ImportEMF = ""; |
||
1045 | QString UndoManager::ImportEPS = ""; |
||
1046 | QString UndoManager::ImportFreehand = ""; |
||
1047 | QString UndoManager::ImportIDML = ""; |
||
1048 | QString UndoManager::ImportOOoDraw = ""; |
||
1049 | QString UndoManager::ImportPageMaker = ""; |
||
1050 | QString UndoManager::ImportPDF = ""; |
||
1051 | QString UndoManager::ImportPict = ""; |
||
1052 | QString UndoManager::ImportPublisher = ""; |
||
1053 | QString UndoManager::ImportQXP = ""; |
||
1054 | QString UndoManager::ImportShape = ""; |
||
1055 | QString UndoManager::ImportSML = ""; |
||
2199 | cbradney | 1056 | QString UndoManager::ImportSVG = ""; |
24103 | jghali | 1057 | QString UndoManager::ImportSVM = ""; |
13957 | herm | 1058 | QString UndoManager::ImportUniconv = ""; |
24103 | jghali | 1059 | QString UndoManager::ImportViva = ""; |
1060 | QString UndoManager::ImportVSD = ""; |
||
1061 | QString UndoManager::ImportWMF = ""; |
||
1062 | QString UndoManager::ImportWPG = ""; |
||
1063 | QString UndoManager::ImportXara = ""; |
||
11615 | fschmid | 1064 | QString UndoManager::ImportXfig = ""; |
24103 | jghali | 1065 | QString UndoManager::ImportXPS = ""; |
1066 | QString UndoManager::ImportZMF = ""; |
||
2199 | cbradney | 1067 | QString UndoManager::ScratchSpace = ""; |
5620 | jghali | 1068 | QString UndoManager::ObjectFrame = ""; |
2199 | cbradney | 1069 | QString UndoManager::BoundingBox = ""; |
17709 | craig | 1070 | QString UndoManager::MeshGradient = ""; |
1071 | QString UndoManager::ChangeMeshGradient = ""; |
||
2199 | cbradney | 1072 | QString UndoManager::ContourLine = ""; |
16497 | craig | 1073 | QString UndoManager::ImageClip = ""; |
2199 | cbradney | 1074 | QString UndoManager::NoTextFlow = ""; |
5620 | jghali | 1075 | QString UndoManager::NoObjectFrame = ""; |
2199 | cbradney | 1076 | QString UndoManager::NoBoundingBox = ""; |
1077 | QString UndoManager::NoContourLine = ""; |
||
1078 | QString UndoManager::PageNmbr = ""; |
||
1079 | QString UndoManager::ImageScaling = ""; |
||
1080 | QString UndoManager::FrameSize = ""; |
||
1081 | QString UndoManager::FreeScaling = ""; |
||
1082 | QString UndoManager::KeepRatio = ""; |
||
1083 | QString UndoManager::BreakRatio = ""; |
||
1084 | QString UndoManager::EditContourLine = ""; |
||
1085 | QString UndoManager::EditShape = ""; |
||
13346 | subik | 1086 | QString UndoManager::ChangeShapeType = ""; |
2199 | cbradney | 1087 | QString UndoManager::ResetContourLine = ""; |
17709 | craig | 1088 | QString UndoManager::GradTypeMask = ""; |
2199 | cbradney | 1089 | QString UndoManager::AddPage = ""; |
1090 | QString UndoManager::AddPages = ""; |
||
17641 | craig | 1091 | QString UndoManager::DeleteText = ""; |
1092 | QString UndoManager::AppendText = ""; |
||
1093 | QString UndoManager::ImportText = ""; |
||
1094 | QString UndoManager::ClearText = ""; |
||
19188 | craig | 1095 | QString UndoManager::TruncateText = ""; |
17641 | craig | 1096 | QString UndoManager::ReplaceText = ""; |
1097 | QString UndoManager::InsertText = ""; |
||
1098 | QString UndoManager::AddLoremIpsum = ""; |
||
17826 | craig | 1099 | QString UndoManager::EditMark = ""; |
1100 | QString UndoManager::InsertMark = ""; |
||
1101 | QString UndoManager::DeleteMark = ""; |
||
1102 | QString UndoManager::InsertNote = ""; |
||
1103 | QString UndoManager::DeleteNote = ""; |
||
1104 | QString UndoManager::NewNotesStyle = ""; |
||
24103 | jghali | 1105 | QString UndoManager::EditNotesStyle = ""; |
17826 | craig | 1106 | QString UndoManager::DeleteNotesStyle = ""; |
2199 | cbradney | 1107 | QString UndoManager::DeletePage = ""; |
1108 | QString UndoManager::DeletePages = ""; |
||
16509 | craig | 1109 | QString UndoManager::ChangePageProps = ""; |
2199 | cbradney | 1110 | QString UndoManager::AddLayer = ""; |
16495 | craig | 1111 | QString UndoManager::DuplicateLayer = ""; |
2199 | cbradney | 1112 | QString UndoManager::DeleteLayer = ""; |
1113 | QString UndoManager::RenameLayer = ""; |
||
1114 | QString UndoManager::RaiseLayer = ""; |
||
1115 | QString UndoManager::LowerLayer = ""; |
||
1116 | QString UndoManager::SendToLayer = ""; |
||
1117 | QString UndoManager::PrintLayer = ""; |
||
1118 | QString UndoManager::DoNotPrintLayer = ""; |
||
1119 | QString UndoManager::SetLayerName = ""; |
||
16492 | craig | 1120 | QString UndoManager::FlowLayer = ""; |
1121 | QString UndoManager::DisableFlowLayer = ""; |
||
16497 | craig | 1122 | QString UndoManager::SetLayerBlendMode = ""; |
1123 | QString UndoManager::SetLayerTransparency=""; |
||
16499 | craig | 1124 | QString UndoManager::SetLayerLocked = ""; |
1125 | QString UndoManager::SetLayerUnlocked = ""; |
||
2199 | cbradney | 1126 | QString UndoManager::GetImage = ""; |
10321 | mrdocs | 1127 | QString UndoManager::ChangeFormula = ""; |
17709 | craig | 1128 | QString UndoManager::Duplicate = ""; |
4739 | tsoots | 1129 | QString UndoManager::MultipleDuplicate = ""; |
5184 | avox | 1130 | QString UndoManager::ApplyTextStyle = ""; |
17641 | craig | 1131 | QString UndoManager::RemoveTextStyle = ""; |
5116 | tsoots | 1132 | QString UndoManager::MenuUndo = ""; |
1133 | QString UndoManager::MenuUndoEmpty = ""; |
||
1134 | QString UndoManager::MenuRedo = ""; |
||
1135 | QString UndoManager::MenuRedoEmpty = ""; |
||
6139 | tsoots | 1136 | QString UndoManager::EditContour = ""; |
17641 | craig | 1137 | QString UndoManager::Columns = ""; |
1138 | QString UndoManager::ColumnsGap = ""; |
||
6263 | tsoots | 1139 | QString UndoManager::ResetControlPoint = ""; |
1140 | QString UndoManager::ResetControlPoints = ""; |
||
6266 | tsoots | 1141 | QString UndoManager::ImageEffects = ""; |
6820 | tsoots | 1142 | QString UndoManager::InsertFrame = ""; |
7100 | tsoots | 1143 | QString UndoManager::AdjustFrameToImage = ""; |
7896 | tsoots | 1144 | QString UndoManager::RemoveAllGuides = ""; |
19142 | craig | 1145 | QString UndoManager::RemoveAllPageGuides= ""; |
7897 | tsoots | 1146 | QString UndoManager::Copy = ""; |
1147 | QString UndoManager::CopyPage = ""; |
||
17640 | craig | 1148 | QString UndoManager::ImportPage = ""; |
17213 | craig | 1149 | QString UndoManager::MovePage = ""; |
19889 | craig | 1150 | QString UndoManager::SwapPage = ""; |
8952 | tsoots | 1151 | QString UndoManager::ToOutlines = ""; |
16495 | craig | 1152 | QString UndoManager::LinkTextFrame = ""; |
1153 | QString UndoManager::UnlinkTextFrame = ""; |
||
17224 | craig | 1154 | QString UndoManager::ClearImage = ""; |
17424 | craig | 1155 | QString UndoManager::PathOperation = ""; |
17640 | craig | 1156 | QString UndoManager::ChangePageAttrs = ""; |
17709 | craig | 1157 | QString UndoManager::Transform = ""; |
17791 | jghali | 1158 | QString UndoManager::WeldItems = ""; |
19863 | craig | 1159 | QString UndoManager::UnweldItems = ""; |
19142 | craig | 1160 | QString UndoManager::SoftShadow = ""; |
1161 | QString UndoManager::SoftShadowColor = ""; |
||
1162 | QString UndoManager::SoftShadowShade = ""; |
||
1163 | QString UndoManager::SoftShadowBlurRadius=""; |
||
1164 | QString UndoManager::SoftShadowXOffset = ""; |
||
19323 | jghali | 1165 | QString UndoManager::SoftShadowYOffset = ""; |
19142 | craig | 1166 | QString UndoManager::SoftShadowOpacity = ""; |
1167 | QString UndoManager::SoftShadowBlendMode= ""; |
||
20111 | fschmid | 1168 | QString UndoManager::SoftShadowErase = ""; |
1169 | QString UndoManager::SoftShadowObjectTrans = ""; |
||
5116 | tsoots | 1170 | |
1250 | tsoots | 1171 | /*** Icons for UndoObjects *******************************************/ |
22601 | craig | 1172 | QPixmap *UndoManager::IImageFrame = nullptr; |
1173 | QPixmap *UndoManager::ITextFrame = nullptr; |
||
1174 | QPixmap *UndoManager::ILatexFrame = nullptr; |
||
1175 | QPixmap *UndoManager::ILine = nullptr; |
||
1176 | QPixmap *UndoManager::IPolygon = nullptr; |
||
1177 | QPixmap *UndoManager::IPolyline = nullptr; |
||
1178 | QPixmap *UndoManager::IPathText = nullptr; |
||
1179 | QPixmap *UndoManager::IGroup = nullptr; |
||
1180 | QPixmap *UndoManager::ITable = nullptr; |
||
1250 | tsoots | 1181 | /*** Icons for actions ***********************************************/ |
22601 | craig | 1182 | QPixmap *UndoManager::IMove = nullptr; |
1183 | QPixmap *UndoManager::IResize = nullptr; |
||
1184 | QPixmap *UndoManager::IRotate = nullptr; |
||
1185 | QPixmap *UndoManager::IGuides = nullptr; |
||
1186 | QPixmap *UndoManager::ILockGuides = nullptr; |
||
1187 | QPixmap *UndoManager::IAlignDistribute = nullptr; |
||
1188 | QPixmap *UndoManager::IFill = nullptr; |
||
1189 | QPixmap *UndoManager::IShade = nullptr; |
||
1190 | QPixmap *UndoManager::IFlipH = nullptr; |
||
1191 | QPixmap *UndoManager::IFlipV = nullptr; |
||
1192 | QPixmap *UndoManager::ILock = nullptr; |
||
1193 | QPixmap *UndoManager::IUnLock = nullptr; |
||
1194 | QPixmap *UndoManager::IEnablePrint = nullptr; |
||
1195 | QPixmap *UndoManager::IDisablePrint = nullptr; |
||
1196 | QPixmap *UndoManager::IDelete = nullptr; |
||
1197 | QPixmap *UndoManager::ICreate = nullptr; |
||
1198 | QPixmap *UndoManager::IPaste = nullptr; |
||
1199 | QPixmap *UndoManager::ICut = nullptr; |
||
1200 | QPixmap *UndoManager::ITransparency = nullptr; |
||
1201 | QPixmap *UndoManager::ILineStyle = nullptr; |
||
1202 | QPixmap *UndoManager::IArrow = nullptr; |
||
1203 | QPixmap *UndoManager::IFont = nullptr; |
||
1204 | QPixmap *UndoManager::ISVG = nullptr; |
||
1205 | QPixmap *UndoManager::IUniconv = nullptr; |
||
24103 | jghali | 1206 | QPixmap *UndoManager::IAI = nullptr; |
22601 | craig | 1207 | QPixmap *UndoManager::IEPS = nullptr; |
24103 | jghali | 1208 | QPixmap *UndoManager::IImportOOoDraw = nullptr; |
1209 | QPixmap *UndoManager::IWMF = nullptr; |
||
22601 | craig | 1210 | QPixmap *UndoManager::IXFIG = nullptr; |
1211 | QPixmap *UndoManager::IImageScaling = nullptr; |
||
1212 | QPixmap *UndoManager::IBorder = nullptr; |
||
1213 | QPixmap *UndoManager::IDocument = nullptr; |
||
1214 | QPixmap *UndoManager::ILayer = nullptr; |
||
1215 | QPixmap *UndoManager::ILayerAction = nullptr; |
||
1216 | QPixmap *UndoManager::IUp = nullptr; |
||
1217 | QPixmap *UndoManager::IDown = nullptr; |
||
1218 | QPixmap *UndoManager::IPrint = nullptr; |
||
1219 | QPixmap *UndoManager::IGetImage = nullptr; |
||
1220 | QPixmap *UndoManager::IChangeFormula = nullptr; |
||
1221 | QPixmap *UndoManager::IMultipleDuplicate = nullptr; |
||
1658 | tsoots | 1222 | |
13371 | jghali | 1223 | |
1224 |