Mercurial > hg > svgui
comparison widgets/CommandHistory.cpp @ 978:64c2b3a4435a 3.0-integration
Merge from branch osx-retina
author | Chris Cannam |
---|---|
date | Fri, 26 Jun 2015 14:10:40 +0100 |
parents | c91878670297 |
children | a34a2a25907c |
comparison
equal
deleted
inserted
replaced
977:f40ccbf228c2 | 978:64c2b3a4435a |
---|---|
23 */ | 23 */ |
24 | 24 |
25 #include "CommandHistory.h" | 25 #include "CommandHistory.h" |
26 | 26 |
27 #include "base/Command.h" | 27 #include "base/Command.h" |
28 | |
29 #include "IconLoader.h" | |
28 | 30 |
29 #include <QRegExp> | 31 #include <QRegExp> |
30 #include <QMenu> | 32 #include <QMenu> |
31 #include <QToolBar> | 33 #include <QToolBar> |
32 #include <QString> | 34 #include <QString> |
51 m_currentBundle(0), | 53 m_currentBundle(0), |
52 m_bundling(false), | 54 m_bundling(false), |
53 m_bundleTimer(0), | 55 m_bundleTimer(0), |
54 m_bundleTimeout(3000) | 56 m_bundleTimeout(3000) |
55 { | 57 { |
56 m_undoAction = new QAction(QIcon(":/icons/undo.png"), tr("&Undo"), this); | 58 IconLoader loader; |
59 QIcon undoIcon(loader.load("undo")); | |
60 QIcon redoIcon(loader.load("redo")); | |
61 | |
62 m_undoAction = new QAction(undoIcon, ("&Undo"), this); | |
57 m_undoAction->setShortcut(tr("Ctrl+Z")); | 63 m_undoAction->setShortcut(tr("Ctrl+Z")); |
58 m_undoAction->setStatusTip(tr("Undo the last editing operation")); | 64 m_undoAction->setStatusTip(tr("Undo the last editing operation")); |
59 connect(m_undoAction, SIGNAL(triggered()), this, SLOT(undo())); | 65 connect(m_undoAction, SIGNAL(triggered()), this, SLOT(undo())); |
60 | 66 |
61 m_undoMenuAction = new QAction(QIcon(":/icons/undo.png"), tr("&Undo"), this); | 67 m_undoMenuAction = new QAction(undoIcon, tr("&Undo"), this); |
62 connect(m_undoMenuAction, SIGNAL(triggered()), this, SLOT(undo())); | 68 connect(m_undoMenuAction, SIGNAL(triggered()), this, SLOT(undo())); |
63 | 69 |
64 m_undoMenu = new QMenu(tr("&Undo")); | 70 m_undoMenu = new QMenu(tr("&Undo")); |
65 m_undoMenuAction->setMenu(m_undoMenu); | 71 m_undoMenuAction->setMenu(m_undoMenu); |
66 connect(m_undoMenu, SIGNAL(triggered(QAction *)), | 72 connect(m_undoMenu, SIGNAL(triggered(QAction *)), |
67 this, SLOT(undoActivated(QAction*))); | 73 this, SLOT(undoActivated(QAction*))); |
68 | 74 |
69 m_redoAction = new QAction(QIcon(":/icons/redo.png"), tr("Re&do"), this); | 75 m_redoAction = new QAction(redoIcon, tr("Re&do"), this); |
70 m_redoAction->setShortcut(tr("Ctrl+Shift+Z")); | 76 m_redoAction->setShortcut(tr("Ctrl+Shift+Z")); |
71 m_redoAction->setStatusTip(tr("Redo the last operation that was undone")); | 77 m_redoAction->setStatusTip(tr("Redo the last operation that was undone")); |
72 connect(m_redoAction, SIGNAL(triggered()), this, SLOT(redo())); | 78 connect(m_redoAction, SIGNAL(triggered()), this, SLOT(redo())); |
73 | 79 |
74 m_redoMenuAction = new QAction(QIcon(":/icons/redo.png"), tr("Re&do"), this); | 80 m_redoMenuAction = new QAction(redoIcon, tr("Re&do"), this); |
75 connect(m_redoMenuAction, SIGNAL(triggered()), this, SLOT(redo())); | 81 connect(m_redoMenuAction, SIGNAL(triggered()), this, SLOT(redo())); |
76 | 82 |
77 m_redoMenu = new QMenu(tr("Re&do")); | 83 m_redoMenu = new QMenu(tr("Re&do")); |
78 m_redoMenuAction->setMenu(m_redoMenu); | 84 m_redoMenuAction->setMenu(m_redoMenu); |
79 connect(m_redoMenu, SIGNAL(triggered(QAction *)), | 85 connect(m_redoMenu, SIGNAL(triggered(QAction *)), |