Commit 495e1a2d authored by Alessandro Portale's avatar Alessandro Portale Committed by Eike Ziller
Browse files

Use the new Utils::Icon class and update some icons



Change-Id: Iff68d059e32507a688abe6f859f029d306b2b6a5
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent bc4de63b
......@@ -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>
/****************************************************************************
**
** 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
plugins/autotest/images/collapse.png

205 Bytes | W: | H:

plugins/autotest/images/collapse.png

176 Bytes | W: | H:

plugins/autotest/images/collapse.png
plugins/autotest/images/collapse.png
plugins/autotest/images/collapse.png
plugins/autotest/images/collapse.png
  • 2-up
  • Swipe
  • Onion skin
plugins/autotest/images/expand.png

216 Bytes | W: | H:

plugins/autotest/images/expand.png

174 Bytes | W: | H:

plugins/autotest/images/expand.png
plugins/autotest/images/expand.png
plugins/autotest/images/expand.png
plugins/autotest/images/expand.png
  • 2-up
  • Swipe
  • Onion skin
plugins/autotest/images/leafsort.png

415 Bytes | W: | H:

plugins/autotest/images/leafsort.png

178 Bytes | W: | H:

plugins/autotest/images/leafsort.png
plugins/autotest/images/leafsort.png
plugins/autotest/images/leafsort.png
plugins/autotest/images/leafsort.png
  • 2-up
  • Swipe
  • Onion skin
plugins/autotest/images/sort.png

233 Bytes | W: | H:

plugins/autotest/images/sort.png

139 Bytes | W: | H:

plugins/autotest/images/sort.png
plugins/autotest/images/sort.png
plugins/autotest/images/sort.png
plugins/autotest/images/sort.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -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);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment