ScxmlEditor: Remove duplicated icons

Some of the icons that came with the scxml editor were already present
elsewhere in Qt Creator in a themable/HighDPI-able form.

Remove the own .png files, use the existing icons.

Change-Id: I891305faee45eeb39dac4135d2ff96fc06727731
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Alessandro Portale
2016-09-27 14:32:12 +02:00
parent 3f3a43a4af
commit ef208bf8a4
20 changed files with 43 additions and 66 deletions

View File

@@ -26,6 +26,8 @@
#include "actionhandler.h"
#include "mytypes.h"
#include <utils/utilsicons.h>
#include <QAction>
using namespace ScxmlEditor::PluginInterface;
@@ -36,43 +38,43 @@ ActionHandler::ActionHandler(QObject *parent)
using AH = ActionHandler;
const struct {
const char *icon;
const Utils::Icon icon;
QString name;
QString tooltip;
const char *keyseq;
bool checkable;
} actionInfos[] = {
{ ":/scxmleditor/images/icon-zoom-in.png", AH::tr("Zoom In"), AH::tr("Zoom In (Ctrl + + / Ctrl + Wheel)"), "Ctrl++", false },
{ ":/scxmleditor/images/icon-zoom-out.png", AH::tr("Zoom Out"), AH::tr("Zoom Out (Ctrl + - / Ctrl + Wheel)"), "Ctrl+-", false },
{ ":/scxmleditor/images/icon-fit-screen.png", AH::tr("Fit to View"), AH::tr("Fit to View (F11)"), "F11", false },
{ ":/scxmleditor/images/icon-pan.png", AH::tr("Panning"), AH::tr("Panning (Shift)"), "Shift", true },
{ Utils::Icon(":/scxmleditor/images/icon-zoom-in.png"), AH::tr("Zoom In"), AH::tr("Zoom In (Ctrl + + / Ctrl + Wheel)"), "Ctrl++", false },
{ Utils::Icon(":/scxmleditor/images/icon-zoom-out.png"), AH::tr("Zoom Out"), AH::tr("Zoom Out (Ctrl + - / Ctrl + Wheel)"), "Ctrl+-", false },
{ Utils::Icon(":/scxmleditor/images/icon-fit-screen.png"), AH::tr("Fit to View"), AH::tr("Fit to View (F11)"), "F11", false },
{ Utils::Icon(":/scxmleditor/images/icon-pan.png"), AH::tr("Panning"), AH::tr("Panning (Shift)"), "Shift", true },
{ ":/scxmleditor/images/icon-search.png", AH::tr("Magnifier"), AH::tr("Magnifier Tool (Alt)"), "Alt", true },
{ ":/scxmleditor/images/navigator.png", AH::tr("Navigator"), AH::tr("Navigator (Ctrl+E)"), "Ctrl+E", true },
{ Utils::Icons::ZOOM_TOOLBAR, AH::tr("Magnifier"), AH::tr("Magnifier Tool (Alt)"), "Alt", true },
{ Utils::Icon(":/scxmleditor/images/navigator.png"), AH::tr("Navigator"), AH::tr("Navigator (Ctrl+E)"), "Ctrl+E", true },
{ ":/scxmleditor/images/icon-copy.png", AH::tr("Copy"), AH::tr("Copy (Ctrl + C)"), "Ctrl+C", false },
{ ":/scxmleditor/images/icon-cut.png", AH::tr("Cut"), AH::tr("Cut (Ctrl + X)"), "Ctrl+X", false },
{ ":/scxmleditor/images/icon-paste.png", AH::tr("Paste"), AH::tr("Paste (Ctrl + V)"), "Ctrl+V", false },
{ ":/scxmleditor/images/screenshot.png", AH::tr("Screenshot"), AH::tr("Screenshot (Ctrl + Shift + C)"), "Ctrl+Shift+C", false },
{ ":/scxmleditor/images/icon-export-canvas.png", AH::tr("Export to Image"), AH::tr("Export to Image"), "Ctrl+Shift+E", false },
{ ":/scxmleditor/images/fullnamespace.png", AH::tr("Toggle Full Namespace"), AH::tr("Toggle Full Namespace"), "Ctrl+Shift+N", true },
{ Utils::Icons::COPY, AH::tr("Copy"), AH::tr("Copy (Ctrl + C)"), "Ctrl+C", false },
{ Utils::Icons::CUT, AH::tr("Cut"), AH::tr("Cut (Ctrl + X)"), "Ctrl+X", false },
{ Utils::Icons::PASTE, AH::tr("Paste"), AH::tr("Paste (Ctrl + V)"), "Ctrl+V", false },
{ Utils::Icon(":/scxmleditor/images/screenshot.png"), AH::tr("Screenshot"), AH::tr("Screenshot (Ctrl + Shift + C)"), "Ctrl+Shift+C", false },
{ Utils::Icon(":/scxmleditor/images/icon-export-canvas.png"), AH::tr("Export to Image"), AH::tr("Export to Image"), "Ctrl+Shift+E", false },
{ Utils::Icon(":/scxmleditor/images/fullnamespace.png"), AH::tr("Toggle Full Namespace"), AH::tr("Toggle Full Namespace"), "Ctrl+Shift+N", true },
{ ":/scxmleditor/images/align_left.png", AH::tr("Align Left"), AH::tr("Align Left (Ctrl+L,1)"), "Ctrl+L,1", false },
{ ":/scxmleditor/images/align_right.png", AH::tr("Align Right"), AH::tr("Align Right (Ctrl+L,2)"), "Ctrl+L,2", false },
{ ":/scxmleditor/images/align_top.png", AH::tr("Align Top"), AH::tr("Align Top (Ctrl+L,3)"), "Ctrl+L,3", false },
{ ":/scxmleditor/images/align_bottom.png", AH::tr("Align Bottom"), AH::tr("Align Bottom (Ctrl+L,4)"), "Ctrl+L,4", false },
{ ":/scxmleditor/images/align_horizontal.png", AH::tr("Align Horizontal"), AH::tr("Align Horizontal (Ctrl+L,5)"), "Ctrl+L,5", false },
{ ":/scxmleditor/images/align_vertical.png", AH::tr("Align Vertical"), AH::tr("Align Vertical (Ctrl+L,6)"), "Ctrl+L,6", false },
{ ":/scxmleditor/images/adjust_width.png", AH::tr("Adjust Width"), AH::tr("Adjust Width (Ctrl+L,7)"), "Ctrl+L,7", false },
{ ":/scxmleditor/images/adjust_height.png", AH::tr("Adjust Height"), AH::tr("Adjust Height (Ctrl+L,8)"), "Ctrl+L,8", false },
{ ":/scxmleditor/images/adjust_size.png", AH::tr("Adjust Size"), AH::tr("Adjust Size (Ctrl+L,9)"), "Ctrl+L,9", false },
{ Utils::Icon(":/scxmleditor/images/align_left.png"), AH::tr("Align Left"), AH::tr("Align Left (Ctrl+L,1)"), "Ctrl+L,1", false },
{ Utils::Icon(":/scxmleditor/images/align_right.png"), AH::tr("Align Right"), AH::tr("Align Right (Ctrl+L,2)"), "Ctrl+L,2", false },
{ Utils::Icon(":/scxmleditor/images/align_top.png"), AH::tr("Align Top"), AH::tr("Align Top (Ctrl+L,3)"), "Ctrl+L,3", false },
{ Utils::Icon(":/scxmleditor/images/align_bottom.png"), AH::tr("Align Bottom"), AH::tr("Align Bottom (Ctrl+L,4)"), "Ctrl+L,4", false },
{ Utils::Icon(":/scxmleditor/images/align_horizontal.png"), AH::tr("Align Horizontal"), AH::tr("Align Horizontal (Ctrl+L,5)"), "Ctrl+L,5", false },
{ Utils::Icon(":/scxmleditor/images/align_vertical.png"), AH::tr("Align Vertical"), AH::tr("Align Vertical (Ctrl+L,6)"), "Ctrl+L,6", false },
{ Utils::Icon(":/scxmleditor/images/adjust_width.png"), AH::tr("Adjust Width"), AH::tr("Adjust Width (Ctrl+L,7)"), "Ctrl+L,7", false },
{ Utils::Icon(":/scxmleditor/images/adjust_height.png"), AH::tr("Adjust Height"), AH::tr("Adjust Height (Ctrl+L,8)"), "Ctrl+L,8", false },
{ Utils::Icon(":/scxmleditor/images/adjust_size.png"), AH::tr("Adjust Size"), AH::tr("Adjust Size (Ctrl+L,9)"), "Ctrl+L,9", false },
{ ":/scxmleditor/images/statistics.png", AH::tr("Show Statistics..."), AH::tr("Show Statistics"), "", false }
{ Utils::Icon(":/scxmleditor/images/statistics.png"), AH::tr("Show Statistics..."), AH::tr("Show Statistics"), "", false }
};
// Init actions
for (auto info: actionInfos) {
auto action = new QAction(QIcon(QLatin1String(info.icon)), info.name, this);
for (const auto &info: actionInfos) {
auto action = new QAction(info.icon.icon(), info.name, this);
action->setCheckable(info.checkable);
action->setToolTip(info.tooltip);
action->setShortcut(QKeySequence(QLatin1String(info.keyseq)));