2020-08-13 21:08:54 +02:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2016 David Rosca <nowrep@gmail.com>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: LGPL-2.0-or-later
|
|
|
|
*/
|
2016-02-27 21:24:45 +01:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QQuickItem>
|
|
|
|
#include <QQuickView>
|
2019-12-14 16:58:05 +01:00
|
|
|
#include <QTest>
|
2016-02-27 21:24:45 +01:00
|
|
|
|
2016-02-27 19:40:54 +01:00
|
|
|
namespace Plasma
|
|
|
|
{
|
|
|
|
class Svg;
|
2016-02-29 22:28:58 +01:00
|
|
|
class Theme;
|
2016-02-27 19:40:54 +01:00
|
|
|
}
|
|
|
|
|
2016-02-27 21:24:45 +01:00
|
|
|
class IconItemTest : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
void initTestCase();
|
2016-03-04 23:44:57 +01:00
|
|
|
void cleanupTestCase();
|
2016-07-12 10:01:29 +02:00
|
|
|
void init();
|
2016-02-27 21:24:45 +01:00
|
|
|
void cleanup();
|
|
|
|
|
2016-03-04 01:20:29 +01:00
|
|
|
void loadPixmap();
|
|
|
|
void loadImage();
|
|
|
|
|
2016-02-27 21:24:45 +01:00
|
|
|
void invalidIcon();
|
|
|
|
void usesPlasmaTheme();
|
|
|
|
void animation();
|
|
|
|
void animationAfterHide();
|
|
|
|
void bug_359388();
|
2016-02-27 19:40:54 +01:00
|
|
|
void loadSvg();
|
2016-02-29 22:28:58 +01:00
|
|
|
void themeChange();
|
2016-03-04 23:44:57 +01:00
|
|
|
void qiconFromTheme();
|
2016-03-10 12:58:18 +01:00
|
|
|
void changeColorGroup();
|
2016-03-11 14:07:44 +01:00
|
|
|
void animatingActiveChange();
|
|
|
|
void animatingEnabledChange();
|
2016-03-12 13:01:07 +01:00
|
|
|
void windowChanged();
|
2017-01-05 15:15:14 +01:00
|
|
|
void paintedSize();
|
2017-01-08 16:16:59 +01:00
|
|
|
void implicitSize();
|
2018-01-15 10:22:18 +01:00
|
|
|
void nonSquareImplicitSize();
|
2017-02-26 11:27:58 +01:00
|
|
|
void roundToIconSize();
|
2016-02-27 21:24:45 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
QQuickItem *createIconItem();
|
|
|
|
QImage grabImage(QQuickItem *item);
|
2016-02-27 19:40:54 +01:00
|
|
|
Plasma::Svg *findPlasmaSvg(QQuickItem *item);
|
2016-02-29 22:28:58 +01:00
|
|
|
void changeTheme(Plasma::Theme *theme, const QString &themeName);
|
2016-02-27 21:24:45 +01:00
|
|
|
|
|
|
|
QQuickView *m_view;
|
|
|
|
};
|
|
|
|
|