diff options
author | hjk <hjk@theqtcompany.com> | 2016-05-30 18:00:35 +0200 |
---|---|---|
committer | hjk <hjk@theqtcompany.com> | 2016-05-31 07:14:19 +0000 |
commit | 0b5c780106af0dfbc9642c33c626a7bbc27e5e4a (patch) | |
tree | 57979860a43cb4e62f1601f77603dd33bc1c29df /src | |
parent | b2f24fc0a7158d0d9327ebe4e2a93e1fa048aeda (diff) |
ProjectExplorer: Move icons into compilation unit of there own
Follow the Core pattern and compile them only once.
Change-Id: I688962250b1e8595ad27b662bd96584bf30b4a2c
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/projectexplorer/projectexplorer.pro | 1 | ||||
-rw-r--r-- | src/plugins/projectexplorer/projectexplorer.qbs | 2 | ||||
-rw-r--r-- | src/plugins/projectexplorer/projectexplorericons.cpp | 84 | ||||
-rw-r--r-- | src/plugins/projectexplorer/projectexplorericons.h | 84 |
4 files changed, 114 insertions, 57 deletions
diff --git a/src/plugins/projectexplorer/projectexplorer.pro b/src/plugins/projectexplorer/projectexplorer.pro index 4ac8528033..ee76f629af 100644 --- a/src/plugins/projectexplorer/projectexplorer.pro +++ b/src/plugins/projectexplorer/projectexplorer.pro @@ -297,6 +297,7 @@ SOURCES += projectexplorer.cpp \ projecttree.cpp \ expanddata.cpp \ waitforstopdialog.cpp \ + projectexplorericons.cpp \ extracompiler.cpp \ customexecutableconfigurationwidget.cpp \ customexecutablerunconfiguration.cpp diff --git a/src/plugins/projectexplorer/projectexplorer.qbs b/src/plugins/projectexplorer/projectexplorer.qbs index 27cea13a5b..508b99402e 100644 --- a/src/plugins/projectexplorer/projectexplorer.qbs +++ b/src/plugins/projectexplorer/projectexplorer.qbs @@ -112,7 +112,7 @@ QtcPlugin { "projectexplorer_export.h", "projectexplorer_global.h", "projectexplorerconstants.h", - "projectexplorericons.h", + "projectexplorericons.h", "projectexplorericons.cpp", "projectexplorersettings.h", "projectexplorersettingspage.cpp", "projectexplorersettingspage.h", "projectexplorersettingspage.ui", "projectfilewizardextension.cpp", "projectfilewizardextension.h", diff --git a/src/plugins/projectexplorer/projectexplorericons.cpp b/src/plugins/projectexplorer/projectexplorericons.cpp new file mode 100644 index 0000000000..542d88ab53 --- /dev/null +++ b/src/plugins/projectexplorer/projectexplorericons.cpp @@ -0,0 +1,84 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ + +#include "projectexplorericons.h" + +using namespace Utils; + +namespace ProjectExplorer { +namespace Icons { + +const Icon BUILD(":/projectexplorer/images/build.png"); +const Icon BUILD_FLAT({ + {":/projectexplorer/images/build_hammerhandle_mask.png", Theme::IconsBuildHammerHandleColor}, + {":/projectexplorer/images/build_hammerhead_mask.png", Theme::IconsBuildHammerHeadColor}}); +const Icon BUILD_SMALL(":/projectexplorer/images/build_small.png"); +const Icon REBUILD({ + {":/projectexplorer/images/rebuildhammerhandles.png", Theme::IconsBuildHammerHandleColor}, + {":/projectexplorer/images/rebuildhammerheads.png", Theme::IconsBuildHammerHeadColor}}, Icon::Tint); +const Icon RUN(":/projectexplorer/images/run.png"); +const Icon RUN_FLAT({ + {":/projectexplorer/images/run_mask.png", Theme::IconsRunToolBarColor}}); +const Icon WINDOW(":/projectexplorer/images/window.png"); +const Icon DEBUG_START(":/projectexplorer/images/debugger_start.png"); + +const Icon DEBUG_START_FLAT({ + {":/projectexplorer/images/run_mask.png", Theme::IconsRunToolBarColor}, + {":/projectexplorer/images/debugger_beetle_mask.png", Theme::IconsDebugColor}}); +const Icon DEBUG_START_SMALL({ + {":/core/images/run_small.png", Theme::IconsRunColor}, + {":/projectexplorer/images/debugger_overlay_small.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle); +const Icon DEBUG_START_SMALL_TOOLBAR({ + {":/core/images/run_small.png", Theme::IconsRunToolBarColor}, + {":/projectexplorer/images/debugger_overlay_small.png", Theme::IconsDebugColor}}); +const Icon ANALYZER_START_SMALL({ + {":/core/images/run_small.png", Theme::IconsRunColor}, + {":/projectexplorer/images/analyzer_overlay_small.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle); +const Icon ANALYZER_START_SMALL_TOOLBAR({ + {":/core/images/run_small.png", Theme::IconsRunToolBarColor}, + {":/projectexplorer/images/analyzer_overlay_small.png", Theme::IconsBaseColor}}); + +const Icon BUILDSTEP_MOVEUP({ + {":/projectexplorer/images/buildstepmoveup.png", Theme::PanelTextColorDark}}, Icon::Tint); +const Icon BUILDSTEP_MOVEDOWN({ + {":/projectexplorer/images/buildstepmovedown.png", Theme::PanelTextColorDark}}, Icon::Tint); +const Icon BUILDSTEP_DISABLE({ + {":/projectexplorer/images/buildstepdisable.png", Theme::PanelTextColorDark}}, Icon::Tint); +const Icon BUILDSTEP_REMOVE({ + {":/projectexplorer/images/buildstepremove.png", Theme::PanelTextColorDark}}, Icon::Tint); + +const Icon DESKTOP_DEVICE({ + {":/projectexplorer/images/desktopdevice.png", Theme::IconsBaseColor}}); +const Icon DESKTOP_DEVICE_SMALL({ + {":/core/images/desktopdevicesmall.png", Theme::PanelTextColorDark}}, Icon::Tint); + +const Icon MODE_PROJECT_CLASSIC(":/projectexplorer/images/mode_project.png"); +const Icon MODE_PROJECT_FLAT({ + {":/projectexplorer/images/mode_project_mask.png", Theme::IconsBaseColor}}); +const Icon MODE_PROJECT_FLAT_ACTIVE({ + {":/projectexplorer/images/mode_project_mask.png", Theme::IconsModeProjetcsActiveColor}}); + +} // namespace Icons +} // namespace ProjectExplorer diff --git a/src/plugins/projectexplorer/projectexplorericons.h b/src/plugins/projectexplorer/projectexplorericons.h index e65e5ecd96..1dd599cd4f 100644 --- a/src/plugins/projectexplorer/projectexplorericons.h +++ b/src/plugins/projectexplorer/projectexplorericons.h @@ -25,67 +25,39 @@ #pragma once +#include "projectexplorer_export.h" + #include <utils/icon.h> namespace ProjectExplorer { namespace Icons { -const Utils::Icon BUILD( - QLatin1String(":/projectexplorer/images/build.png")); -const Utils::Icon BUILD_FLAT({ - {QLatin1String(":/projectexplorer/images/build_hammerhandle_mask.png"), Utils::Theme::IconsBuildHammerHandleColor}, - {QLatin1String(":/projectexplorer/images/build_hammerhead_mask.png"), Utils::Theme::IconsBuildHammerHeadColor}}); -const Utils::Icon BUILD_SMALL( - QLatin1String(":/projectexplorer/images/build_small.png")); -const Utils::Icon REBUILD({ - {QLatin1String(":/projectexplorer/images/rebuildhammerhandles.png"), Utils::Theme::IconsBuildHammerHandleColor}, - {QLatin1String(":/projectexplorer/images/rebuildhammerheads.png"), Utils::Theme::IconsBuildHammerHeadColor}}, Utils::Icon::Tint); -const Utils::Icon RUN( - QLatin1String(":/projectexplorer/images/run.png")); -const Utils::Icon RUN_FLAT({ - {QLatin1String(":/projectexplorer/images/run_mask.png"), Utils::Theme::IconsRunToolBarColor}}); -const Utils::Icon WINDOW( - QLatin1String(":/projectexplorer/images/window.png")); -const Utils::Icon DEBUG_START( - QLatin1String(":/projectexplorer/images/debugger_start.png")); - -const Utils::Icon DEBUG_START_FLAT({ - {QLatin1String(":/projectexplorer/images/run_mask.png"), Utils::Theme::IconsRunToolBarColor}, - {QLatin1String(":/projectexplorer/images/debugger_beetle_mask.png"), Utils::Theme::IconsDebugColor}}); -const Utils::Icon DEBUG_START_SMALL({ - {QLatin1String(":/core/images/run_small.png"), Utils::Theme::IconsRunColor}, - {QLatin1String(":/projectexplorer/images/debugger_overlay_small.png"), Utils::Theme::PanelTextColorMid}}, Utils::Icon::MenuTintedStyle); -const Utils::Icon DEBUG_START_SMALL_TOOLBAR({ - {QLatin1String(":/core/images/run_small.png"), Utils::Theme::IconsRunToolBarColor}, - {QLatin1String(":/projectexplorer/images/debugger_overlay_small.png"), Utils::Theme::IconsDebugColor}}); -const Utils::Icon ANALYZER_START_SMALL({ - {QLatin1String(":/core/images/run_small.png"), Utils::Theme::IconsRunColor}, - {QLatin1String(":/projectexplorer/images/analyzer_overlay_small.png"), Utils::Theme::PanelTextColorMid}}, - Utils::Icon::MenuTintedStyle); -const Utils::Icon ANALYZER_START_SMALL_TOOLBAR({ - {QLatin1String(":/core/images/run_small.png"), Utils::Theme::IconsRunToolBarColor}, - {QLatin1String(":/projectexplorer/images/analyzer_overlay_small.png"), Utils::Theme::IconsBaseColor}}); - -const Utils::Icon BUILDSTEP_MOVEUP({ - {QLatin1String(":/projectexplorer/images/buildstepmoveup.png"), Utils::Theme::PanelTextColorDark}}, Utils::Icon::Tint); -const Utils::Icon BUILDSTEP_MOVEDOWN({ - {QLatin1String(":/projectexplorer/images/buildstepmovedown.png"), Utils::Theme::PanelTextColorDark}}, Utils::Icon::Tint); -const Utils::Icon BUILDSTEP_DISABLE({ - {QLatin1String(":/projectexplorer/images/buildstepdisable.png"), Utils::Theme::PanelTextColorDark}}, Utils::Icon::Tint); -const Utils::Icon BUILDSTEP_REMOVE({ - {QLatin1String(":/projectexplorer/images/buildstepremove.png"), Utils::Theme::PanelTextColorDark}}, Utils::Icon::Tint); - -const Utils::Icon DESKTOP_DEVICE({ - {QLatin1String(":/projectexplorer/images/desktopdevice.png"), Utils::Theme::IconsBaseColor}}); -const Utils::Icon DESKTOP_DEVICE_SMALL({ - {QLatin1String(":/core/images/desktopdevicesmall.png"), Utils::Theme::PanelTextColorDark}}, Utils::Icon::Tint); - -const Utils::Icon MODE_PROJECT_CLASSIC( - QLatin1String(":/projectexplorer/images/mode_project.png")); -const Utils::Icon MODE_PROJECT_FLAT({ - {QLatin1String(":/projectexplorer/images/mode_project_mask.png"), Utils::Theme::IconsBaseColor}}); -const Utils::Icon MODE_PROJECT_FLAT_ACTIVE({ - {QLatin1String(":/projectexplorer/images/mode_project_mask.png"), Utils::Theme::IconsModeProjetcsActiveColor}}); +PROJECTEXPLORER_EXPORT extern const Utils::Icon BUILD; +PROJECTEXPLORER_EXPORT extern const Utils::Icon BUILD_FLAT; +PROJECTEXPLORER_EXPORT extern const Utils::Icon BUILD_SMALL; +PROJECTEXPLORER_EXPORT extern const Utils::Icon REBUILD; +PROJECTEXPLORER_EXPORT extern const Utils::Icon RUN; +PROJECTEXPLORER_EXPORT extern const Utils::Icon RUN_FLAT; +PROJECTEXPLORER_EXPORT extern const Utils::Icon WINDOW; +PROJECTEXPLORER_EXPORT extern const Utils::Icon DEBUG_START; + +PROJECTEXPLORER_EXPORT extern const Utils::Icon DEBUG_START_FLAT; +PROJECTEXPLORER_EXPORT extern const Utils::Icon DEBUG_START_SMALL; +PROJECTEXPLORER_EXPORT extern const Utils::Icon DEBUG_START_SMALL_TOOLBAR; +PROJECTEXPLORER_EXPORT extern const Utils::Icon ANALYZER_START_SMALL; +PROJECTEXPLORER_EXPORT extern const Utils::Icon ANALYZER_START_SMALL_TOOLBAR; + +PROJECTEXPLORER_EXPORT extern const Utils::Icon BUILDSTEP_MOVEUP; +PROJECTEXPLORER_EXPORT extern const Utils::Icon BUILDSTEP_MOVEDOWN; +PROJECTEXPLORER_EXPORT extern const Utils::Icon BUILDSTEP_DISABLE; +PROJECTEXPLORER_EXPORT extern const Utils::Icon BUILDSTEP_REMOVE; + +PROJECTEXPLORER_EXPORT extern const Utils::Icon DESKTOP_DEVICE; +PROJECTEXPLORER_EXPORT extern const Utils::Icon DESKTOP_DEVICE_SMALL; + +PROJECTEXPLORER_EXPORT extern const Utils::Icon MODE_PROJECT_CLASSIC; +PROJECTEXPLORER_EXPORT extern const Utils::Icon MODE_PROJECT_FLAT; +PROJECTEXPLORER_EXPORT extern const Utils::Icon MODE_PROJECT_FLAT_ACTIVE; } // namespace Icons } // namespace ProjectExplorer |