Use the new Utils::Icon class and update some icons
Change-Id: Iff68d059e32507a688abe6f859f029d306b2b6a5 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
@@ -49,7 +49,8 @@ HEADERS += \
|
||||
testsettings.h \
|
||||
testsettingspage.h \
|
||||
testnavigationwidget.h \
|
||||
testxmloutputreader.h
|
||||
testxmloutputreader.h \
|
||||
autotesticons.h
|
||||
|
||||
RESOURCES += \
|
||||
autotest.qrc
|
||||
|
@@ -30,6 +30,7 @@ QtcCommercialPlugin {
|
||||
|
||||
files: [
|
||||
"autotest.qrc",
|
||||
"autotesticons.h",
|
||||
"autotest_global.h",
|
||||
"autotestconstants.h",
|
||||
"autotestplugin.cpp",
|
||||
|
@@ -4,9 +4,13 @@
|
||||
<file>images/class.png</file>
|
||||
<file>images/func.png</file>
|
||||
<file>images/expand.png</file>
|
||||
<file>images/expand@2x.png</file>
|
||||
<file>images/collapse.png</file>
|
||||
<file>images/collapse@2x.png</file>
|
||||
<file>images/sort.png</file>
|
||||
<file>images/sort@2x.png</file>
|
||||
<file>images/leafsort.png</file>
|
||||
<file>images/leafsort@2x.png</file>
|
||||
<file>images/debug.png</file>
|
||||
<file>images/fail.png</file>
|
||||
<file>images/fatal.png</file>
|
||||
@@ -18,9 +22,10 @@
|
||||
<file>images/blacklisted_fail.png</file>
|
||||
<file>images/blacklisted_pass.png</file>
|
||||
<file>images/benchmark.png</file>
|
||||
<file>images/run.png</file>
|
||||
<file>images/runselected.png</file>
|
||||
<file>images/stop.png</file>
|
||||
<file>images/runselected_boxes.png</file>
|
||||
<file>images/runselected_boxes@2x.png</file>
|
||||
<file>images/runselected_tickmarks.png</file>
|
||||
<file>images/runselected_tickmarks@2x.png</file>
|
||||
<file>images/data.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
43
plugins/autotest/autotesticons.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd
|
||||
** All rights reserved.
|
||||
** For any questions to The Qt Company, please use contact form at
|
||||
** http://www.qt.io/contact-us
|
||||
**
|
||||
** This file is part of the Qt Creator Enterprise Auto Test Add-on.
|
||||
**
|
||||
** Licensees holding valid Qt Enterprise licenses may use this file in
|
||||
** accordance with the Qt Enterprise License Agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please use
|
||||
** contact form at http://www.qt.io/contact-us
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef AUTOTESTICONS_H
|
||||
#define AUTOTESTICONS_H
|
||||
|
||||
#include <utils/icon.h>
|
||||
|
||||
namespace Autotest {
|
||||
namespace Icons {
|
||||
|
||||
const Utils::Icon EXPAND({
|
||||
{QLatin1String(":/images/expand.png"), Utils::Theme::IconsBaseColor}});
|
||||
const Utils::Icon COLLAPSE({
|
||||
{QLatin1String(":/images/collapse.png"), Utils::Theme::IconsBaseColor}});
|
||||
const Utils::Icon SORT_ALPHABETICALLY({
|
||||
{QLatin1String(":/images/sort.png"), Utils::Theme::IconsBaseColor}});
|
||||
const Utils::Icon SORT_NATURALLY({
|
||||
{QLatin1String(":/images/leafsort.png"), Utils::Theme::IconsBaseColor}});
|
||||
const Utils::Icon RUN_SELECTED_OVERLAY({
|
||||
{QLatin1String(":/images/runselected_boxes.png"), Utils::Theme::BackgroundColorDark},
|
||||
{QLatin1String(":/images/runselected_tickmarks.png"), Utils::Theme::IconsBaseColor}});
|
||||
|
||||
} // namespace Icons
|
||||
} // namespace Autotest
|
||||
|
||||
#endif // AUTOTESTICONS_H
|
Before Width: | Height: | Size: 205 B After Width: | Height: | Size: 176 B |
BIN
plugins/autotest/images/collapse@2x.png
Normal file
After Width: | Height: | Size: 190 B |
Before Width: | Height: | Size: 216 B After Width: | Height: | Size: 174 B |
BIN
plugins/autotest/images/expand@2x.png
Normal file
After Width: | Height: | Size: 190 B |
Before Width: | Height: | Size: 415 B After Width: | Height: | Size: 178 B |
BIN
plugins/autotest/images/leafsort@2x.png
Normal file
After Width: | Height: | Size: 362 B |
Before Width: | Height: | Size: 509 B |
Before Width: | Height: | Size: 709 B |
BIN
plugins/autotest/images/runselected_boxes.png
Normal file
After Width: | Height: | Size: 99 B |
BIN
plugins/autotest/images/runselected_boxes@2x.png
Normal file
After Width: | Height: | Size: 104 B |
BIN
plugins/autotest/images/runselected_tickmarks.png
Normal file
After Width: | Height: | Size: 151 B |
BIN
plugins/autotest/images/runselected_tickmarks@2x.png
Normal file
After Width: | Height: | Size: 162 B |
Before Width: | Height: | Size: 233 B After Width: | Height: | Size: 139 B |
BIN
plugins/autotest/images/sort@2x.png
Normal file
After Width: | Height: | Size: 205 B |
Before Width: | Height: | Size: 314 B |
@@ -24,11 +24,13 @@
|
||||
#include "testcodeparser.h"
|
||||
#include "testrunner.h"
|
||||
#include "autotestconstants.h"
|
||||
#include "autotesticons.h"
|
||||
#include "testtreeitem.h"
|
||||
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <coreplugin/find/itemviewfind.h>
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/coreicons.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <utils/progressindicator.h>
|
||||
@@ -149,7 +151,7 @@ QList<QToolButton *> TestNavigationWidget::createToolButtons()
|
||||
QList<QToolButton *> list;
|
||||
|
||||
m_filterButton = new QToolButton(m_view);
|
||||
m_filterButton->setIcon(QIcon(QLatin1String(Core::Constants::ICON_FILTER)));
|
||||
m_filterButton->setIcon(Core::Icons::FILTER.icon());
|
||||
m_filterButton->setToolTip(tr("Filter Test Tree"));
|
||||
m_filterButton->setProperty("noArrow", true);
|
||||
m_filterButton->setAutoRaise(true);
|
||||
@@ -161,15 +163,15 @@ QList<QToolButton *> TestNavigationWidget::createToolButtons()
|
||||
|
||||
m_sortAlphabetically = true;
|
||||
m_sort = new QToolButton(this);
|
||||
m_sort->setIcon((QIcon(QLatin1String(":/images/leafsort.png"))));
|
||||
m_sort->setIcon(Icons::SORT_NATURALLY.icon());
|
||||
m_sort->setToolTip(tr("Sort Naturally"));
|
||||
|
||||
QToolButton *expand = new QToolButton(this);
|
||||
expand->setIcon(QIcon(QLatin1String(":/images/expand.png")));
|
||||
expand->setIcon(Icons::EXPAND.icon());
|
||||
expand->setToolTip(tr("Expand All"));
|
||||
|
||||
QToolButton *collapse = new QToolButton(this);
|
||||
collapse->setIcon(QIcon(QLatin1String(":/images/collapse.png")));
|
||||
collapse->setIcon(Icons::COLLAPSE.icon());
|
||||
collapse->setToolTip(tr("Collapse All"));
|
||||
|
||||
connect(expand, &QToolButton::clicked, m_view, &TestTreeView::expandAll);
|
||||
@@ -193,11 +195,11 @@ void TestNavigationWidget::onItemActivated(const QModelIndex &index)
|
||||
void TestNavigationWidget::onSortClicked()
|
||||
{
|
||||
if (m_sortAlphabetically) {
|
||||
m_sort->setIcon((QIcon(QLatin1String(":/images/sort.png"))));
|
||||
m_sort->setIcon(Icons::SORT_ALPHABETICALLY.icon());
|
||||
m_sort->setToolTip(tr("Sort Alphabetically"));
|
||||
m_sortFilterModel->setSortMode(TestTreeSortFilterModel::Naturally);
|
||||
} else {
|
||||
m_sort->setIcon((QIcon(QLatin1String(":/images/leafsort.png"))));
|
||||
m_sort->setIcon(Icons::SORT_NATURALLY.icon());
|
||||
m_sort->setToolTip(tr("Sort Naturally"));
|
||||
m_sortFilterModel->setSortMode(TestTreeSortFilterModel::Alphabetically);
|
||||
}
|
||||
|
@@ -18,6 +18,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "autotestplugin.h"
|
||||
#include "autotesticons.h"
|
||||
#include "testresultspane.h"
|
||||
#include "testresultmodel.h"
|
||||
#include "testresultdelegate.h"
|
||||
@@ -26,10 +27,13 @@
|
||||
#include "testtreemodel.h"
|
||||
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/coreicons.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <coreplugin/icontext.h>
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
#include <projectexplorer/projectexplorericons.h>
|
||||
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <utils/theme/theme.h>
|
||||
@@ -127,7 +131,7 @@ TestResultsPane::TestResultsPane(QObject *parent) :
|
||||
void TestResultsPane::createToolButtons()
|
||||
{
|
||||
m_expandCollapse = new QToolButton(m_treeView);
|
||||
m_expandCollapse->setIcon(QIcon(QLatin1String(":/find/images/expand.png")));
|
||||
m_expandCollapse->setIcon(Core::Icons::EXPAND.icon());
|
||||
m_expandCollapse->setToolTip(tr("Expand All"));
|
||||
m_expandCollapse->setCheckable(true);
|
||||
m_expandCollapse->setChecked(false);
|
||||
@@ -139,25 +143,27 @@ void TestResultsPane::createToolButtons()
|
||||
});
|
||||
|
||||
m_runAll = new QToolButton(m_treeView);
|
||||
m_runAll->setIcon(QIcon(QLatin1String(":/images/run.png")));
|
||||
m_runAll->setIcon(ProjectExplorer::Icons::RUN_SMALL.icon());
|
||||
m_runAll->setToolTip(tr("Run All Tests"));
|
||||
m_runAll->setEnabled(false);
|
||||
connect(m_runAll, &QToolButton::clicked, this, &TestResultsPane::onRunAllTriggered);
|
||||
|
||||
m_runSelected = new QToolButton(m_treeView);
|
||||
m_runSelected->setIcon(QIcon(QLatin1String(":/images/runselected.png")));
|
||||
Utils::Icon runSelectedIcon = ProjectExplorer::Icons::RUN_SMALL;
|
||||
runSelectedIcon.append(Icons::RUN_SELECTED_OVERLAY);
|
||||
m_runSelected->setIcon(runSelectedIcon.icon());
|
||||
m_runSelected->setToolTip(tr("Run Selected Tests"));
|
||||
m_runSelected->setEnabled(false);
|
||||
connect(m_runSelected, &QToolButton::clicked, this, &TestResultsPane::onRunSelectedTriggered);
|
||||
|
||||
m_stopTestRun = new QToolButton(m_treeView);
|
||||
m_stopTestRun->setIcon(QIcon(QLatin1String(":/images/stop.png")));
|
||||
m_stopTestRun->setIcon(ProjectExplorer::Icons::STOP_SMALL.icon());
|
||||
m_stopTestRun->setToolTip(tr("Stop Test Run"));
|
||||
m_stopTestRun->setEnabled(false);
|
||||
connect(m_stopTestRun, &QToolButton::clicked, TestRunner::instance(), &TestRunner::requestStopTestRun);
|
||||
|
||||
m_filterButton = new QToolButton(m_treeView);
|
||||
m_filterButton->setIcon(QIcon(QLatin1String(Core::Constants::ICON_FILTER)));
|
||||
m_filterButton->setIcon(Core::Icons::FILTER.icon());
|
||||
m_filterButton->setToolTip(tr("Filter Test Results"));
|
||||
m_filterButton->setProperty("noArrow", true);
|
||||
m_filterButton->setAutoRaise(true);
|
||||
|