File indexing completed on 2023-09-24 08:11:58
0001 /* 0002 SPDX-FileCopyrightText: 2016 David Rosca <nowrep@gmail.com> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <QQuickItem> 0010 #include <QQuickView> 0011 #include <QTest> 0012 0013 namespace Plasma 0014 { 0015 class Svg; 0016 class Theme; 0017 } 0018 0019 class IconItemTest : public QObject 0020 { 0021 Q_OBJECT 0022 0023 private Q_SLOTS: 0024 void initTestCase(); 0025 void cleanupTestCase(); 0026 void init(); 0027 void cleanup(); 0028 0029 void loadPixmap(); 0030 void loadImage(); 0031 0032 void invalidIcon(); 0033 void usesPlasmaTheme(); 0034 void animation(); 0035 void animationAfterHide(); 0036 void bug_359388(); 0037 void loadSvg(); 0038 void themeChange(); 0039 void qiconFromTheme(); 0040 void changeColorGroup(); 0041 void animatingActiveChange(); 0042 void animatingEnabledChange(); 0043 void windowChanged(); 0044 void paintedSize(); 0045 void implicitSize(); 0046 void nonSquareImplicitSize(); 0047 void roundToIconSize(); 0048 0049 private: 0050 QQuickItem *createIconItem(); 0051 QImage grabImage(QQuickItem *item); 0052 QImage waitAndGrabImage(QQuickItem *item, int delay = 50); 0053 Plasma::Svg *findPlasmaSvg(QQuickItem *item); 0054 void changeTheme(Plasma::Theme *theme, const QString &themeName); 0055 0056 QQuickView *m_view; 0057 };