aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2021-08-12 11:24:12 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2021-08-12 17:51:01 +0200
commit425911d07fc8c3bb899226a1355c38a166b5e1de (patch)
tree1d5e0e5ae3ec66b10920bb9104e7d12c69b4a52f /tests
parent59ab3e11433a5157aac0f3af7c0d7fe70a373373 (diff)
Remove qtgraphicaleffects sources and add note about its state in Qt 6HEADdev
Add a README.md mentioning the documentation on where the ported effects can be found, as well as how to check out the Qt5 branch. Pick-to: 6.2 Fixes: QTBUG-95757 Change-Id: Ib47c7e73f8622c8e287df0f74c6f16a5113b357e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/.prev_CMakeLists.txt7
-rw-r--r--tests/CMakeLists.txt8
-rw-r--r--tests/auto/CMakeLists.txt17
-rw-r--r--tests/auto/auto.pro11
-rw-r--r--tests/auto/dummy.qml6
-rw-r--r--tests/auto/tst_qtgraphicaleffects.cpp542
-rw-r--r--tests/manual/CMakeLists.txt3
-rw-r--r--tests/manual/SourceProxyTest.qml112
-rw-r--r--tests/manual/manual.pro4
-rw-r--r--tests/manual/smooth/CMakeLists.txt48
-rw-r--r--tests/manual/smooth/CellContainer.qml9
-rw-r--r--tests/manual/smooth/SourceImage.qml8
-rw-r--r--tests/manual/smooth/main.cpp67
-rw-r--r--tests/manual/smooth/main.qml358
-rw-r--r--tests/manual/smooth/resources.qrc8
-rw-r--r--tests/manual/smooth/smooth.pro30
-rw-r--r--tests/manual/smooth/star.pngbin641 -> 0 bytes
-rw-r--r--tests/manual/testSourceProxy.qml233
-rw-r--r--tests/manual/testbed/BGColorPicker.qml120
-rw-r--r--tests/manual/testbed/CheckBox.qml71
-rw-r--r--tests/manual/testbed/ColorPicker.qml212
-rw-r--r--tests/manual/testbed/ColorSlider.qml120
-rw-r--r--tests/manual/testbed/Control.qml99
-rw-r--r--tests/manual/testbed/ImageSource.qml59
-rw-r--r--tests/manual/testbed/Label.qml68
-rw-r--r--tests/manual/testbed/LevelSlider.qml189
-rw-r--r--tests/manual/testbed/PositionPicker.qml60
-rw-r--r--tests/manual/testbed/ProgressBar.qml101
-rw-r--r--tests/manual/testbed/RadioButton.qml69
-rw-r--r--tests/manual/testbed/RadioButtonColumn.qml58
-rw-r--r--tests/manual/testbed/RgbaColorPicker.qml103
-rw-r--r--tests/manual/testbed/Slider.qml131
-rw-r--r--tests/manual/testbed/TestBedModel.qml50
-rw-r--r--tests/manual/testbed/TestBrightnessContrast.qml96
-rw-r--r--tests/manual/testbed/TestCaseTemplate.qml130
-rw-r--r--tests/manual/testbed/TestColorOverlay.qml88
-rw-r--r--tests/manual/testbed/TestColorize.qml90
-rw-r--r--tests/manual/testbed/TestConicalGradient.qml134
-rw-r--r--tests/manual/testbed/TestDesaturate.qml88
-rw-r--r--tests/manual/testbed/TestDisplace.qml131
-rw-r--r--tests/manual/testbed/TestDropShadow.qml128
-rw-r--r--tests/manual/testbed/TestFastBlur.qml94
-rw-r--r--tests/manual/testbed/TestGammaAdjust.qml89
-rw-r--r--tests/manual/testbed/TestGlow.qml110
-rw-r--r--tests/manual/testbed/TestHueSaturation.qml105
-rw-r--r--tests/manual/testbed/TestLevelAdjust.qml149
-rw-r--r--tests/manual/testbed/TestLinearGradient.qml144
-rw-r--r--tests/manual/testbed/TestOpacityMask.qml83
-rw-r--r--tests/manual/testbed/TestRadialGradient.qml149
-rw-r--r--tests/manual/testbed/TestRectangularGlow.qml126
-rw-r--r--tests/manual/testbed/TestThresholdMask.qml102
-rw-r--r--tests/manual/testbed/images/background.pngbin80 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/bug.jpgbin376684 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/butterfly.pngbin36912 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/checkbox_inner.pngbin236 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/checkbox_outer.pngbin227 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/checker.pngbin1202 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/collapse.pngbin336 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/color_selection_hl.pngbin533 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/color_selection_mask.pngbin231 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/expand.pngbin343 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/fog.pngbin192467 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/glass_normal.pngbin13489 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/group_bottom.pngbin157 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/group_top.pngbin167 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/icon_blend.pngbin2940 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/icon_blur.pngbin303 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/icon_color.pngbin3021 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/icon_distortion.pngbin229 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/icon_drop_shadow.pngbin160 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/icon_glow.pngbin285 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/icon_gradient.pngbin182 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/icon_mask.pngbin2837 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/icon_motion_blur.pngbin304 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/radiobutton_inner.pngbin274 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/radiobutton_outer.pngbin347 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/slider_handle.pngbin409 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/slider_handle_b.pngbin867 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/slider_handle_black.pngbin390 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/slider_handle_g.pngbin1851 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/slider_handle_gray.pngbin401 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/slider_handle_pressed.pngbin387 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/slider_handle_r.pngbin1842 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/slider_handle_white.pngbin373 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/slider_track.pngbin198 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/slider_track_filled.pngbin153 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/slider_track_left.pngbin1163 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/slider_track_right.pngbin1149 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/title.pngbin160 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/workarea_left.pngbin123 -> 0 bytes
-rw-r--r--tests/manual/testbed/images/workarea_right.pngbin77 -> 0 bytes
-rw-r--r--tests/manual/testbed/testBed.qml156
-rw-r--r--tests/manual/testbed/testbed.qmlproject16
-rw-r--r--tests/system/auto/auto.pro16
-rw-r--r--tests/system/auto/imagecompare.cpp88
-rw-r--r--tests/system/auto/imagecompare.h54
-rw-r--r--tests/system/auto/main.cpp63
-rw-r--r--tests/system/auto/tst_imagecompare.cpp2121
-rw-r--r--tests/system/auto/tst_imagecompare.h120
-rw-r--r--tests/tests.pro2
100 files changed, 0 insertions, 7653 deletions
diff --git a/tests/.prev_CMakeLists.txt b/tests/.prev_CMakeLists.txt
deleted file mode 100644
index 2214137..0000000
--- a/tests/.prev_CMakeLists.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-# Generated from tests.pro.
-
-if(QT_BUILD_STANDALONE_TESTS)
- # Add qt_find_package calls for extra dependencies that need to be found when building
- # the standalone tests here.
-endif()
-qt_build_tests()
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
deleted file mode 100644
index ed965c0..0000000
--- a/tests/CMakeLists.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-# Generated from tests.pro.
-
-if(QT_BUILD_STANDALONE_TESTS)
- # Add qt_find_package calls for extra dependencies that need to be found when building
- # the standalone tests here.
-endif()
-qt_build_tests()
-
diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt
deleted file mode 100644
index fad899f..0000000
--- a/tests/auto/CMakeLists.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-# Generated from auto.pro.
-
-#####################################################################
-## tst_qtgraphicaleffects Test:
-#####################################################################
-
-qt_internal_add_test(tst_qtgraphicaleffects
- SOURCES
- tst_qtgraphicaleffects.cpp
- PUBLIC_LIBRARIES
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-#### Keys ignored in scope 1:.:.:auto.pro:<TRUE>:
-# DISTFILES = "dummy.qml"
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
deleted file mode 100644
index df22767..0000000
--- a/tests/auto/auto.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-
-CONFIG += testcase
-
-QT += qml testlib quick
-
-TARGET = tst_qtgraphicaleffects
-
-SOURCES += tst_qtgraphicaleffects.cpp
-
-DISTFILES += \
- dummy.qml
diff --git a/tests/auto/dummy.qml b/tests/auto/dummy.qml
deleted file mode 100644
index 17ba150..0000000
--- a/tests/auto/dummy.qml
+++ /dev/null
@@ -1,6 +0,0 @@
-import QtQuick 2.0
-import QtGraphicalEffects 1.0
-
-Item {
-
-}
diff --git a/tests/auto/tst_qtgraphicaleffects.cpp b/tests/auto/tst_qtgraphicaleffects.cpp
deleted file mode 100644
index f83fc02..0000000
--- a/tests/auto/tst_qtgraphicaleffects.cpp
+++ /dev/null
@@ -1,542 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <qtest.h>
-#include <QtCore/qscopedpointer.h>
-#include <QtCore/QLibraryInfo>
-#include <QtQml>
-
-class tst_qtgraphicaleffects : public QObject
-{
- Q_OBJECT
-
-private slots:
- void initTestCase();
-
- void brightnessContrast();
- void colorize();
- void colorOverlay();
- void conicalGradient();
- void desaturate();
- void displace();
- void dropShadow();
- void fastBlur();
- void gammaAdjust();
- void glow();
- void hueSaturation();
- void levelAdjust();
- void linearGradient();
- void opacityMask();
- void radialGradient();
- void rectangularGlow();
- void thresholdMask();
-
-private:
- QString componentErrors(const QQmlComponent*) const;
-
- QString importSelf;
- QQmlEngine engine;
-};
-
-QString tst_qtgraphicaleffects::componentErrors(const QQmlComponent* component) const
-{
- if (!component) {
- return "(null component)";
- }
-
- QStringList out;
-
- const auto errors = component->errors();
- for (const QQmlError &error : errors)
- out << error.toString();
-
- return out.join("\n");
-}
-
-void tst_qtgraphicaleffects::initTestCase()
-{
- QString import;
-
- QString qmlImportPath = qgetenv("QML2_IMPORT_PATH");
- if (qmlImportPath.isEmpty() || !QFile::exists(qmlImportPath))
- qmlImportPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath);
-
- // Allow the test to work whether or not the module is yet installed.
- if (QFile::exists(qmlImportPath + "/QtGraphicalEffects")) {
- // Module is installed - import it the nice way
- import = "QtGraphicalEffects";
- }
- else {
- // Module is not installed - import it from the source tree, by URI
- QString qmldir = QFINDTESTDATA("../../src/effects/qmldir");
- QVERIFY2(QFile::exists(qmldir), qPrintable(qmldir));
-
- QUrl url = QUrl::fromLocalFile(QFileInfo(qmldir).canonicalPath());
- import = "\"" + url.toString() + "\"";
- }
-
- importSelf = QString("import %1 1.0\n").arg(import);
-}
-
-
-void tst_qtgraphicaleffects::brightnessContrast()
-{
- // Creation
- QString componentStr = "import QtQuick 2.0\n"
- + importSelf +
- "BrightnessContrast {"
- "width: 50; height: 50\n"
- "source: ShaderEffectSource {sourceItem: Rectangle {width: 100; height: 100}}"
- "}";
- QQmlComponent component(&engine);
- component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
- QVERIFY2(component.status() != QQmlComponent::Error, qPrintable(componentErrors(&component)));
- QTRY_COMPARE(component.status(), QQmlComponent::Ready);
- QScopedPointer<QObject> obj(component.create());
- QVERIFY(!obj.isNull());
-
- // Default values
- QCOMPARE(obj->property("brightness").type(), QVariant::Double);
- QCOMPARE(obj->property("brightness").toDouble(), 0.0);
- QCOMPARE(obj->property("contrast").type(), QVariant::Double);
- QCOMPARE(obj->property("contrast").toDouble(), 0.0);
- QCOMPARE(obj->property("source").toInt(), 0);
- QCOMPARE(obj->property("cached").toBool(), false);
-}
-
-void tst_qtgraphicaleffects::colorize()
-{
- // Creation
- QString componentStr = "import QtQuick 2.0\n"
- + importSelf +
- "Colorize {"
- "width: 50; height: 50\n"
- "source: ShaderEffectSource {sourceItem: Rectangle {width: 100; height: 100}}"
- "}";
- QQmlComponent component(&engine);
- component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
- QVERIFY2(component.status() != QQmlComponent::Error, qPrintable(componentErrors(&component)));
- QTRY_COMPARE(component.status(), QQmlComponent::Ready);
- QScopedPointer<QObject> obj(component.create());
- QVERIFY(!obj.isNull());
-
- // Default values
- QCOMPARE(obj->property("hue").type(), QVariant::Double);
- QCOMPARE(obj->property("hue").toDouble(), 0.0);
- QCOMPARE(obj->property("saturation").type(), QVariant::Double);
- QCOMPARE(obj->property("saturation").toDouble(), 1.0);
- QCOMPARE(obj->property("lightness").type(), QVariant::Double);
- QCOMPARE(obj->property("lightness").toDouble(), 0.0);
- QCOMPARE(obj->property("source").toInt(), 0);
- QCOMPARE(obj->property("cached").toBool(), false);
-}
-
-void tst_qtgraphicaleffects::fastBlur()
-{
- // Creation
- QString componentStr = "import QtQuick 2.0\n"
- + importSelf +
- "FastBlur {"
- "width: 50; height: 50\n"
- "source: ShaderEffectSource {sourceItem: Rectangle {width: 100; height: 100}}"
- "}";
- QQmlComponent component(&engine);
- component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
- QVERIFY2(component.status() != QQmlComponent::Error, qPrintable(componentErrors(&component)));
- QTRY_COMPARE(component.status(), QQmlComponent::Ready);
- QScopedPointer<QObject> obj(component.create());
- QVERIFY(!obj.isNull());
-
- // Default values
- QCOMPARE(obj->property("radius").type(), QVariant::Double);
- QCOMPARE(obj->property("radius").toDouble(), 0.0);
- QCOMPARE(obj->property("transparentBorder").toBool(), false);
- QCOMPARE(obj->property("source").toInt(), 0);
- QCOMPARE(obj->property("cached").toBool(), false);
-}
-
-void tst_qtgraphicaleffects::desaturate()
-{
- // Creation
- QString componentStr = "import QtQuick 2.0\n"
- + importSelf +
- "Desaturate {"
- "width: 50; height: 50\n"
- "source: ShaderEffectSource {sourceItem: Rectangle {width: 100; height: 100}}"
- "}";
- QQmlComponent component(&engine);
- component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
- QVERIFY2(component.status() != QQmlComponent::Error, qPrintable(componentErrors(&component)));
- QTRY_COMPARE(component.status(), QQmlComponent::Ready);
- QScopedPointer<QObject> obj(component.create());
- QVERIFY(!obj.isNull());
-
- // Default values
- QCOMPARE(obj->property("desaturation").type(), QVariant::Double);
- QCOMPARE(obj->property("desaturation").toDouble(), 0.0);
- QCOMPARE(obj->property("source").toInt(), 0);
- QCOMPARE(obj->property("cached").toBool(), false);
-}
-
-void tst_qtgraphicaleffects::hueSaturation()
-{
- // Creation
- QString componentStr = "import QtQuick 2.0\n"
- + importSelf +
- "HueSaturation {"
- "width: 50; height: 50\n"
- "source: ShaderEffectSource {sourceItem: Rectangle {width: 100; height: 100}}"
- "}";
- QQmlComponent component(&engine);
- component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
- QVERIFY2(component.status() != QQmlComponent::Error, qPrintable(componentErrors(&component)));
- QTRY_COMPARE(component.status(), QQmlComponent::Ready);
- QScopedPointer<QObject> obj(component.create());
- QVERIFY(!obj.isNull());
-
- // Default values
- QCOMPARE(obj->property("hue").type(), QVariant::Double);
- QCOMPARE(obj->property("hue").toDouble(), 0.0);
- QCOMPARE(obj->property("saturation").type(), QVariant::Double);
- QCOMPARE(obj->property("saturation").toDouble(), 0.0);
- QCOMPARE(obj->property("lightness").type(), QVariant::Double);
- QCOMPARE(obj->property("lightness").toDouble(), 0.0);
- QCOMPARE(obj->property("source").toInt(), 0);
- QCOMPARE(obj->property("cached").toBool(), false);
-}
-
-void tst_qtgraphicaleffects::opacityMask()
-{
- // Creation
- QString componentStr = "import QtQuick 2.0\n"
- + importSelf +
- "OpacityMask {"
- "width: 50; height: 50\n"
- "source: ShaderEffectSource {sourceItem: Rectangle {width: 100; height: 100}}"
- "maskSource: ShaderEffectSource {sourceItem: Rectangle {width: 100; height: 100}}"
- "}";
- QQmlComponent component(&engine);
- component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
- QVERIFY2(component.status() != QQmlComponent::Error, qPrintable(componentErrors(&component)));
- QTRY_COMPARE(component.status(), QQmlComponent::Ready);
- QScopedPointer<QObject> obj(component.create());
- QVERIFY(!obj.isNull());
-
- // Default values
- QCOMPARE(obj->property("source").toInt(), 0);
- QCOMPARE(obj->property("maskSource").toInt(), 0);
- QCOMPARE(obj->property("cached").toBool(), false);
-}
-
-void tst_qtgraphicaleffects::radialGradient()
-{
- // Creation
- QString componentStr = "import QtQuick 2.0\n"
- + importSelf +
- "RadialGradient {"
- "width: 50; height: 50\n"
- "}";
- QQmlComponent component(&engine);
- component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
- QVERIFY2(component.status() != QQmlComponent::Error, qPrintable(componentErrors(&component)));
- QTRY_COMPARE(component.status(), QQmlComponent::Ready);
- QScopedPointer<QObject> obj(component.create());
- QVERIFY(!obj.isNull());
-
- // Default values
- QCOMPARE(obj->property("gradient").toInt(), 0);
- QCOMPARE(obj->property("horizontalOffset").type(), QVariant::Double);
- QCOMPARE(obj->property("horizontalOffset").toDouble(), 0.0);
- QCOMPARE(obj->property("verticalOffset").type(), QVariant::Double);
- QCOMPARE(obj->property("verticalOffset").toDouble(), 0.0);
- QCOMPARE(obj->property("horizontalRadius").type(), QVariant::Double);
- QCOMPARE(obj->property("horizontalRadius").toDouble(), 50.0);
- QCOMPARE(obj->property("verticalRadius").type(), QVariant::Double);
- QCOMPARE(obj->property("verticalRadius").toDouble(), 50.0);
- QCOMPARE(obj->property("source").toInt(), 0);
- QCOMPARE(obj->property("angle").type(), QVariant::Double);
- QCOMPARE(obj->property("angle").toDouble(), 0.0);
- QCOMPARE(obj->property("cached").toBool(), false);
-}
-
-void tst_qtgraphicaleffects::linearGradient()
-{
- // Creation
- QString componentStr = "import QtQuick 2.0\n"
- + importSelf +
- "LinearGradient {"
- "width: 50; height: 50\n"
- "}";
- QQmlComponent component(&engine);
- component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
- QVERIFY2(component.status() != QQmlComponent::Error, qPrintable(componentErrors(&component)));
- QTRY_COMPARE(component.status(), QQmlComponent::Ready);
- QScopedPointer<QObject> obj(component.create());
- QVERIFY(!obj.isNull());
-
- // Default values
- QCOMPARE(obj->property("gradient").toInt(), 0);
- QCOMPARE(obj->property("start").toPointF(), QPointF(0.0, 0.0));
- QCOMPARE(obj->property("end").toPointF(), QPointF(0.0, 50.0));
- QCOMPARE(obj->property("source").toInt(), 0);
- QCOMPARE(obj->property("cached").toBool(), false);
-}
-
-void tst_qtgraphicaleffects::rectangularGlow()
-{
- // Creation
- QString componentStr = "import QtQuick 2.0\n"
- + importSelf +
- "RectangularGlow {"
- "width: 50; height: 50\n"
- "}";
- QQmlComponent component(&engine);
- component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
- QVERIFY2(component.status() != QQmlComponent::Error, qPrintable(componentErrors(&component)));
- QTRY_COMPARE(component.status(), QQmlComponent::Ready);
- QScopedPointer<QObject> obj(component.create());
- QVERIFY(!obj.isNull());
-
- // Default values
- QCOMPARE(obj->property("spread").type(), QVariant::Double);
- QCOMPARE(obj->property("spread").toDouble(), 0.0);
- QCOMPARE(obj->property("glowRadius").type(), QVariant::Double);
- QCOMPARE(obj->property("glowRadius").toDouble(), 0.0);
- QCOMPARE(obj->property("color").toString(), QString("#ffffff"));
- QCOMPARE(obj->property("cornerRadius").type(), QVariant::Double);
- QCOMPARE(obj->property("cornerRadius").toDouble(), 0.0);
- QCOMPARE(obj->property("cached").toBool(), false);
-}
-
-void tst_qtgraphicaleffects::conicalGradient()
-{
- // Creation
- QString componentStr = "import QtQuick 2.0\n"
- + importSelf +
- "ConicalGradient {"
- "width: 50; height: 50\n"
- "}";
- QQmlComponent component(&engine);
- component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
- QVERIFY2(component.status() != QQmlComponent::Error, qPrintable(componentErrors(&component)));
- QTRY_COMPARE(component.status(), QQmlComponent::Ready);
- QScopedPointer<QObject> obj(component.create());
- QVERIFY(!obj.isNull());
-
- // Default values
- QCOMPARE(obj->property("angle").type(), QVariant::Double);
- QCOMPARE(obj->property("angle").toDouble(), 0.0);
- QCOMPARE(obj->property("gradient").toInt(), 0);
- QCOMPARE(obj->property("horizontalOffset").type(), QVariant::Double);
- QCOMPARE(obj->property("horizontalOffset").toDouble(), 0.0);
- QCOMPARE(obj->property("horizontalOffset").type(), QVariant::Double);
- QCOMPARE(obj->property("verticalOffset").toDouble(), 0.0);
- QCOMPARE(obj->property("source").toInt(), 0);
- QCOMPARE(obj->property("cached").toBool(), false);
-}
-
-void tst_qtgraphicaleffects::colorOverlay()
-{
- // Creation
- QString componentStr = "import QtQuick 2.0\n"
- + importSelf +
- "ColorOverlay {"
- "width: 50; height: 50\n"
- "source: ShaderEffectSource {sourceItem: Rectangle {width: 100; height: 100}}"
- "}";
- QQmlComponent component(&engine);
- component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
- QVERIFY2(component.status() != QQmlComponent::Error, qPrintable(componentErrors(&component)));
- QTRY_COMPARE(component.status(), QQmlComponent::Ready);
- QScopedPointer<QObject> obj(component.create());
- QVERIFY(!obj.isNull());
-
- // Default values
- QCOMPARE(obj->property("cached").toBool(), false);
- QCOMPARE(obj->property("color").toString(), QString("#00000000"));
-}
-
-void tst_qtgraphicaleffects::dropShadow()
-{
- // Creation
- QString componentStr = "import QtQuick 2.0\n"
- + importSelf +
- "DropShadow {"
- "source: ShaderEffectSource {sourceItem: Rectangle {width: 100; height: 100}}"
- "width: 50; height: 50\n"
- "}";
- QQmlComponent component(&engine);
- component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
- QVERIFY2(component.status() != QQmlComponent::Error, qPrintable(componentErrors(&component)));
- QTRY_COMPARE(component.status(), QQmlComponent::Ready);
- QScopedPointer<QObject> obj(component.create());
- QVERIFY(!obj.isNull());
-
- // Default values
- QCOMPARE(obj->property("radius").type(), QVariant::Double);
- QCOMPARE(obj->property("radius").toDouble(), 0.0);
- QCOMPARE(obj->property("horizontalOffset").type(), QVariant::Double);
- QCOMPARE(obj->property("horizontalOffset").toDouble(), 0.0);
- QCOMPARE(obj->property("verticalOffset").type(), QVariant::Double);
- QCOMPARE(obj->property("verticalOffset").toDouble(), 0.0);
- QCOMPARE(obj->property("cached").toBool(), false);
- QCOMPARE(obj->property("source").toInt(), 0);
- QCOMPARE(obj->property("color").toString(), QString("#000000"));
- QCOMPARE(obj->property("spread").type(), QVariant::Double);
- QCOMPARE(obj->property("spread").toDouble(), 0.0);
- QCOMPARE(obj->property("transparentBorder").toBool(), false);
-}
-
-void tst_qtgraphicaleffects::gammaAdjust()
-{
- // Creation
- QString componentStr = "import QtQuick 2.0\n"
- + importSelf +
- "GammaAdjust {"
- "source: ShaderEffectSource {sourceItem: Rectangle {width: 100; height: 100}}"
- "width: 50; height: 50\n"
- "}";
- QQmlComponent component(&engine);
- component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
- QVERIFY2(component.status() != QQmlComponent::Error, qPrintable(componentErrors(&component)));
- QTRY_COMPARE(component.status(), QQmlComponent::Ready);
- QScopedPointer<QObject> obj(component.create());
- QVERIFY(!obj.isNull());
-
- // Default values
- QCOMPARE(obj->property("gamma").type(), QVariant::Double);
- QCOMPARE(obj->property("gamma").toDouble(), 1.0);
- QCOMPARE(obj->property("source").toInt(), 0);
- QCOMPARE(obj->property("cached").toBool(), false);
-}
-
-void tst_qtgraphicaleffects::thresholdMask()
-{
- // Creation
- QString componentStr = "import QtQuick 2.0\n"
- + importSelf +
- "ThresholdMask {"
- "width: 50; height: 50\n"
- "source: ShaderEffectSource {sourceItem: Rectangle {width: 100; height: 100}}"
- "maskSource: ShaderEffectSource {sourceItem: Rectangle {width: 100; height: 100}}"
- "}";
- QQmlComponent component(&engine);
- component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
- QVERIFY2(component.status() != QQmlComponent::Error, qPrintable(componentErrors(&component)));
- QTRY_COMPARE(component.status(), QQmlComponent::Ready);
- QScopedPointer<QObject> obj(component.create());
- QVERIFY(!obj.isNull());
-
- // Default values
- QCOMPARE(obj->property("source").toInt(), 0);
- QCOMPARE(obj->property("maskSource").toInt(), 0);
- QCOMPARE(obj->property("cached").toBool(), false);
- QCOMPARE(obj->property("threshold").type(), QVariant::Double);
- QCOMPARE(obj->property("threshold").toDouble(), 0.0);
- QCOMPARE(obj->property("spread").type(), QVariant::Double);
- QCOMPARE(obj->property("spread").toDouble(), 0.0);
-}
-
-void tst_qtgraphicaleffects::glow()
-{
- // Creation
- QString componentStr = "import QtQuick 2.0\n"
- + importSelf +
- "Glow {"
- "source: ShaderEffectSource {sourceItem: Rectangle {width: 100; height: 100}}"
- "width: 50; height: 50\n"
- "}";
- QQmlComponent component(&engine);
- component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
- QVERIFY2(component.status() != QQmlComponent::Error, qPrintable(componentErrors(&component)));
- QTRY_COMPARE(component.status(), QQmlComponent::Ready);
- QScopedPointer<QObject> obj(component.create());
- QVERIFY(!obj.isNull());
-
- // Default values
- QCOMPARE(obj->property("radius").type(), QVariant::Double);
- QCOMPARE(obj->property("radius").toDouble(), 0);
- QCOMPARE(obj->property("cached").toBool(), false);
- QCOMPARE(obj->property("spread").type(), QVariant::Double);
- QCOMPARE(obj->property("spread").toDouble(), 0);
- QCOMPARE(obj->property("color").toString(), QString("#ffffff"));
- QCOMPARE(obj->property("transparentBorder").toBool(), false);
-}
-
-void tst_qtgraphicaleffects::displace()
-{
- // Creation
- QString componentStr = "import QtQuick 2.0\n"
- + importSelf +
- "Displace {"
- "source: ShaderEffectSource {sourceItem: Rectangle {width: 100; height: 100}}"
- "displacementSource: ShaderEffectSource {sourceItem: Rectangle {width: 100; height: 100}}"
- "width: 50; height: 50\n"
- "}";
- QQmlComponent component(&engine);
- component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
- QVERIFY2(component.status() != QQmlComponent::Error, qPrintable(componentErrors(&component)));
- QTRY_COMPARE(component.status(), QQmlComponent::Ready);
- QScopedPointer<QObject> obj(component.create());
- QVERIFY(!obj.isNull());
-
- // Default values
- QCOMPARE(obj->property("source").toInt(), 0);
- QCOMPARE(obj->property("displacementSource").toInt(), 0);
- QCOMPARE(obj->property("cached").toBool(), false);
- QCOMPARE(obj->property("displacement").type(), QVariant::Double);
- QCOMPARE(obj->property("displacement").toDouble(), 0.0);
-}
-
-void tst_qtgraphicaleffects::levelAdjust()
-{
- // Creation
- QString componentStr = "import QtQuick 2.0\n"
- + importSelf +
- "LevelAdjust {"
- "width: 50; height: 50\n"
- "}";
- QQmlComponent component(&engine);
- component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
- QVERIFY2(component.status() != QQmlComponent::Error, qPrintable(componentErrors(&component)));
- QTRY_COMPARE(component.status(), QQmlComponent::Ready);
- QScopedPointer<QObject> obj(component.create());
- QVERIFY(!obj.isNull());
-
- // Default values
- QCOMPARE(obj->property("source").toInt(), 0);
- QCOMPARE(obj->property("minimumInput").toString(), QString("#00000000"));
- QCOMPARE(obj->property("maximumInput").toString(), QString("#ffffff"));
- QCOMPARE(obj->property("minimumOutput").toString(), QString("#00000000"));
- QCOMPARE(obj->property("maximumOutput").toString(), QString("#ffffff"));
- QCOMPARE(obj->property("cached").toBool(), false);
-}
-
-QTEST_MAIN(tst_qtgraphicaleffects)
-
-#include "tst_qtgraphicaleffects.moc"
diff --git a/tests/manual/CMakeLists.txt b/tests/manual/CMakeLists.txt
deleted file mode 100644
index de858a2..0000000
--- a/tests/manual/CMakeLists.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Generated from manual.pro.
-
-add_subdirectory(smooth)
diff --git a/tests/manual/SourceProxyTest.qml b/tests/manual/SourceProxyTest.qml
deleted file mode 100644
index 311f543..0000000
--- a/tests/manual/SourceProxyTest.qml
+++ /dev/null
@@ -1,112 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 Jolla Ltd, author: <gunnar.sletta@jollamobile.com>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtGraphicalEffects.private 1.12
-import QtQuick 2.12
-
-Rectangle {
-
- Rectangle {
- width: parent.width
- height: 1
- color: "lightsteelblue"
- }
-
- id: root
-
- height: 40
- width: parent.width
-
- property alias proxyInterpolation: proxy.interpolation
- property bool proxyPadding: false
-
- property string sourcing; // "layered", "shadersource", "none";
-
- property bool smoothness: true
- property bool padding: false
-
- property alias label: text.text
-
-
- property bool expectProxy: false
-
- color: proxy.active ? "darkred" : "darkblue"
-
- Text {
- id: text
- color: "white"
- font.pixelSize: 14
- font.bold: true
-
- anchors.centerIn: parent
-
- layer.enabled: root.sourcing == "layered"
- layer.smooth: root.smoothness
- layer.sourceRect: padding ? Qt.rect(-1, -1, text.width, text.height) : Qt.rect(0, 0, 0, 0);
- }
-
- ShaderEffectSource {
- id: shaderSource
- sourceItem: text
- smooth: root.smoothness
- sourceRect: padding ? Qt.rect(-1, -1, text.width, text.height) : Qt.rect(0, 0, 0, 0);
- }
-
- SourceProxy {
- id: proxy
- input: sourcing == "shadersource" ? shaderSource : (root.sourcing == "layered" ? text : null);
- visible: false
- sourceRect: proxyPadding ? Qt.rect(-1, -1, text.width, text.height) : Qt.rect(0, 0, 0, 0);
- }
-
- Text {
- id: autoConfLabel;
- // This will be shown when the source is a layer which has different
- // attributes set than what the source proxy expects. The source proxy
- // will then configure the layer.
- color: "#00ff00"
- anchors.right: parent.right
- anchors.verticalCenter: parent.verticalCenter;
- text: "(configured)"
- font.pixelSize: 12
- font.bold: true
- visible: root.expectProxy != proxy.active && !proxy.active && root.sourcing == "layered";
- }
-
- Text {
- color: "red"
- anchors.right: parent.right
- anchors.verticalCenter: parent.verticalCenter;
- rotation: 45
- text: "FAIL"
- font.pixelSize: 12
- font.bold: true
- visible: root.expectProxy != proxy.active && !autoConfLabel.visible
- }
-
-}
diff --git a/tests/manual/manual.pro b/tests/manual/manual.pro
deleted file mode 100644
index 730f489..0000000
--- a/tests/manual/manual.pro
+++ /dev/null
@@ -1,4 +0,0 @@
-TEMPLATE = subdirs
-OTHER_FILES = testbed/*.qml
-SUBDIRS += smooth
-
diff --git a/tests/manual/smooth/CMakeLists.txt b/tests/manual/smooth/CMakeLists.txt
deleted file mode 100644
index 9912fcf..0000000
--- a/tests/manual/smooth/CMakeLists.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-# Generated from smooth.pro.
-
-#####################################################################
-## smooth Binary:
-#####################################################################
-
-qt_internal_add_manual_test(smooth
- GUI
- SOURCES
- main.cpp
- DEFINES
- QT_DEPRECATED_WARNINGS
- PUBLIC_LIBRARIES
- Qt::Gui
- Qt::Quick
-)
-
-# Resources:
-set(resources_resource_files
- "CellContainer.qml"
- "SourceImage.qml"
- "main.qml"
- "star.png"
-)
-
-qt_internal_add_resource(smooth "resources"
- PREFIX
- "/"
- FILES
- ${resources_resource_files}
-)
-
-
-#### Keys ignored in scope 1:.:.:smooth.pro:<TRUE>:
-# QML_DESIGNER_IMPORT_PATH = <EMPTY>
-# QML_IMPORT_PATH = <EMPTY>
-
-## Scopes:
-#####################################################################
-
-#### Keys ignored in scope 2:.:.:smooth.pro:QNX:
-# target.path = "/tmp/$${TARGET}/bin"
-
-#### Keys ignored in scope 4:.:.:smooth.pro:UNIX AND NOT ANDROID:
-# target.path = "/opt/$${TARGET}/bin"
-
-#### Keys ignored in scope 5:.:.:smooth.pro:NOT target.path_ISEMPTY:
-# INSTALLS = "target"
diff --git a/tests/manual/smooth/CellContainer.qml b/tests/manual/smooth/CellContainer.qml
deleted file mode 100644
index 60af0f7..0000000
--- a/tests/manual/smooth/CellContainer.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import QtQuick 2.12
-import QtQuick.Layouts 1.12
-
-Item {
- implicitWidth: children[0].implicitWidth * children[0].scale
- implicitHeight: children[0].implicitHeight * children[0].scale
-
- Layout.alignment: Qt.AlignHCenter
-}
diff --git a/tests/manual/smooth/SourceImage.qml b/tests/manual/smooth/SourceImage.qml
deleted file mode 100644
index 86cf269..0000000
--- a/tests/manual/smooth/SourceImage.qml
+++ /dev/null
@@ -1,8 +0,0 @@
-import QtQuick 2.12
-
-Image {
- source: "star.png"
- smooth: false
- scale: 4
- transformOrigin: Item.TopLeft
-}
diff --git a/tests/manual/smooth/main.cpp b/tests/manual/smooth/main.cpp
deleted file mode 100644
index 26af78c..0000000
--- a/tests/manual/smooth/main.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QGuiApplication>
-#include <QQmlApplicationEngine>
-#include <QQuickItem>
-
-int main(int argc, char *argv[])
-{
- QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
-
- QGuiApplication app(argc, argv);
-
- QQmlApplicationEngine engine;
- engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
- if (engine.rootObjects().isEmpty())
- return -1;
-
- return app.exec();
-}
diff --git a/tests/manual/smooth/main.qml b/tests/manual/smooth/main.qml
deleted file mode 100644
index 3c458cc..0000000
--- a/tests/manual/smooth/main.qml
+++ /dev/null
@@ -1,358 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtQuick.Window 2.12
-import QtQuick.Layouts 1.12
-import QtGraphicalEffects 1.12
-
-/*
- A testbench for source items (and effects) that set smooth to false.
-
- Setting smooth to false doesn't make sense for all effects (like blurs).
-*/
-
-Window {
- id: window
- width: 1200
- height: 1000
- visible: true
-
- Flickable {
- anchors.fill: parent
- contentWidth: rowLayout.width
- contentHeight: rowLayout.implicitHeight
-
- GridLayout {
- id: rowLayout
- width: window.width
- columns: 4
-
- // Header
- Text {
- text: "Plain Image"
- Layout.alignment: Qt.AlignHCenter
- Layout.column: 1
- }
-
- Text {
- text: "... with standalone effect"
- Layout.alignment: Qt.AlignHCenter
- }
-
- Text {
- text: "... with layer effect"
- Layout.alignment: Qt.AlignHCenter
- }
-
- // ColorOverlay
- Text {
- text: "ColorOverlay"
- Layout.fillWidth: true
- }
-
- CellContainer {
- SourceImage {}
- }
-
- CellContainer {
- SourceImage {
- visible: false
- }
-
- ColorOverlay {
- width: parent.children[0].width
- height: parent.children[0].height
- source: parent.children[0]
- color: "#aa0ff000"
- scale: parent.children[0].scale
- transformOrigin: Item.TopLeft
- }
- }
-
- CellContainer {
- SourceImage {
- layer.enabled: true
- layer.effect: ColorOverlay {
- width: parent.children[0].width
- height: parent.children[0].height
- source: parent.children[0]
- color: "#aa0ff000"
- }
- }
- }
-
- // Colorize
- Text {
- text: "Colorize"
- Layout.fillWidth: true
- }
-
- CellContainer {
- SourceImage {}
- }
-
- CellContainer {
- SourceImage {
- visible: false
- }
-
- Colorize {
- width: parent.children[0].width
- height: parent.children[0].height
- source: parent.children[0]
- hue: 0.5
- scale: parent.children[0].scale
- transformOrigin: Item.TopLeft
- }
- }
-
- CellContainer {
- SourceImage {
- layer.enabled: true
- layer.effect: Colorize {
- width: parent.children[0].width
- height: parent.children[0].height
- source: parent.children[0]
- hue: 0.5
- }
- }
- }
-
- // BrightnessContrast
- Text {
- text: "BrightnessContrast"
- Layout.fillWidth: true
- }
-
- CellContainer {
- SourceImage {}
- }
-
- CellContainer {
- SourceImage {
- visible: false
- }
-
- BrightnessContrast {
- width: parent.children[0].width
- height: parent.children[0].height
- source: parent.children[0]
- brightness: 0.5
- scale: parent.children[0].scale
- transformOrigin: Item.TopLeft
- }
- }
-
- CellContainer {
- SourceImage {
- layer.enabled: true
- layer.effect: BrightnessContrast {
- width: parent.children[0].width
- height: parent.children[0].height
- source: parent.children[0]
- brightness: 0.5
- }
- }
- }
-
- // HueSaturation
- Text {
- text: "HueSaturation"
- Layout.fillWidth: true
- }
-
- CellContainer {
- SourceImage {}
- }
-
- CellContainer {
- SourceImage {
- visible: false
- }
-
- HueSaturation {
- width: parent.children[0].width
- height: parent.children[0].height
- source: parent.children[0]
- saturation: 1.0
- scale: parent.children[0].scale
- transformOrigin: Item.TopLeft
- }
- }
-
- CellContainer {
- SourceImage {
- layer.enabled: true
- layer.effect: HueSaturation {
- width: parent.children[0].width
- height: parent.children[0].height
- source: parent.children[0]
- saturation: 1.0
- }
- }
- }
-
- // Desaturate
- Text {
- text: "Desaturate"
- Layout.fillWidth: true
- }
-
- CellContainer {
- SourceImage {}
- }
-
- CellContainer {
- SourceImage {
- visible: false
- }
-
- Desaturate {
- width: parent.children[0].width
- height: parent.children[0].height
- source: parent.children[0]
- desaturation: 0.85
- scale: parent.children[0].scale
- transformOrigin: Item.TopLeft
- }
- }
-
- CellContainer {
- SourceImage {
- layer.enabled: true
- layer.effect: Desaturate {
- width: parent.children[0].width
- height: parent.children[0].height
- source: parent.children[0]
- desaturation: 0.85
- }
- }
- }
-
- // GammaAdjust
- Text {
- text: "GammaAdjust"
- Layout.fillWidth: true
- }
-
- CellContainer {
- SourceImage {}
- }
-
- CellContainer {
- SourceImage {
- visible: false
- }
-
- // doesn't seem to do anything...
- GammaAdjust {
- width: parent.children[0].width
- height: parent.children[0].height
- source: parent.children[0]
- gamma: 10
- scale: parent.children[0].scale
- transformOrigin: Item.TopLeft
- }
- }
-
- CellContainer {
- SourceImage {
- layer.enabled: true
- layer.effect: GammaAdjust {
- width: parent.children[0].width
- height: parent.children[0].height
- source: parent.children[0]
- gamma: 10
- }
- }
- }
-
- // LevelAdjust
- Text {
- text: "LevelAdjust"
- Layout.fillWidth: true
- }
-
- CellContainer {
- SourceImage {}
- }
-
- CellContainer {
- SourceImage {
- visible: false
- }
-
- LevelAdjust {
- width: parent.children[0].width
- height: parent.children[0].height
- source: parent.children[0]
- minimumOutput: "#00ffffff"
- maximumOutput: "#ff000000"
- scale: parent.children[0].scale
- transformOrigin: Item.TopLeft
- }
- }
-
- CellContainer {
- SourceImage {
- layer.enabled: true
- layer.effect: LevelAdjust {
- width: parent.children[0].width
- height: parent.children[0].height
- source: parent.children[0]
- minimumOutput: "#00ffffff"
- maximumOutput: "#ff000000"
- }
- }
- }
- }
- }
-}
diff --git a/tests/manual/smooth/resources.qrc b/tests/manual/smooth/resources.qrc
deleted file mode 100644
index b2b4653..0000000
--- a/tests/manual/smooth/resources.qrc
+++ /dev/null
@@ -1,8 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>main.qml</file>
- <file>CellContainer.qml</file>
- <file>SourceImage.qml</file>
- <file>star.png</file>
- </qresource>
-</RCC>
diff --git a/tests/manual/smooth/smooth.pro b/tests/manual/smooth/smooth.pro
deleted file mode 100644
index 5e577f4..0000000
--- a/tests/manual/smooth/smooth.pro
+++ /dev/null
@@ -1,30 +0,0 @@
-QT += quick
-CONFIG += c++11
-
-# The following define makes your compiler emit warnings if you use
-# any feature of Qt which as been marked deprecated (the exact warnings
-# depend on your compiler). Please consult the documentation of the
-# deprecated API in order to know how to port your code away from it.
-DEFINES += QT_DEPRECATED_WARNINGS
-
-# You can also make your code fail to compile if you use deprecated APIs.
-# In order to do so, uncomment the following line.
-# You can also select to disable deprecated APIs only up to a certain version of Qt.
-#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
-
-SOURCES += \
- main.cpp
-
-RESOURCES += \
- resources.qrc
-
-# Additional import path used to resolve QML modules in Qt Creator's code model
-QML_IMPORT_PATH =
-
-# Additional import path used to resolve QML modules just for Qt Quick Designer
-QML_DESIGNER_IMPORT_PATH =
-
-# Default rules for deployment.
-qnx: target.path = /tmp/$${TARGET}/bin
-else: unix:!android: target.path = /opt/$${TARGET}/bin
-!isEmpty(target.path): INSTALLS += target
diff --git a/tests/manual/smooth/star.png b/tests/manual/smooth/star.png
deleted file mode 100644
index 81c9ade..0000000
--- a/tests/manual/smooth/star.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testSourceProxy.qml b/tests/manual/testSourceProxy.qml
deleted file mode 100644
index dcdae6f..0000000
--- a/tests/manual/testSourceProxy.qml
+++ /dev/null
@@ -1,233 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 Jolla Ltd, author: <gunnar.sletta@jollamobile.com>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtGraphicalEffects.private 1.12
-import QtQuick 2.12
-
-Item {
- id: root
-
- width: 400
- height: 600
-
- // Text {
- // text: "source: layered, padded\nproxy: expect-no-padding"
- // layer.enabled: true
- // layer.sourceRect: Qt.rect(-1, -1, width, height);
- // font.pixelSize: 14
- // font.bold: true
- // }
-
- Flickable {
-
- anchors.fill: parent
-
- contentWidth: root.width
- contentHeight: column.height
-
- Column {
- id: column
- width: root.width
-
- SourceProxyTest {
- label: "source: layered, padded\nproxy: expect-no-padding"
- sourcing: "layered"
- proxyPadding: false
- padding: true
- expectProxy: true
- }
- SourceProxyTest {
- label: "source: layered, non-padded\nproxy: expect-no-padding"
- sourcing: "layered"
- proxyPadding: false
- padding: false
- expectProxy: false
- }
- SourceProxyTest {
- label: "source: layered, padded\nproxy: expect-padding"
- sourcing: "layered"
- proxyPadding: true
- padding: true
- expectProxy: false
- }
- SourceProxyTest {
- label: "source: layered, non-padded\nproxy: expect-padding"
- sourcing: "layered"
- proxyPadding: true
- padding: false
- expectProxy: true
- }
-
-
- SourceProxyTest {
- label: "source: shadersource, padded\nproxy: expect-no-padding"
- sourcing: "shadersource"
- proxyPadding: false
- padding: true
- expectProxy: true
- }
- SourceProxyTest {
- label: "source: shadersource, non-padded\nproxy: expect-no-padding"
- sourcing: "shadersource"
- proxyPadding: false
- padding: false
- expectProxy: false
- }
- SourceProxyTest {
- label: "source: shadersource, padded\nproxy: expect-padding"
- sourcing: "shadersource"
- proxyPadding: true
- padding: true
- expectProxy: false
- }
- SourceProxyTest {
- label: "source: shadersource, non-padded\nproxy: expect-padding"
- sourcing: "shadersource"
- proxyPadding: true
- padding: false
- expectProxy: true
- }
-
-
- SourceProxyTest {
- label: "source: layered, non-smooth\nproxy: any-interpolation, "
- sourcing: "layered"
- smoothness: false
- proxyInterpolation: SourceProxy.AnyInterpolation
- expectProxy: false
- }
- SourceProxyTest {
- label: "source: layered, smooth\nproxy: any-interpolation, "
- sourcing: "layered"
- smoothness: true
- proxyInterpolation: SourceProxy.AnyInterpolation
- expectProxy: false
- }
- SourceProxyTest {
- label: "source: layered, non-smooth\nproxy: nearest-interpolation, "
- sourcing: "layered"
- smoothness: false
- proxyInterpolation: SourceProxy.NearestInterpolation
- expectProxy: false
- }
- SourceProxyTest {
- label: "source: layered, smooth\nproxy: nearest-interpolation, "
- sourcing: "layered"
- smoothness: true
- proxyInterpolation: SourceProxy.NearestInterpolation
- expectProxy: true
- }
-
- SourceProxyTest {
- label: "source: layered, non-smooth\nproxy: linear-interpolation, "
- sourcing: "layered"
- smoothness: false
- proxyInterpolation: SourceProxy.LinearInterpolation
- expectProxy: true
- }
- SourceProxyTest {
- label: "source: layered, smooth\nproxy: linear-interpolation, "
- sourcing: "layered"
- smoothness: true
- proxyInterpolation: SourceProxy.LinearInterpolation
- expectProxy: false
- }
-
-
-
- SourceProxyTest {
- label: "source: shadersource, non-smooth\nproxy: any-interpolation, "
- sourcing: "shadersource"
- smoothness: false
- proxyInterpolation: SourceProxy.AnyInterpolation
- expectProxy: false
- }
- SourceProxyTest {
- label: "source: shadersource, smooth\nproxy: any-interpolation, "
- sourcing: "shadersource"
- smoothness: true
- proxyInterpolation: SourceProxy.AnyInterpolation
- expectProxy: false
- }
-
- SourceProxyTest {
- label: "source: shadersource, non-smooth\nproxy: nearest-interpolation, "
- sourcing: "shadersource"
- smoothness: false
- proxyInterpolation: SourceProxy.NearestInterpolation
- expectProxy: false
- }
- SourceProxyTest {
- label: "source: shadersource, smooth\nproxy: nearest-interpolation, "
- sourcing: "shadersource"
- smoothness: true
- proxyInterpolation: SourceProxy.NearestInterpolation
- expectProxy: true
- }
-
- SourceProxyTest {
- label: "source: shadersource, non-smooth\nproxy: linear-interpolation, "
- sourcing: "shadersource"
- smoothness: false
- proxyInterpolation: SourceProxy.LinearInterpolation
- expectProxy: true
- }
- SourceProxyTest {
- label: "source: shadersource, smooth\nproxy: linear-interpolation, "
- sourcing: "shadersource"
- smoothness: true
- proxyInterpolation: SourceProxy.LinearInterpolation
- expectProxy: false
- }
-
-
-
- SourceProxyTest {
- label: "source: none\nproxy: any-interpolation"
- sourcing: "none"
- proxyInterpolation: SourceProxy.AnyInterpolation
- expectProxy: false
- }
- SourceProxyTest {
- label: "source: none\nproxy: nearest-interpolation"
- sourcing: "none"
- proxyInterpolation: SourceProxy.NearestInterpolation
- expectProxy: false
- }
- SourceProxyTest {
- label: "source: none\nproxy: linear-interpolation"
- sourcing: "none"
- proxyInterpolation: SourceProxy.LinearInterpolation
- expectProxy: false
- }
-
-
- }
-
- }
-}
diff --git a/tests/manual/testbed/BGColorPicker.qml b/tests/manual/testbed/BGColorPicker.qml
deleted file mode 100644
index 0b06a8d..0000000
--- a/tests/manual/testbed/BGColorPicker.qml
+++ /dev/null
@@ -1,120 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-
-Label {
- id: bgColorPicker
- property color color: "#242424"
- caption: "Background color"
-
- Row {
- id: selection
- x: -3
- y: 3
- spacing: 4
- Rectangle { width: 16; height: 16; color: "#ffffff"
- Image {
- anchors.centerIn: parent
- source: "images/color_selection_mask.png"
- }
- MouseArea {
- anchors.fill: parent
- anchors.margins: -3
- onClicked: {
- bgColorPicker.color = parent.color
- highlight.x = parent.x - 3
- }
- }
- }
- Rectangle { width: 16; height: 16; color: "#ababab"
- Image {
- anchors.centerIn: parent
- source: "images/color_selection_mask.png"
- }
- MouseArea {
- anchors.fill: parent
- anchors.margins: -3
- onClicked: {
- bgColorPicker.color = parent.color
- highlight.x = parent.x - 3
- }
- }
- }
- Rectangle { id: initial; width: 16; height: 16; color: "#242424"
- Image {
- anchors.centerIn: parent
- source: "images/color_selection_mask.png"
- }
- MouseArea {
- anchors.fill: parent
- anchors.margins: -3
- onClicked: {
- bgColorPicker.color = parent.color
- highlight.x = parent.x - 3
- }
- }
- }
- Rectangle { width: 16; height: 16; color: "#000000"
- Image {
- anchors.centerIn: parent
- source: "images/color_selection_mask.png"
- }
- MouseArea {
- anchors.fill: parent
- anchors.margins: -3
- onClicked: {
- bgColorPicker.color = parent.color
- highlight.x = parent.x - 3
- }
- }
- }
- Image { source: "images/background.png"
- width: 16; height: 16;
- Image {
- anchors.centerIn: parent
- source: "images/color_selection_mask.png"
- }
- MouseArea {
- anchors.fill: parent
- anchors.margins: -3
- onClicked: {
- bgColorPicker.color = "#010101"
- highlight.x = parent.x - 3
- }
- }
- }
- }
-
- Image {
- id: highlight
- source: "images/color_selection_hl.png"
- x: initial.x - (highlight.width - initial.width) * 0.5
- y: selection.y - (highlight.height - selection.height) * 0.5
- }
-}
diff --git a/tests/manual/testbed/CheckBox.qml b/tests/manual/testbed/CheckBox.qml
deleted file mode 100644
index 2bd3fb6..0000000
--- a/tests/manual/testbed/CheckBox.qml
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-
-Item {
- id: checkBox
- property string caption: ""
- property bool selected: true
- property bool pressed: mouse.pressed
- anchors {left: parent.left; right: parent.right}
- height: 20
-
- Text {
- id: captionText
- width: 110
- anchors.verticalCenter: parent.verticalCenter
- horizontalAlignment: Text.AlignRight
- text: checkBox.caption + ':'
- font.family: "Arial"
- font.pixelSize: 11
- color: "#B3B3B3"
- }
-
- Image {
- id: button
- anchors {left: captionText.right; leftMargin: 5; verticalCenter: parent.verticalCenter}
- source: "images/checkbox_outer.png"
- smooth: true
- Image {
- id: buttonFill
- anchors.centerIn: parent
- source: "images/checkbox_inner.png"
- smooth: true
- visible: checkBox.selected
- }
- }
-
- MouseArea {
- id: mouse
- anchors.fill: parent
- anchors.rightMargin: 160
- onClicked: checkBox.selected = !checkBox.selected
- preventStealing: true
- }
-}
diff --git a/tests/manual/testbed/ColorPicker.qml b/tests/manual/testbed/ColorPicker.qml
deleted file mode 100644
index aa46d7a..0000000
--- a/tests/manual/testbed/ColorPicker.qml
+++ /dev/null
@@ -1,212 +0,0 @@
-/*****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Add-On Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-*****************************************************************************/
-
-import QtQuick 2.12
-
-Item {
- id: root
- property color color: Qt.hsla(hue, saturation, lightness, alpha)
- property alias hue: hueSlider.value
- property alias saturation: saturationSlider.value
- property alias lightness: lightnessSlider.value
- property alias alpha: alphaSlider.value
- property bool showAlphaSlider: true
-
- width: parent.width
- height: 100
-
- Image {
- anchors.fill: map
- source: "images/background.png"
- fillMode: Image.Tile
- }
-
- Rectangle {
- id: colorBox
- anchors.fill: map
- color: root.color
- }
-
- Item { // ShaderEffect converted to an Item for now to keep it simple
- id: map
- anchors.left: parent.left
- anchors.leftMargin: 10
- anchors.top: parent.top
- anchors.topMargin: 5
- width: 68
- height: width
- opacity: 0.01
- property real hue: root.hue
-
- MouseArea {
- id: mapMouseArea
- anchors.fill: parent
- hoverEnabled: true
- preventStealing: true
- onPositionChanged: {
- if (pressed) {
- var xx = Math.max(0, Math.min(mouse.x, parent.width))
- var yy = Math.max(0, Math.min(mouse.y, parent.height))
- root.saturation = 1.0 - yy / parent.height
- root.lightness = xx / parent.width
- }
- }
- onPressed: positionChanged(mouse)
-
- onEntered: map.opacity = 1
- onReleased: {
- if (mouse.x < 0 || mouse.x > parent.width || mouse.y < 0 || mouse.y > parent.height) {
- map.opacity = 0.01;
- }
- }
- onExited: {
- if (!pressed) {
- map.opacity = 0.01;
- }
- }
- }
-
- Image {
- id: crosshair
- source: "images/slider_handle.png"
- x: root.lightness * parent.width - width / 2
- y: (1.0 - root.saturation) * parent.height - height / 2
- }
- }
-
- Column {
- anchors.left: parent.left
- anchors.right: parent.right
-
- ColorSlider {
- id: hueSlider
- minimum: 0.0
- maximum: 1.0
- value: 0.5
- caption: "H"
- trackItem: Rectangle {
- width: parent.height
- height: parent.width - 10
- color: "red"
- rotation: -90
- transformOrigin: Item.TopLeft
- y: width
- x: 5
- gradient: Gradient {
- GradientStop {position: 0.000; color: Qt.rgba(1, 0, 0, 1)}
- GradientStop {position: 0.167; color: Qt.rgba(1, 1, 0, 1)}
- GradientStop {position: 0.333; color: Qt.rgba(0, 1, 0, 1)}
- GradientStop {position: 0.500; color: Qt.rgba(0, 1, 1, 1)}
- GradientStop {position: 0.667; color: Qt.rgba(0, 0, 1, 1)}
- GradientStop {position: 0.833; color: Qt.rgba(1, 0, 1, 1)}
- GradientStop {position: 1.000; color: Qt.rgba(1, 0, 0, 1)}
- }
- }
- }
-
- ColorSlider {
- id: saturationSlider
- minimum: 0.0
- maximum: 1.0
- value: 1.0
- caption: "S"
- handleOpacity: 1.5 - map.opacity
- trackItem: Rectangle {
- width: parent.height
- height: parent.width - 10
- color: "red"
- rotation: -90
- transformOrigin: Item.TopLeft
- y: width
- x: 5
- gradient: Gradient {
- GradientStop { position: 0; color: Qt.hsla(root.hue, 0.0, root.lightness, 1.0) }
- GradientStop { position: 1; color: Qt.hsla(root.hue, 1.0, root.lightness, 1.0) }
- }
- }
- }
-
- ColorSlider {
- id: lightnessSlider
- minimum: 0.0
- maximum: 1.0
- value: 0.5
- caption: "L"
- handleOpacity: 1.5 - map.opacity
- trackItem: Rectangle {
- width: parent.height
- height: parent.width - 10
- color: "red"
- rotation: -90
- transformOrigin: Item.TopLeft
- y: width
- x: 5
- gradient: Gradient {
- GradientStop { position: 0; color: 'black' }
- GradientStop { position: 0.5; color: Qt.hsla(root.hue, root.saturation, 0.5, 1.0) }
- GradientStop { position: 1; color: 'white' }
- }
- }
- }
-
- ColorSlider {
- id: alphaSlider
- minimum: 0.0
- maximum: 1.0
- value: 1.0
- caption: "A"
- opacity: showAlphaSlider ? 1.0 : 0.0
- trackItem:Item {
- anchors.fill: parent
- Image {
- anchors {fill: parent; leftMargin: 5; rightMargin: 5}
- source: "images/background.png"
- fillMode: Image.TileHorizontally
- }
- Rectangle {
- width: parent.height
- height: parent.width - 10
- color: "red"
- rotation: -90
- transformOrigin: Item.TopLeft
- y: width
- x: 5
- gradient: Gradient {
- GradientStop { position: 0; color: "transparent" }
- GradientStop { position: 1; color: Qt.hsla(root.hue, root.saturation, root.lightness, 1.0) }
- }
- }
- }
- }
-
- Label {
- caption: "ARGB"
- text: "#" + ((Math.ceil(root.alpha * 255) + 256).toString(16).substr(1, 2) + root.color.toString().substr(1, 6)).toUpperCase();
- }
- }
-}
diff --git a/tests/manual/testbed/ColorSlider.qml b/tests/manual/testbed/ColorSlider.qml
deleted file mode 100644
index bdddac9..0000000
--- a/tests/manual/testbed/ColorSlider.qml
+++ /dev/null
@@ -1,120 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-
-Item {
- id: colorSlider
-
- property real value: 1
- property real maximum: 1
- property real minimum: 0
- property string caption: ""
- property bool pressed: mouseArea.pressed
- property bool integer: false
- property string handleSource: "images/slider_handle.png"
- property real handleOpacity: 1.0
- property alias trackItem: track.children
-
- width: parent.width
- height: 20
-
- function updatePos() {
- if (maximum > minimum) {
- var pos = (track.width - 10) * (value - minimum) / (maximum - minimum) + 5;
- return Math.min(Math.max(pos, 5), track.width - 5) - 10;
- } else {
- return 5;
- }
- }
-
- Text {
- id: captionText
- width: 110
- anchors.verticalCenter: parent.verticalCenter
- horizontalAlignment: Text.AlignRight
- text: colorSlider.caption + ':'
- font.family: "Arial"
- font.pixelSize: 11
- color: "#B3B3B3"
- }
-
- Text {
- id: valueCaption
- anchors.left: captionText.right
- anchors.leftMargin: 11
- anchors.verticalCenter: parent.verticalCenter
- width: 35
- horizontalAlignment: Text.AlignLeft
- text: colorSlider.value.toFixed(1)
- font.family: "Arial"
- font.pixelSize: 11
- color: "#999999"
- }
-
- Item {
- id: track
- height: 4
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- anchors.leftMargin: parent.width / 2
- anchors.right: parent.right
- anchors.rightMargin: 10
-
- Image {
- id: handle;
- anchors.verticalCenter: parent.verticalCenter
- smooth: true
- source: mouseArea.pressed ? 'images/slider_handle_pressed.png' : colorSlider.handleSource
- opacity: colorSlider.handleOpacity
- x: updatePos()
- z: 1
- }
-
- MouseArea {
- id: mouseArea
- anchors {left: parent.left; right: parent.right; leftMargin: 5; rightMargin: 5; verticalCenter: parent.verticalCenter}
- height: 8
- preventStealing: true
-
- onPressed: {
- var handleX = Math.max(0, Math.min(mouseX, mouseArea.width))
- var realValue = (maximum - minimum) * handleX / mouseArea.width + minimum;
- value = colorSlider.integer ? Math.round(realValue) : realValue;
- }
-
- onPositionChanged: {
- if (pressed) {
- var handleX = Math.max(0, Math.min(mouseX, mouseArea.width))
- var realValue = (maximum - minimum) * handleX / mouseArea.width + minimum;
- value = colorSlider.integer ? Math.round(realValue) : realValue;
- }
- }
- }
- }
-}
diff --git a/tests/manual/testbed/Control.qml b/tests/manual/testbed/Control.qml
deleted file mode 100644
index dcc7257..0000000
--- a/tests/manual/testbed/Control.qml
+++ /dev/null
@@ -1,99 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-
-Item {
- id: control
- property string caption: ""
- default property alias children: controlsColumn.children
- property bool last: false
-
- property bool __hide: caption == "advanced"
-
- anchors {left: parent.left; right: parent.right}
- height: __hide ? 30 : controlsColumn.height + 40
-
- Behavior on height {
- id: heightBehavior
- enabled: false
- NumberAnimation { duration: 100 }
- }
-
- Image {
- source: "images/group_top.png"
- anchors {top: parent.top; left: parent.left; right: parent.right}
- }
-
- Image {
- source: "images/group_bottom.png"
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- anchors.right: parent.right
- smooth: true
- visible: !last || __hide
- }
-
- Text {
- id: sectionText
- anchors {left: parent.left; top: parent.top; leftMargin: 11; topMargin: 8}
- color: "white"
- font.family: "Arial"
- font.bold: true
- font.pixelSize: 12
- text: caption
- }
-
- Image {
- anchors {right: parent.right; rightMargin: 5; top: parent.top}
- source: __hide ? "images/expand.png" : "images/collapse.png"
- }
-
- MouseArea {
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
- height: 30
- onClicked: {
- heightBehavior.enabled = true
- control.__hide = !control.__hide
- }
- }
-
- Column {
- id: controlsColumn
- anchors.top: parent.top
- anchors.topMargin: 30
- anchors.left: parent.left
- anchors.right: parent.right
- opacity: !__hide
- Behavior on opacity {
- NumberAnimation { duration: 100 }
- }
- }
-}
diff --git a/tests/manual/testbed/ImageSource.qml b/tests/manual/testbed/ImageSource.qml
deleted file mode 100644
index 520eacd..0000000
--- a/tests/manual/testbed/ImageSource.qml
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-
-Image {
- id: is
- source: "images/bug.jpg"
- smooth: true
- anchors.fill: parent
- fillMode: Image.PreserveAspectFit
- sourceSize: width > height ? Qt.size(0, parent.height) : Qt.size(parent.width, 0)
- //visible: !enabledCheckBox.selected
- opacity: enabledCheckBox.selected ? 0.0 : 1.0
-
- property bool forcedUpdateAnimationRunning: updateCheckBox.selected
- Text {
- x: is.width - 10 - width
- y: 10
- text: "Qt"
- font.pixelSize: 20
- color: "white"
- visible: is.forcedUpdateAnimationRunning
-
- NumberAnimation on rotation {
- id: dd
- running: is.forcedUpdateAnimationRunning
- loops: Animation.Infinite
- duration: 5000
- from: 0.0
- to: 360.0
- }
- }
-}
diff --git a/tests/manual/testbed/Label.qml b/tests/manual/testbed/Label.qml
deleted file mode 100644
index 6a5964c..0000000
--- a/tests/manual/testbed/Label.qml
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-
-Item {
- id: label
- property string caption: ""
- property string text: ""
- default property alias children: childrenItem.children
- anchors {left: parent.left; right: parent.right}
- height: Math.max(20, childrenItem.height)
-
- Text {
- id: captionText
- width: 110
- height: 20
- horizontalAlignment: Text.AlignRight
- verticalAlignment: Text.AlignVCenter
- text: label.caption + ':'
- font.family: "Arial"
- font.pixelSize: 11
- color: "#B3B3B3"
- }
-
- Text {
- id: valueText
- anchors {left: captionText.right; right: parent.right; leftMargin: 11; verticalCenter: parent.verticalCenter}
- height: 20
- verticalAlignment: Text.AlignVCenter
- text: label.text
- font.family: "Arial"
- font.pixelSize: 11
- color: "#999999"
- visible: label.text.length > 0
- }
-
- Item {
- id: childrenItem
- anchors {left: captionText.right; leftMargin: 11; right: parent.right}
- height: childrenRect.height
- }
-}
diff --git a/tests/manual/testbed/LevelSlider.qml b/tests/manual/testbed/LevelSlider.qml
deleted file mode 100644
index f13928c..0000000
--- a/tests/manual/testbed/LevelSlider.qml
+++ /dev/null
@@ -1,189 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-
-Item {
- id: slider
-
- width: parent.width
- height: 30
-
- property real midPointValue: 0.5
- property real blackPointValue: 0.0
- property real whitePointValue: 1.0
- property real maximum: 1
- property real minimum: 0
- property real gamma: Math.min(10.0, Math.max(0.1, 1/(Math.log(0.5) / Math.log(midPointValue))))
- property string caption: ""
- property bool integer: false
- property bool showMidPoint: true
-
- Text {
- id: captionText
- width: 110
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 13
- horizontalAlignment: Text.AlignRight
- text: slider.caption + ':'
- font.family: "Arial"
- font.pixelSize: 11
- color: "#B3B3B3"
- }
-
- Item {
- id: track
- height: parent.height
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- anchors.leftMargin: parent.width / 2 - 30
- anchors.right: parent.right
- anchors.rightMargin: 10
-
- BorderImage {
- id: trackImage
- source: "images/slider_track.png"
- anchors.left: parent.left
- anchors.right: parent.right
- border.right: 2
- width: parent.width
- }
-
- BorderImage {
- id: trackFilled
- anchors.left: blackpointHandle.x < whitePointHandle.x ? blackpointHandle.right : whitePointHandle.right
- anchors.right: blackpointHandle.x < whitePointHandle.x ? whitePointHandle.left : blackpointHandle.left
- anchors.margins: -10
- source: "images/slider_track_filled.png"
- border.left: 3
- border.right: 3
- }
-
- Image {
- id: blackpointHandle;
- smooth: true
- source: blackpointMouseArea.pressed ? "images/slider_handle_pressed.png" : "images/slider_handle_black.png"
- x: trackImage.x - width/2 + 5
- width: 20
- onXChanged: {
- blackPointValue = minimum + maximum * ((x + 5) / (track.width - 10))
- midpointHandle.x = blackpointHandle.x + ((whitePointHandle.x - blackpointHandle.x) * midPointValue)
- }
- }
-
- Image {
- id: midpointHandle;
- smooth: true
- source: midpointMouseArea.pressed ? "images/slider_handle_pressed.png" : "images/slider_handle_gray.png"
- x: blackpointHandle.x + ((whitePointHandle.x - blackpointHandle.x) * 0.5)
- visible: showMidPoint
- width: 20
- onXChanged: {
- if (midpointMouseArea.pressed) {
- midPointValue = (x - Math.min(whitePointHandle.x, blackpointHandle.x)) / Math.abs(whitePointHandle.x - blackpointHandle.x)
- }
- }
- }
-
- Image {
- id: whitePointHandle;
- smooth: true
- source: whitepointMouseArea.pressed ? "images/slider_handle_pressed.png" : "images/slider_handle_white.png"
- x: trackImage.x + trackImage.width - width/2 - 5
- width: 20
- onXChanged: {
- whitePointValue = minimum + maximum * ((x + 5) / (track.width - 10))
- midpointHandle.x = blackpointHandle.x + ((whitePointHandle.x - blackpointHandle.x) * midPointValue)
- }
- }
-
- MouseArea {
- id: blackpointMouseArea
- anchors.fill: blackpointHandle
- anchors.margins: -5
- drag.target: blackpointHandle
- drag.axis: Drag.XAxis
- drag.minimumX: -5
- drag.maximumX: trackImage.width - blackpointHandle.width + 5
- }
-
- MouseArea {
- id: whitepointMouseArea
- anchors.fill: whitePointHandle
- anchors.margins: -5
- drag.target: whitePointHandle
- drag.axis: Drag.XAxis
- drag.minimumX: -5
- drag.maximumX: trackImage.width - whitePointHandle.width + 5
- }
-
- MouseArea {
- id: midpointMouseArea
- anchors.fill: midpointHandle
- anchors.margins: -5
- drag.target: midpointHandle
- drag.axis: Drag.XAxis
- drag.minimumX: Math.min(blackpointHandle.x, whitePointHandle.x)
- drag.maximumX: Math.max(whitePointHandle.x, blackpointHandle.x)
- }
- }
-
- Text {
- id: blackPointValueCaption
- anchors.bottom: track.bottom
- anchors.left: track.left
- text: slider.blackPointValue.toFixed(1)
- font.family: "Arial"
- font.pixelSize: 11
- color: "#999999"
- }
-
- Text {
- id: midPointValueCaption
- anchors.bottom: track.bottom
- anchors.left: track.left
- anchors.right: track.right
- horizontalAlignment: Text.AlignHCenter
- width: track.width
- text: slider.gamma.toFixed(1)
- font.family: "Arial"
- font.pixelSize: 11
- color: "#999999"
- visible: showMidPoint
- }
-
- Text {
- id: whitePointValueCaption
- anchors.bottom: track.bottom
- anchors.right: track.right
- text: slider.whitePointValue.toFixed(1)
- font.family: "Arial"
- font.pixelSize: 11
- color: "#999999"
- }
-}
diff --git a/tests/manual/testbed/PositionPicker.qml b/tests/manual/testbed/PositionPicker.qml
deleted file mode 100644
index 2b85b36..0000000
--- a/tests/manual/testbed/PositionPicker.qml
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-
-Image {
- id: positionPicker
- property real xValue: 0
- property real yValue: 0
-
- x: parent.width * xValue - positionPicker.width / 2
- y: parent.height * yValue - positionPicker.height / 2
-
- property alias pressed: mouseArea.pressed
-
- source: pressed ? "images/slider_handle_pressed.png" : "images/slider_handle.png"
-
- MouseArea {
- id: mouseArea
-
- property real startX
- property real startY
-
- anchors.fill: parent
- onPressed: {
- startX = mouseX;
- startY = mouseY;
- }
-
- onPositionChanged: {
- xValue = (positionPicker.x + positionPicker.width / 2 + mouseX - startX) / positionPicker.parent.width;
- yValue = (positionPicker.y + positionPicker.height / 2 + mouseY - startY) / positionPicker.parent.height;
- }
- }
-}
diff --git a/tests/manual/testbed/ProgressBar.qml b/tests/manual/testbed/ProgressBar.qml
deleted file mode 100644
index 067edfb..0000000
--- a/tests/manual/testbed/ProgressBar.qml
+++ /dev/null
@@ -1,101 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-
-Item {
- id: slider
-
- property real value: 1
- property real maximum: 1
- property real minimum: 0
- property string caption: ""
- property bool integer: false
-
- width: parent.width
- height: 20
-
- function updatePos() {
- if (maximum > minimum) {
- var pos = (track.width) * (value - minimum) / (maximum - minimum);
- return Math.min(Math.max(pos, 0), track.width);
- } else {
- return 0;
- }
- }
-
- Text {
- id: captionText
- width: 110
- anchors.verticalCenter: parent.verticalCenter
- horizontalAlignment: Text.AlignRight
- text: slider.caption + ':'
- font.family: "Arial"
- font.pixelSize: 11
- color: "#B3B3B3"
- }
-
- Text {
- id: valueCaption
- anchors.left: captionText.right
- anchors.leftMargin: 11
- anchors.verticalCenter: parent.verticalCenter
- width: 35
- horizontalAlignment: Text.AlignLeft
- text: slider.value.toFixed(1)
- font.family: "Arial"
- font.pixelSize: 11
- color: "#999999"
- }
-
- Item {
- id: track
- height: parent.height
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- anchors.leftMargin: parent.width / 2
- anchors.right: parent.right
- anchors.rightMargin: 10
-
- BorderImage {
- source: "images/slider_track.png"
- anchors.left: parent.left
- anchors.right: parent.right
- border.right: 2
- }
-
- BorderImage {
- id: trackFilled
- anchors.left: parent.left
- width: updatePos()
- source: "images/slider_track_filled.png"
- border.left: 3
- border.right: 3
- }
- }
-}
diff --git a/tests/manual/testbed/RadioButton.qml b/tests/manual/testbed/RadioButton.qml
deleted file mode 100644
index 1ab809d..0000000
--- a/tests/manual/testbed/RadioButton.qml
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-
-Item {
- id: radioButton
- property string caption: ""
- property bool selected: false
- property bool pressed: mouse.pressed
- anchors {left: parent.left; right: parent.right}
- height: 20
-
- Text {
- id: captionText
- anchors {left: parent.horizontalCenter; leftMargin: -5; right: parent.right; verticalCenter: parent.verticalCenter}
- horizontalAlignment: Text.AlignLeft
- text: radioButton.caption
- font.family: "Arial"
- font.pixelSize: 11
- color: "#B3B3B3"
- }
-
- Image {
- id: button
- anchors {right: captionText.left; rightMargin: 10; verticalCenter: parent.verticalCenter}
- source: "images/radiobutton_outer.png"
- smooth: true
- Image {
- id: buttonFill
- anchors.centerIn: parent
- source: "images/radiobutton_inner.png"
- smooth: true
- visible: radioButton.selected
- }
- }
-
- MouseArea {
- id: mouse
- anchors.fill: parent
- anchors.leftMargin: 115
- preventStealing: true
- }
-}
diff --git a/tests/manual/testbed/RadioButtonColumn.qml b/tests/manual/testbed/RadioButtonColumn.qml
deleted file mode 100644
index 3a16386..0000000
--- a/tests/manual/testbed/RadioButtonColumn.qml
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-
-Item {
- id: radioButtoncolumn
- property string value: ""
- property string prefixCaption: ""
- default property alias children: buttons.children
- property string caption: ""
-
- width: parent.width
- height: buttons.height
-
- Text {
- id: captionText
- anchors {top: parent.top; topMargin: 4}
- width: 110
- horizontalAlignment: Text.AlignRight
- font.family: "Arial"
- font.pixelSize: 11
- color: "#B3B3B3"
- text: radioButtoncolumn.caption + ':'
- }
-
- Column {
- id: buttons
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
- }
-}
diff --git a/tests/manual/testbed/RgbaColorPicker.qml b/tests/manual/testbed/RgbaColorPicker.qml
deleted file mode 100644
index 0b48e95..0000000
--- a/tests/manual/testbed/RgbaColorPicker.qml
+++ /dev/null
@@ -1,103 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-
-Item {
- id: rgbaSlider
- property color color: Qt.rgba(rValue, gValue, bValue, aValue)
-
- property alias rValue: rSlider.value
- property alias gValue: gSlider.value
- property alias bValue: bSlider.value
- property alias aValue: aSlider.value
- property bool pressed: rSlider.pressed || gSlider.pressed || bSlider.pressed || aSlider.pressed
-
- width: parent.width
- height: childrenRect.height
-
- function dec2hex(i)
- {
- if (i <= 15)
- return "0" + i.toString(16);
- else
- return i.toString(16);
- }
-
- Rectangle {
- id: colorRect
- width: 50; height: 50
- anchors.left: parent.left
- anchors.leftMargin: 20
- anchors.verticalCenter: sliders.verticalCenter
- color: Qt.rgba(rgbaSlider.rValue, rgbaSlider.gValue, rgbaSlider.bValue, rgbaSlider.aValue)
- }
- Column {
- id: sliders
- anchors {left: parent.left; right: parent.right}
- Slider {
- id: aSlider
- minimum: 0
- maximum: 1
- value: 1.0
- caption: 'A'
- }
- Slider {
- id: rSlider
- minimum: 0
- maximum: 1
- value: 1.0
- caption: 'R'
- }
- Slider {
- id: gSlider
- minimum: 0
- maximum: 1
- value: 1.0
- caption: 'G'
- }
- Slider {
- id: bSlider
- minimum: 0
- maximum: 1
- value: 1.0
- caption: 'B'
- }
-
- }
-// Text {
-// anchors.top: colorRect.bottom
-// anchors.topMargin: 5
-// anchors.horizontalCenter: colorRect.horizontalCenter
-// horizontalAlignment: Text.AlignHCenter
-// text: "#" + dec2hex(Math.round(rgbaSlider.aValue * 255)) + dec2hex(Math.round(rgbaSlider.rValue * 255)) + dec2hex(Math.round(rgbaSlider.gValue * 255)) + dec2hex(Math.round(rgbaSlider.bValue * 255))
-// font.capitalization: Font.AllUppercase
-// color: "#999999"
-// font.pixelSize: 11
-// }
-}
diff --git a/tests/manual/testbed/Slider.qml b/tests/manual/testbed/Slider.qml
deleted file mode 100644
index a199a7f..0000000
--- a/tests/manual/testbed/Slider.qml
+++ /dev/null
@@ -1,131 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-
-Item {
- id: slider
-
- property real value: 1
- property real maximum: 1
- property real minimum: 0
- property string caption: ""
- property bool pressed: mouseArea.pressed
- property bool integer: false
- property string handleSource: "images/slider_handle.png"
-
- width: parent.width
- height: 20
-
- function updatePos() {
- if (maximum > minimum) {
- var pos = (track.width - 10) * (value - minimum) / (maximum - minimum) + 5;
- return Math.min(Math.max(pos, 5), track.width - 5) - 10;
- } else {
- return 5;
- }
- }
-
- Text {
- id: captionText
- width: 110
- anchors.verticalCenter: parent.verticalCenter
- horizontalAlignment: Text.AlignRight
- text: slider.caption + ':'
- font.family: "Arial"
- font.pixelSize: 11
- color: "#B3B3B3"
- }
-
- Text {
- id: valueCaption
- anchors.left: captionText.right
- anchors.leftMargin: 11
- anchors.verticalCenter: parent.verticalCenter
- width: 35
- horizontalAlignment: Text.AlignLeft
- text: integer ? slider.value.toFixed(0) : slider.value.toFixed(1)
- font.family: "Arial"
- font.pixelSize: 11
- color: "#999999"
- }
-
- Item {
- id: track
- height: parent.height
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- anchors.leftMargin: parent.width / 2
- anchors.right: parent.right
- anchors.rightMargin: 10
-
- BorderImage {
- source: "images/slider_track.png"
- anchors.left: parent.left
- anchors.right: parent.right
- border.right: 2
- }
-
- BorderImage {
- id: trackFilled
- anchors.left: minimum == -maximum ? (value < 0 ? handle.horizontalCenter : parent.horizontalCenter) : parent.left
- anchors.right: minimum == -maximum && value < 0 ? parent.horizontalCenter : handle.horizontalCenter
- source: "images/slider_track_filled.png"
- border.left: 3
- border.right: 3
- }
-
- Image {
- id: handle;
- smooth: true
- source: mouseArea.pressed ? 'images/slider_handle_pressed.png' : slider.handleSource
- x: updatePos()
- }
-
- MouseArea {
- id: mouseArea
- anchors { left: parent.left; right: parent.right; verticalCenter: parent.verticalCenter }
- height: 16
- preventStealing: true
-
- onPressed: {
- var handleX = Math.max(0, Math.min(mouseX, mouseArea.width))
- var realValue = (maximum - minimum) * handleX / mouseArea.width + minimum;
- value = slider.integer ? Math.round(realValue) : realValue;
- }
-
- onPositionChanged: {
- if (pressed) {
- var handleX = Math.max(0, Math.min(mouseX, mouseArea.width))
- var realValue = (maximum - minimum) * handleX / mouseArea.width + minimum;
- value = slider.integer ? Math.round(realValue) : realValue;
- }
- }
- }
- }
-}
diff --git a/tests/manual/testbed/TestBedModel.qml b/tests/manual/testbed/TestBedModel.qml
deleted file mode 100644
index d396173..0000000
--- a/tests/manual/testbed/TestBedModel.qml
+++ /dev/null
@@ -1,50 +0,0 @@
-/*****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Add-On Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-*****************************************************************************/
-
-import QtQuick 2.12
-
-ListModel {
- id: testcaseModel
- ListElement { name: "TestDisplace.qml"; group: "Distortion"; last: true }
- ListElement { name: "TestOpacityMask.qml"; group: "Mask" }
- ListElement { name: "TestThresholdMask.qml"; group: "Mask"; last: true }
- ListElement { name: "TestGlow.qml"; group: "Glow" }
- ListElement { name: "TestRectangularGlow.qml"; group: "Glow"; last: true }
- ListElement { name: "TestFastBlur.qml"; group: "Blur" }
- ListElement { name: "TestDropShadow.qml"; group: "Drop Shadow" }
- ListElement { name: "TestLinearGradient.qml"; group: "Gradient" }
- ListElement { name: "TestConicalGradient.qml"; group: "Gradient" }
- ListElement { name: "TestRadialGradient.qml"; group: "Gradient"; last: true }
- ListElement { name: "TestColorize.qml"; group: "Color" }
- ListElement { name: "TestColorOverlay.qml"; group: "Color" }
- ListElement { name: "TestHueSaturation.qml"; group: "Color" }
- ListElement { name: "TestBrightnessContrast.qml"; group: "Color" }
- ListElement { name: "TestDesaturate.qml"; group: "Color" }
- ListElement { name: "TestLevelAdjust.qml"; group: "Color" }
- ListElement { name: "TestGammaAdjust.qml"; group: "Color"; last: true }
-}
diff --git a/tests/manual/testbed/TestBrightnessContrast.qml b/tests/manual/testbed/TestBrightnessContrast.qml
deleted file mode 100644
index 20ce6cd..0000000
--- a/tests/manual/testbed/TestBrightnessContrast.qml
+++ /dev/null
@@ -1,96 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtGraphicalEffects 1.12
-
-TestCaseTemplate {
- ImageSource {
- id: imageSource
- }
-
- BrightnessContrast {
- id: effect
- anchors.fill: imageSource
- brightness: brigthnessSlider.value
- contrast: contrastSlider.value
- visible: enabledCheckBox.selected
- cached: cachedCheckBox.selected
- source: imageSource
- }
-
- bgColor: bgColorPicker.color
- controls: [
- Control {
- caption: "general"
- Slider {
- id: brigthnessSlider
- minimum: -1.0
- maximum: 1.0
- value: 0.0
- caption: "brightness"
- }
- Slider {
- id: contrastSlider
- minimum: -1.0
- maximum: 1.0
- value: 0.0
- caption: "contrast"
- }
- },
-
- Control {
- caption: "advanced"
- last: true
- Label {
- caption: "Effect size"
- text: effect.width + "x" + effect.height
- }
- Label {
- caption: "FPS"
- text: fps
- }
- CheckBox {
- id: cachedCheckBox
- caption: "cached"
- }
- CheckBox {
- id: enabledCheckBox
- caption: "enabled"
- }
- CheckBox {
- id: updateCheckBox
- caption: "animated"
- selected: false
- }
- BGColorPicker {
- id: bgColorPicker
- }
- }
- ]
-}
diff --git a/tests/manual/testbed/TestCaseTemplate.qml b/tests/manual/testbed/TestCaseTemplate.qml
deleted file mode 100644
index 6d15829..0000000
--- a/tests/manual/testbed/TestCaseTemplate.qml
+++ /dev/null
@@ -1,130 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-
-Item {
- id: main
-
- property real imageSize: Math.min(height, width - 220)
- default property alias testItem : testItemContainer.children
- property alias controls: controlsColumn.children
- property string currentTest: ""
- property string fps: "nan"
- property color bgColor: "black"
-
- property int dummy: 0
- property int fpsCount: 0
-
- anchors.fill: parent
-
- onDummyChanged: fpsCount++;
-
- NumberAnimation on dummy {
- duration: 500
- from: 0
- to: 10000
- loops: Animation.Infinite
- }
-
- Timer {
- interval: 1000
- repeat: true
- running: true
- onTriggered: {
- fps = "" + fpsCount;
- fpsCount = 0;
- }
- }
-
- Rectangle {
- id: backgroundColor
- anchors.fill: testItemContainer
- color: bgColor
- }
-
- Image {
- id: background
- anchors.fill: testItemContainer
- fillMode: Image.Tile
- source: bgColor.toString() == "#010101" ? "images/background.png" : ""
- }
-
- Item {
- id: testItemContainer
- property real margin: 0
- x: (parent.width - testParameterContainer.width - width) / 2
- anchors.verticalCenter: parent.verticalCenter
- anchors.top: undefined
- width: Math.min(parent.height - 20, parent.width - testParameterContainer.width - 20)
- height: width
- }
-
- Image {
- id: titlebar
- source: "images/title.png"
- anchors.top: parent.top
- anchors.right: parent.right
- width: 300
-
- Text {
- id: effectsListTitle
- anchors.fill: parent
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- text: currentTest
- color: "white"
- font.family: "Arial"
- font.bold: true
- font.pixelSize: 12
- }
- }
-
- Rectangle {
- id: testParameterContainer
- anchors.top: titlebar.bottom
- anchors.bottom: parent.bottom
- anchors.right: parent.right
- width: 300
- color: "#171717"
-
- Flickable {
- id: slidersFlickable
- anchors.fill: parent
- contentHeight: controlsColumn.height
- interactive: contentHeight > height
- clip: true
-
- Column {
- id: controlsColumn
- anchors.left: parent.left
- anchors.right: parent.right
- }
- }
- }
-}
diff --git a/tests/manual/testbed/TestColorOverlay.qml b/tests/manual/testbed/TestColorOverlay.qml
deleted file mode 100644
index 112aa35..0000000
--- a/tests/manual/testbed/TestColorOverlay.qml
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtGraphicalEffects 1.12
-
-TestCaseTemplate {
- ImageSource {
- id: imageSource
- source: "images/butterfly.png"
- }
-
- ColorOverlay {
- id: effect
- anchors.fill: imageSource
- color: colorPicker.color
- visible: enabledCheckBox.selected
- cached: cachedCheckBox.selected
- source: imageSource
- }
-
- bgColor: bgColorPicker.color
- controls: [
- Control {
- caption: "color"
- ColorPicker {
- id: colorPicker
- hue: 0.5
- saturation: 0.5
- lightness: 0.5
- alpha: 0.5
- }
- },
- Control {
- caption: "advanced"
- last: true
- Label {
- caption: "Effect size"
- text: effect.width + "x" + effect.height
- }
- Label {
- caption: "FPS"
- text: fps
- }
- CheckBox {
- id: cachedCheckBox
- caption: "cached"
- }
- CheckBox {
- id: enabledCheckBox
- caption: "enabled"
- }
- CheckBox {
- id: updateCheckBox
- caption: "animated"
- selected: false
- }
- BGColorPicker {
- id: bgColorPicker
- }
- }
- ]
-}
diff --git a/tests/manual/testbed/TestColorize.qml b/tests/manual/testbed/TestColorize.qml
deleted file mode 100644
index fed0d15..0000000
--- a/tests/manual/testbed/TestColorize.qml
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtGraphicalEffects 1.12
-
-TestCaseTemplate {
- ImageSource {
- id: imageSource
- forcedUpdateAnimationRunning: updateCheckBox.selected
- }
-
- Colorize {
- id: effect
- anchors.fill: imageSource
- hue: colorPicker.hue
- saturation: colorPicker.saturation
- lightness: colorPicker.lightness
- visible: enabledCheckBox.selected
- cached: cachedCheckBox.selected
- source: imageSource
- }
-
- bgColor: bgColorPicker.color
- controls: [
- Control {
- caption: "general"
- ColorPicker {
- id: colorPicker
- hue: 0.5
- saturation: 0.5
- lightness: 0.5
- showAlphaSlider: false
- }
- },
- Control {
- caption: "advanced"
- last: true
- Label {
- caption: "Effect size"
- text: effect.width + "x" + effect.height
- }
- Label {
- caption: "FPS"
- text: fps
- }
- CheckBox {
- id: cachedCheckBox
- caption: "cached"
- }
- CheckBox {
- id: enabledCheckBox
- caption: "enabled"
- }
- CheckBox {
- id: updateCheckBox
- caption: "animated"
- selected: false
- }
- BGColorPicker {
- id: bgColorPicker
- }
- }
- ]
-}
diff --git a/tests/manual/testbed/TestConicalGradient.qml b/tests/manual/testbed/TestConicalGradient.qml
deleted file mode 100644
index 8c7b145..0000000
--- a/tests/manual/testbed/TestConicalGradient.qml
+++ /dev/null
@@ -1,134 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtGraphicalEffects 1.12
-
-TestCaseTemplate {
- ImageSource {
- id: maskImage
- source: "images/butterfly.png"
- }
-
-
- ConicalGradient {
- id: effect
- anchors.fill: parent
- cached: cachedCheckBox.selected
- visible: enabledCheckBox.selected
- source: maskCheckBox.selected ? maskImage : undefined
- horizontalOffset: (offsetPicker.xValue - 0.5) * width
- verticalOffset: (offsetPicker.yValue - 0.5) * height
- gradient: Gradient {
- GradientStop {position: 0.0; color: gradientBeginColorSlider.color}
- GradientStop {position: 1.0; color: gradientEndColorSlider.color}
- }
- angle: startAngleSlider.value
- }
-
- PositionPicker {
- id: offsetPicker
- xValue: 0.5
- yValue: 0.5
- }
-
- bgColor: bgColorPicker.color
- controls: [
- Control {
- caption: "general"
- Label {
- caption: "horizontalOffset"
- text: effect.horizontalOffset.toFixed(1)
- }
- Label {
- caption: "verticalOffset"
- text: effect.verticalOffset.toFixed(1)
- }
- Slider {
- id: startAngleSlider
- caption: "angle"
- minimum: -360
- maximum: 360
- value: 0
- }
- CheckBox {
- id: maskCheckBox
- caption: "Use Mask"
- }
- },
-
- Control {
- caption: "gradient begin color"
- ColorPicker {
- id: gradientBeginColorSlider
- hue: 0.67
- saturation: 1.0
- lightness: 0.5
- }
- },
-
- Control {
- caption: "gradient end color"
- ColorPicker {
- id: gradientEndColorSlider
- hue: 0.5
- saturation: 1.0
- lightness: 0.5
- }
- },
-
- Control {
- caption: "advanced"
- last: true
- Label {
- caption: "Effect size"
- text: effect.width + "x" + effect.height
- }
- Label {
- caption: "FPS"
- text: fps
- }
- CheckBox {
- id: cachedCheckBox
- caption: "cached"
- }
- CheckBox {
- id: enabledCheckBox
- caption: "enabled"
- }
- CheckBox {
- id: updateCheckBox
- caption: "animated"
- selected: false
- }
- BGColorPicker {
- id: bgColorPicker
- }
- }
- ]
-}
diff --git a/tests/manual/testbed/TestDesaturate.qml b/tests/manual/testbed/TestDesaturate.qml
deleted file mode 100644
index 465a833..0000000
--- a/tests/manual/testbed/TestDesaturate.qml
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtGraphicalEffects 1.12
-
-TestCaseTemplate {
- ImageSource {
- id: imageSource
- }
-
- Desaturate {
- id: effect
- anchors.fill: imageSource
- desaturation: grayscaleSlider.value
- visible: enabledCheckBox.selected
- cached: cachedCheckBox.selected
- source: imageSource
- }
-
- bgColor: bgColorPicker.color
- controls: [
- Control {
- caption: "general"
- Slider {
- id: grayscaleSlider
- minimum: 0
- maximum: 1.0
- value: 1.0
- caption: "desaturation"
- }
- },
-
- Control {
- caption: "advanced"
- last: true
- Label {
- caption: "Effect size"
- text: effect.width + "x" + effect.height
- }
- Label {
- caption: "FPS"
- text: fps
- }
- CheckBox {
- id: cachedCheckBox
- caption: "cached"
- }
- CheckBox {
- id: enabledCheckBox
- caption: "enabled"
- }
- CheckBox {
- id: updateCheckBox
- caption: "animated"
- selected: false
- }
- BGColorPicker {
- id: bgColorPicker
- }
- }
- ]
-}
diff --git a/tests/manual/testbed/TestDisplace.qml b/tests/manual/testbed/TestDisplace.qml
deleted file mode 100644
index 1aca077..0000000
--- a/tests/manual/testbed/TestDisplace.qml
+++ /dev/null
@@ -1,131 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtGraphicalEffects 1.12
-
-TestCaseTemplate {
-
- ImageSource {
- id: imageSource
- source: "images/bug.jpg"
- }
-
- Rectangle {
- id: displacementMapSource
- visible: !enabledCheckBox.selected
- color: "#8080ff"
- smooth: true
- anchors.fill: parent
- Image {
- id: di
- x: (parent.width - width) / 2
- y: (parent.height - height) / 2
- sourceSize: Qt.size(128, 128)
- source: "images/glass_normal.png"
- smooth: true
- }
- }
-
- Displace {
- id: effect
- anchors.fill: imageSource
- visible: enabledCheckBox.selected
- cached: cachedCheckBox.selected
- source: imageSource
- displacementSource: displacementMapSource
- displacement: displacementScaleSlider.value
- smooth: true
- MouseArea {
- anchors.fill: parent
- onClicked: { di.x = mouseX - di.width/2; di.y = mouseY - di.height/2; }
- onPositionChanged: { if (pressed) { di.x = mouseX - di.width/2; di.y = mouseY - di.height/2; } }
- }
- }
-
- bgColor: bgColorPicker.color
- controls: [
- Control {
- caption: "general"
- Slider {
- id: displacementScaleSlider
- caption: "displacement"
- minimum: -0.5
- maximum: 0.5
- value: 0.1
- }
- },
-
- Control {
- caption: "advanced"
- last: true
- Label {
- caption: "Effect size"
- text: effect.width + "x" + effect.height
- }
- Label {
- caption: "FPS"
- text: fps
- }
- CheckBox {
- id: cachedCheckBox
- caption: "cached"
- }
- CheckBox {
- id: enabledCheckBox
- caption: "enabled"
- }
- CheckBox {
- id: updateCheckBox
- caption: "animated"
- selected: false
- }
- RadioButtonColumn {
- id: sourceType
- value: "shaderEffectSource"
- caption: "source type"
- RadioButton {
- caption: "shaderEffectSource"
- selected: caption == sourceType.value
- onPressedChanged: sourceType.value = caption
- }
- RadioButton {
- caption: "image"
- selected: caption == sourceType.value
- onPressedChanged: {
- sourceType.value = caption
- updateCheckBox.selected = false
- }
- }
- }
- BGColorPicker {
- id: bgColorPicker
- }
- }
- ]
-}
diff --git a/tests/manual/testbed/TestDropShadow.qml b/tests/manual/testbed/TestDropShadow.qml
deleted file mode 100644
index f67cc7b..0000000
--- a/tests/manual/testbed/TestDropShadow.qml
+++ /dev/null
@@ -1,128 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtGraphicalEffects 1.12
-
-TestCaseTemplate {
-
- ImageSource {
- id: imageSource
- source: "images/butterfly.png"
- anchors.centerIn: parent
- }
-
- DropShadow {
- id: effect
- horizontalOffset: (offsetPicker.xValue - 0.5) * width
- verticalOffset: (offsetPicker.yValue - 0.5) * height
- anchors.fill: imageSource
- radius: radiusSlider.value
- spread: spreadSlider.value
- color: colorPicker.color
- visible: enabledCheckBox.selected
- cached: cachedCheckBox.selected
- source: imageSource
- }
-
- PositionPicker {
- id: offsetPicker
- xValue: 0.51
- yValue: 0.51
- }
-
- bgColor: bgColorPicker.color
- controls: [
- Control {
- caption: "general"
- Label {
- caption: "horizontalOffset"
- text: effect.horizontalOffset.toFixed(1)
- }
- Label {
- caption: "verticalOffset"
- text: effect.verticalOffset.toFixed(1)
- }
- Slider {
- id: radiusSlider
- minimum: 0
- maximum: 64
- value: 8
- caption: "radius"
- }
- Slider {
- id: spreadSlider
- minimum: 0
- maximum: 1.0
- value: 0.0
- caption: "spread"
- }
- },
-
- Control {
- caption: "color"
- ColorPicker {
- id: colorPicker
- hue: 0
- saturation: 0
- lightness: 0
- alpha: 0.5
- }
- },
-
- Control {
- caption: "advanced"
- last: true
- Label {
- caption: "Effect size"
- text: effect.width + "x" + effect.height
- }
- Label {
- caption: "FPS"
- text: fps
- }
- CheckBox {
- id: cachedCheckBox
- caption: "cached"
- }
- CheckBox {
- id: enabledCheckBox
- caption: "enabled"
- }
- CheckBox {
- id: updateCheckBox
- caption: "animated"
- selected: false
- }
- BGColorPicker {
- id: bgColorPicker
- color: "#ababab"
- }
- }
- ]
-}
diff --git a/tests/manual/testbed/TestFastBlur.qml b/tests/manual/testbed/TestFastBlur.qml
deleted file mode 100644
index 70fb577..0000000
--- a/tests/manual/testbed/TestFastBlur.qml
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtGraphicalEffects 1.12
-
-TestCaseTemplate {
- ImageSource {
- id: imageSource;
- }
-
- FastBlur {
- id: effect
- anchors.fill: imageSource
- radius: blurSlider.value
- transparentBorder: transparentBorderCheckBox.selected
- visible: enabledCheckBox.selected
- cached: cachedCheckBox.selected
- source: imageSource
- }
-
- bgColor: bgColorPicker.color
- controls: [
- Control {
- caption: "general"
- Slider {
- id: blurSlider
- minimum: 0.0
- maximum: 64.0
- value: 32
- caption: "radius"
- }
- CheckBox {
- id: transparentBorderCheckBox
- caption: "transparentBorder"
- selected: false
- }
- },
-
- Control {
- caption: "advanced"
- last: true
- Label {
- caption: "Effect size"
- text: effect.width + "x" + effect.height
- }
- Label {
- caption: "FPS"
- text: fps
- }
- CheckBox {
- id: cachedCheckBox
- caption: "cached"
- }
- CheckBox {
- id: enabledCheckBox
- caption: "enabled"
- }
- CheckBox {
- id: updateCheckBox
- caption: "animated"
- selected: false
- }
- BGColorPicker {
- id: bgColorPicker
- }
- }
- ]
-}
diff --git a/tests/manual/testbed/TestGammaAdjust.qml b/tests/manual/testbed/TestGammaAdjust.qml
deleted file mode 100644
index 9ea307e..0000000
--- a/tests/manual/testbed/TestGammaAdjust.qml
+++ /dev/null
@@ -1,89 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtGraphicalEffects 1.12
-
-TestCaseTemplate {
- ImageSource {
- id: imageSource
- source: "images/butterfly.png"
- }
-
- GammaAdjust {
- id: effect
- anchors.fill: imageSource
- gamma: gammaSlider.value
- visible: enabledCheckBox.selected
- cached: cachedCheckBox.selected
- source: imageSource
- }
-
- bgColor: bgColorPicker.color
- controls: [
- Control {
- caption: "general"
- Slider {
- id: gammaSlider
- minimum: 0
- maximum: 2.0
- value: 1.0
- caption: "gamma"
- }
- },
-
- Control {
- caption: "advanced"
- last: true
- Label {
- caption: "Effect size"
- text: effect.width + "x" + effect.height
- }
- Label {
- caption: "FPS"
- text: fps
- }
- CheckBox {
- id: cachedCheckBox
- caption: "cached"
- }
- CheckBox {
- id: enabledCheckBox
- caption: "enabled"
- }
- CheckBox {
- id: updateCheckBox
- caption: "animated"
- selected: false
- }
- BGColorPicker {
- id: bgColorPicker
- }
- }
- ]
-}
diff --git a/tests/manual/testbed/TestGlow.qml b/tests/manual/testbed/TestGlow.qml
deleted file mode 100644
index 574eda8..0000000
--- a/tests/manual/testbed/TestGlow.qml
+++ /dev/null
@@ -1,110 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtGraphicalEffects 1.12
-
-TestCaseTemplate {
-
- ImageSource {
- id: imageSource
- source: "images/butterfly.png"
- anchors.centerIn: parent
- }
-
- Glow {
- id: effect
- anchors.fill: imageSource
- color: colorPicker.color
- spread: spreadSlider.value
- radius: radiusSlider.value
- visible: enabledCheckBox.selected
- cached: cachedCheckBox.selected
- source: imageSource
- }
-
- bgColor: bgColorPicker.color
- controls: [
- Control {
- caption: "general"
- Slider {
- id: radiusSlider
- minimum: 0.0
- maximum: 16.0
- value: 8.0
- caption: "radius"
- }
- Slider {
- id: spreadSlider
- caption: "spread"
- minimum: 0.0
- maximum: 1.0
- value: 0.3
- }
- },
-
- Control {
- caption: "color"
- ColorPicker {
- id: colorPicker
- hue: 0
- saturation: 1
- lightness: 1
- }
- },
-
- Control {
- caption: "advanced"
- last: true
- Label {
- caption: "Effect size"
- text: effect.width + "x" + effect.height
- }
- Label {
- caption: "FPS"
- text: fps
- }
- CheckBox {
- id: cachedCheckBox
- caption: "cached"
- }
- CheckBox {
- id: enabledCheckBox
- caption: "enabled"
- }
- CheckBox {
- id: updateCheckBox
- caption: "animated"
- selected: false
- }
- BGColorPicker {
- id: bgColorPicker
- }
- }
- ]
-}
diff --git a/tests/manual/testbed/TestHueSaturation.qml b/tests/manual/testbed/TestHueSaturation.qml
deleted file mode 100644
index 4124767..0000000
--- a/tests/manual/testbed/TestHueSaturation.qml
+++ /dev/null
@@ -1,105 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtGraphicalEffects 1.12
-
-TestCaseTemplate {
- ImageSource {
- id: imageSource
- source: "images/butterfly.png"
- }
-
- HueSaturation {
- id: effect
- anchors.fill: imageSource
- visible: enabledCheckBox.selected
- cached: cachedCheckBox.selected
- hue: hueSlider.value
- saturation: saturationSlider.value
- lightness: lightnessSlider.value
- source: imageSource
- }
-
- bgColor: bgColorPicker.color
- controls: [
- Control {
- caption: "general"
- Slider {
- id: hueSlider
- caption: "hue"
- minimum: -1.0
- maximum: 1.0
- value: 0.0
- }
- Slider {
- id: saturationSlider
- caption: "saturation"
- minimum: -1.0
- maximum: 1.0
- value: 0.0
- }
- Slider {
- id: lightnessSlider
- caption: "lightness"
- minimum: -1.0
- maximum: 1.0
- value: 0.0
- }
- },
-
- Control {
- caption: "advanced"
- last: true
- Label {
- caption: "Effect size"
- text: effect.width + "x" + effect.height
- }
- Label {
- caption: "FPS"
- text: fps
- }
- CheckBox {
- id: cachedCheckBox
- caption: "cached"
- }
- CheckBox {
- id: enabledCheckBox
- caption: "enabled"
- }
- CheckBox {
- id: updateCheckBox
- caption: "animated"
- selected: false
- }
- BGColorPicker {
- id: bgColorPicker
- }
- }
- ]
-}
diff --git a/tests/manual/testbed/TestLevelAdjust.qml b/tests/manual/testbed/TestLevelAdjust.qml
deleted file mode 100644
index 7e1b976..0000000
--- a/tests/manual/testbed/TestLevelAdjust.qml
+++ /dev/null
@@ -1,149 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtGraphicalEffects 1.12
-
-TestCaseTemplate {
- ImageSource {
- id: imageSource
- source: "images/butterfly.png"
- }
-
- LevelAdjust {
- id: effect
- anchors.fill: imageSource
- visible: enabledCheckBox.selected
- cached: cachedCheckBox.selected
- source: imageSource
-
- minimumInput: Qt.rgba(redInput.blackPointValue + valueInput.blackPointValue * (redInput.whitePointValue - redInput.blackPointValue), greenInput.blackPointValue + valueInput.blackPointValue * (greenInput.whitePointValue - greenInput.blackPointValue), blueInput.blackPointValue + valueInput.blackPointValue * (blueInput.whitePointValue - blueInput.blackPointValue), alphaInput.blackPointValue)
- maximumInput: Qt.rgba(redInput.whitePointValue - (1.0 - valueInput.whitePointValue) * (redInput.whitePointValue - redInput.blackPointValue), greenInput.whitePointValue - (1.0 - valueInput.whitePointValue) * (greenInput.whitePointValue - greenInput.blackPointValue), blueInput.whitePointValue - (1.0 - valueInput.whitePointValue) * (blueInput.whitePointValue - blueInput.blackPointValue), alphaInput.whitePointValue)
- minimumOutput: Qt.rgba(redOutput.blackPointValue + valueOutput.blackPointValue * (redOutput.whitePointValue - redOutput.blackPointValue), greenOutput.blackPointValue + valueOutput.blackPointValue * (greenOutput.whitePointValue - greenOutput.blackPointValue), blueOutput.blackPointValue + valueOutput.blackPointValue * (blueOutput.whitePointValue - blueOutput.blackPointValue), alphaOutput.blackPointValue)
- maximumOutput: Qt.rgba(redOutput.whitePointValue - (1.0 - valueOutput.whitePointValue) * (redOutput.whitePointValue - redOutput.blackPointValue), greenOutput.whitePointValue - (1.0 - valueOutput.whitePointValue) * (greenOutput.whitePointValue - greenOutput.blackPointValue), blueOutput.whitePointValue - (1.0 - valueOutput.whitePointValue) * (blueOutput.whitePointValue - blueOutput.blackPointValue), alphaOutput.whitePointValue)
-
- gamma: Qt.vector3d((redInput.gamma * valueInput.gamma), (greenInput.gamma * valueInput.gamma), (blueInput.gamma * valueInput.gamma))
- }
-
- bgColor: bgColorPicker.color
- controls: [
- Control {
- caption: "RGB"
- LevelSlider {
- id: valueInput
- caption: "Input"
- }
- LevelSlider {
- id: valueOutput
- showMidPoint: false
- caption: "Output"
- }
- },
- Control {
- caption: "Red"
- __hide: true
- LevelSlider {
- id: redInput
- caption: "Input"
- }
- LevelSlider {
- id: redOutput
- showMidPoint: false
- caption: "Output"
- }
- },
- Control {
- caption: "Green"
- __hide: true
- LevelSlider {
- id: greenInput
- caption: "Input"
- }
- LevelSlider {
- id: greenOutput
- showMidPoint: false
- caption: "Output"
- }
- },
- Control {
- caption: "Blue"
- __hide: true
- LevelSlider {
- id: blueInput
- caption: "Input"
- }
- LevelSlider {
- id: blueOutput
- showMidPoint: false
- caption: "Output"
- }
- },
- Control {
- caption: "Alpha"
- __hide: true
- LevelSlider {
- id: alphaInput
- showMidPoint: false
- caption: "Input"
- }
- LevelSlider {
- id: alphaOutput
- showMidPoint: false
- caption: "Output"
- }
- },
- Control {
- caption: "advanced"
- last: true
- Label {
- caption: "Effect size"
- text: effect.width + "x" + effect.height
- }
- Label {
- caption: "FPS"
- text: fps
- }
- CheckBox {
- id: cachedCheckBox
- caption: "cached"
- }
- CheckBox {
- id: enabledCheckBox
- caption: "enabled"
- }
- CheckBox {
- id: updateCheckBox
- caption: "animated"
- selected: false
- }
- BGColorPicker {
- id: bgColorPicker
- }
- }
- ]
-}
diff --git a/tests/manual/testbed/TestLinearGradient.qml b/tests/manual/testbed/TestLinearGradient.qml
deleted file mode 100644
index 500dd5a..0000000
--- a/tests/manual/testbed/TestLinearGradient.qml
+++ /dev/null
@@ -1,144 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtGraphicalEffects 1.12
-
-TestCaseTemplate {
- ImageSource {
- id: maskImage
- source: "images/butterfly.png"
- }
-
- LinearGradient {
- id: effect
- anchors.fill: parent
- cached: cachedCheckBox.selected
- visible: enabledCheckBox.selected
- source: maskCheckBox.selected ? maskImage : undefined
- start: Qt.point(startPicker.xValue * width, startPicker.yValue * height)
- end: Qt.point(endPicker.xValue * width, endPicker.yValue * height)
- gradient: Gradient {
- GradientStop {
- position: 0.0
- color: gradientBeginColorSlider.color
- }
- GradientStop {
- position: 1.0
- color: gradientEndColorSlider.color
- }
- }
- }
-
- PositionPicker {
- id: startPicker
- xValue: 0.2
- yValue: 0.2
- }
- PositionPicker {
- id: endPicker
- xValue: 0.8
- yValue: 0.8
- }
-
- bgColor: bgColorPicker.color
- controls: [
- Control {
- caption: "general"
- Label {
- caption: "startX"
- text: startPicker.xValue.toFixed(1)
- }
- Label {
- caption: "startY"
- text: startPicker.yValue.toFixed(1)
- }
- Label {
- caption: "endX"
- text: endPicker.xValue.toFixed(1)
- }
- Label {
- caption: "endY"
- text: endPicker.yValue.toFixed(1)
- }
- CheckBox {
- id: maskCheckBox
- caption: "Use Mask"
- }
- },
-
- Control {
- caption: "gradient begin color"
- ColorPicker {
- id: gradientBeginColorSlider
- hue: 0.67
- saturation: 1.0
- lightness: 0.5
- }
- },
-
- Control {
- caption: "gradient end color"
- ColorPicker {
- id: gradientEndColorSlider
- hue: 0.5
- saturation: 1.0
- lightness: 0.5
- }
- },
-
- Control {
- caption: "advanced"
- last: true
- Label {
- caption: "Effect size"
- text: effect.width + "x" + effect.height
- }
- Label {
- caption: "FPS"
- text: fps
- }
- CheckBox {
- id: cachedCheckBox
- caption: "cached"
- }
- CheckBox {
- id: enabledCheckBox
- caption: "enabled"
- }
- CheckBox {
- id: updateCheckBox
- caption: "animated"
- selected: false
- }
- BGColorPicker {
- id: bgColorPicker
- }
- }
- ]
-}
diff --git a/tests/manual/testbed/TestOpacityMask.qml b/tests/manual/testbed/TestOpacityMask.qml
deleted file mode 100644
index 12b1b0c..0000000
--- a/tests/manual/testbed/TestOpacityMask.qml
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtGraphicalEffects 1.12
-
-TestCaseTemplate {
- ImageSource {
- id: imageSource
- source: "images/bug.jpg"
- forcedUpdateAnimationRunning: false
- }
- ImageSource {
- id: maskSource
- source: "images/butterfly.png"
- }
-
- OpacityMask {
- id: effect
- anchors.fill: imageSource
- visible: enabledCheckBox.selected
- cached: cachedCheckBox.selected
- source: imageSource
- maskSource: maskSource
- }
-
- bgColor: bgColorPicker.color
- controls: [
- Control {
- caption: "advanced"
- last: true
- Label {
- caption: "Effect size"
- text: effect.width + "x" + effect.height
- }
- Label {
- caption: "FPS"
- text: fps
- }
- CheckBox {
- id: cachedCheckBox
- caption: "cached"
- }
- CheckBox {
- id: enabledCheckBox
- caption: "enabled"
- }
- CheckBox {
- id: updateCheckBox
- caption: "animated"
- selected: false
- }
- BGColorPicker {
- id: bgColorPicker
- }
- }
- ]
-}
diff --git a/tests/manual/testbed/TestRadialGradient.qml b/tests/manual/testbed/TestRadialGradient.qml
deleted file mode 100644
index af17b5f..0000000
--- a/tests/manual/testbed/TestRadialGradient.qml
+++ /dev/null
@@ -1,149 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtGraphicalEffects 1.12
-
-TestCaseTemplate {
- ImageSource {
- id: maskImage
- source: "images/butterfly.png"
- }
-
- RadialGradient {
- id: effect
- anchors.fill: parent
- cached: cachedCheckBox.selected
- visible: enabledCheckBox.selected
- source: maskCheckBox.selected ? maskImage : undefined
- horizontalOffset: (offsetPicker.xValue - 0.5) * width
- verticalOffset: (offsetPicker.yValue - 0.5) * height
- horizontalRadius: horizontalRadiusSlider.value
- verticalRadius: verticalRadiusSlider.value
- angle: angleSlider.value
- gradient: Gradient {
- GradientStop {position: 0.0; color: gradientBeginColorSlider.color}
- GradientStop {position: 1.0; color: gradientEndColorSlider.color}
- }
- }
-
- PositionPicker {
- id: offsetPicker
- xValue: 0.5
- yValue: 0.5
- }
-
- bgColor: bgColorPicker.color
- controls: [
- Control {
- caption: "general"
- Label {
- caption: "horizontalOffset"
- text: effect.horizontalOffset.toFixed(1)
- }
- Label {
- caption: "verticalOffset"
- text: effect.verticalOffset.toFixed(1)
- }
- Slider {
- id: horizontalRadiusSlider
- minimum: 0
- maximum: effect.width
- value: effect.width / 2
- caption: "horizontalRadius"
- }
- Slider {
- id: verticalRadiusSlider
- minimum: 0
- maximum: effect.height
- value: effect.height / 2
- caption: "verticalRadius"
- }
- Slider {
- id: angleSlider
- minimum: 0
- maximum: 360
- value: 0
- caption: "angle"
- }
- CheckBox {
- id: maskCheckBox
- caption: "Use Mask"
- }
- },
-
- Control {
- caption: "gradient begin color"
- ColorPicker {
- id: gradientBeginColorSlider
- hue: 0.67
- saturation: 1.0
- lightness: 0.5
- }
- },
-
- Control {
- caption: "gradient end color"
- ColorPicker {
- id: gradientEndColorSlider
- hue: 0.5
- saturation: 1.0
- lightness: 0.5
- }
- },
-
- Control {
- caption: "advanced"
- last: true
- Label {
- caption: "Effect size"
- text: effect.width + "x" + effect.height
- }
- Label {
- caption: "FPS"
- text: fps
- }
- CheckBox {
- id: cachedCheckBox
- caption: "cached"
- }
- CheckBox {
- id: enabledCheckBox
- caption: "enabled"
- }
- CheckBox {
- id: updateCheckBox
- caption: "animated"
- selected: false
- }
- BGColorPicker {
- id: bgColorPicker
- }
- }
- ]
-}
diff --git a/tests/manual/testbed/TestRectangularGlow.qml b/tests/manual/testbed/TestRectangularGlow.qml
deleted file mode 100644
index fd5a3a0..0000000
--- a/tests/manual/testbed/TestRectangularGlow.qml
+++ /dev/null
@@ -1,126 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtGraphicalEffects 1.12
-
-TestCaseTemplate {
-
- RectangularGlow {
- id: effect
- anchors.fill: rectSource
- color: colorPicker.color
- spread: spreadSlider.value
- glowRadius: sizeSlider.value
- visible: enabledCheckBox.selected
- opacity: opacitySlider.value
- cornerRadius: radiusSlider.value
- cached: cachedCheckBox.selected
- }
-
- Rectangle {
- id: rectSource
- visible: true
- anchors.centerIn: parent
- width: Math.round(parent.width / 1.5)
- height: Math.round(parent.height / 2)
- radius: 25
- color: "black"
- smooth: true
- }
-
- bgColor: bgColorPicker.color
- controls: [
- Control {
- caption: "general"
- Slider {
- id: spreadSlider
- caption: "spread"
- minimum: 0.0
- maximum: 1.0
- value: 0.5
- }
- Slider {
- id: sizeSlider
- minimum: 0
- maximum: rectSource.width / 2.0
- value: 10.0
- caption: "glowRadius"
- onValueChanged: radiusSlider.value = Math.max(0, Math.min(radiusSlider.value, radiusSlider.maximum))
- }
- Slider {
- id: radiusSlider
- minimum: 0
- maximum: Math.min(effect.width, effect.height) / 2 + effect.glowRadius;
- caption: "cornerRadius"
- value: rectSource.radius + effect.glowRadius
- }
- Slider {
- id: opacitySlider
- minimum: 0
- maximum: 1.0
- value: 1.0
- caption: "opacity"
- }
- },
-
- Control {
- caption: "color"
- ColorPicker {
- id: colorPicker
- hue: 0
- saturation: 1
- lightness: 1
- }
- },
-
- Control {
- caption: "advanced"
- last: true
- Label {
- caption: "Effect size"
- text: effect.width + "x" + effect.height
- }
- Label {
- caption: "FPS"
- text: fps
- }
- CheckBox {
- id: cachedCheckBox
- caption: "cached"
- }
- CheckBox {
- id: enabledCheckBox
- caption: "enabled"
- }
- BGColorPicker {
- id: bgColorPicker
- }
- }
- ]
-}
diff --git a/tests/manual/testbed/TestThresholdMask.qml b/tests/manual/testbed/TestThresholdMask.qml
deleted file mode 100644
index 97bead2..0000000
--- a/tests/manual/testbed/TestThresholdMask.qml
+++ /dev/null
@@ -1,102 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtGraphicalEffects 1.12
-
-TestCaseTemplate {
- ImageSource {
- id: imageSource
- source: "images/bug.jpg"
- }
- ImageSource {
- id: maskSource
- source: "images/fog.png"
- }
-
- ThresholdMask {
- id: effect
- anchors.fill: imageSource
- visible: enabledCheckBox.selected
- cached: cachedCheckBox.selected
- source: imageSource
- maskSource: maskSource
- threshold: thresholdSlider.value
- spread: fringeSlider.value
- }
-
- bgColor: bgColorPicker.color
- controls: [
- Control {
- caption: "general"
- Slider {
- id: thresholdSlider
- minimum: 0.0
- maximum: 1.0
- value: 0.4
- caption: "threshold"
- }
- Slider {
- id: fringeSlider
- minimum: 0.0
- maximum: 1.0
- value: 0.2
- caption: "spread"
- }
- },
-
- Control {
- caption: "advanced"
- last: true
- Label {
- caption: "Effect size"
- text: effect.width + "x" + effect.height
- }
- Label {
- caption: "FPS"
- text: fps
- }
- CheckBox {
- id: cachedCheckBox
- caption: "cached"
- }
- CheckBox {
- id: enabledCheckBox
- caption: "enabled"
- }
- CheckBox {
- id: updateCheckBox
- caption: "animated"
- selected: false
- }
- BGColorPicker {
- id: bgColorPicker
- }
- }
- ]
-}
diff --git a/tests/manual/testbed/images/background.png b/tests/manual/testbed/images/background.png
deleted file mode 100644
index 72cb9f0..0000000
--- a/tests/manual/testbed/images/background.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/bug.jpg b/tests/manual/testbed/images/bug.jpg
deleted file mode 100644
index 43e3676..0000000
--- a/tests/manual/testbed/images/bug.jpg
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/butterfly.png b/tests/manual/testbed/images/butterfly.png
deleted file mode 100644
index ce544f2..0000000
--- a/tests/manual/testbed/images/butterfly.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/checkbox_inner.png b/tests/manual/testbed/images/checkbox_inner.png
deleted file mode 100644
index 52dce9c..0000000
--- a/tests/manual/testbed/images/checkbox_inner.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/checkbox_outer.png b/tests/manual/testbed/images/checkbox_outer.png
deleted file mode 100644
index 6efa85f..0000000
--- a/tests/manual/testbed/images/checkbox_outer.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/checker.png b/tests/manual/testbed/images/checker.png
deleted file mode 100644
index b7f067b..0000000
--- a/tests/manual/testbed/images/checker.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/collapse.png b/tests/manual/testbed/images/collapse.png
deleted file mode 100644
index 1b1259e..0000000
--- a/tests/manual/testbed/images/collapse.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/color_selection_hl.png b/tests/manual/testbed/images/color_selection_hl.png
deleted file mode 100644
index eeb9181..0000000
--- a/tests/manual/testbed/images/color_selection_hl.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/color_selection_mask.png b/tests/manual/testbed/images/color_selection_mask.png
deleted file mode 100644
index 9a7e8f8..0000000
--- a/tests/manual/testbed/images/color_selection_mask.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/expand.png b/tests/manual/testbed/images/expand.png
deleted file mode 100644
index 49f9c15..0000000
--- a/tests/manual/testbed/images/expand.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/fog.png b/tests/manual/testbed/images/fog.png
deleted file mode 100644
index 1a51c01..0000000
--- a/tests/manual/testbed/images/fog.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/glass_normal.png b/tests/manual/testbed/images/glass_normal.png
deleted file mode 100644
index ba360ef..0000000
--- a/tests/manual/testbed/images/glass_normal.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/group_bottom.png b/tests/manual/testbed/images/group_bottom.png
deleted file mode 100644
index 08961d0..0000000
--- a/tests/manual/testbed/images/group_bottom.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/group_top.png b/tests/manual/testbed/images/group_top.png
deleted file mode 100644
index 210a57f..0000000
--- a/tests/manual/testbed/images/group_top.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/icon_blend.png b/tests/manual/testbed/images/icon_blend.png
deleted file mode 100644
index 4112515..0000000
--- a/tests/manual/testbed/images/icon_blend.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/icon_blur.png b/tests/manual/testbed/images/icon_blur.png
deleted file mode 100644
index f0c6f5e..0000000
--- a/tests/manual/testbed/images/icon_blur.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/icon_color.png b/tests/manual/testbed/images/icon_color.png
deleted file mode 100644
index 649cf75..0000000
--- a/tests/manual/testbed/images/icon_color.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/icon_distortion.png b/tests/manual/testbed/images/icon_distortion.png
deleted file mode 100644
index 11bbece..0000000
--- a/tests/manual/testbed/images/icon_distortion.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/icon_drop_shadow.png b/tests/manual/testbed/images/icon_drop_shadow.png
deleted file mode 100644
index 77b2f88..0000000
--- a/tests/manual/testbed/images/icon_drop_shadow.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/icon_glow.png b/tests/manual/testbed/images/icon_glow.png
deleted file mode 100644
index 019b4b5..0000000
--- a/tests/manual/testbed/images/icon_glow.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/icon_gradient.png b/tests/manual/testbed/images/icon_gradient.png
deleted file mode 100644
index 0d836b3..0000000
--- a/tests/manual/testbed/images/icon_gradient.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/icon_mask.png b/tests/manual/testbed/images/icon_mask.png
deleted file mode 100644
index ceca052..0000000
--- a/tests/manual/testbed/images/icon_mask.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/icon_motion_blur.png b/tests/manual/testbed/images/icon_motion_blur.png
deleted file mode 100644
index 89ceb66..0000000
--- a/tests/manual/testbed/images/icon_motion_blur.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/radiobutton_inner.png b/tests/manual/testbed/images/radiobutton_inner.png
deleted file mode 100644
index e77ccc4..0000000
--- a/tests/manual/testbed/images/radiobutton_inner.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/radiobutton_outer.png b/tests/manual/testbed/images/radiobutton_outer.png
deleted file mode 100644
index 6568c65..0000000
--- a/tests/manual/testbed/images/radiobutton_outer.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/slider_handle.png b/tests/manual/testbed/images/slider_handle.png
deleted file mode 100644
index 633bbe9..0000000
--- a/tests/manual/testbed/images/slider_handle.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/slider_handle_b.png b/tests/manual/testbed/images/slider_handle_b.png
deleted file mode 100644
index 4c2dd3c..0000000
--- a/tests/manual/testbed/images/slider_handle_b.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/slider_handle_black.png b/tests/manual/testbed/images/slider_handle_black.png
deleted file mode 100644
index 43bbeb8..0000000
--- a/tests/manual/testbed/images/slider_handle_black.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/slider_handle_g.png b/tests/manual/testbed/images/slider_handle_g.png
deleted file mode 100644
index 86decaf..0000000
--- a/tests/manual/testbed/images/slider_handle_g.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/slider_handle_gray.png b/tests/manual/testbed/images/slider_handle_gray.png
deleted file mode 100644
index 1b07aad..0000000
--- a/tests/manual/testbed/images/slider_handle_gray.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/slider_handle_pressed.png b/tests/manual/testbed/images/slider_handle_pressed.png
deleted file mode 100644
index 10e5ed9..0000000
--- a/tests/manual/testbed/images/slider_handle_pressed.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/slider_handle_r.png b/tests/manual/testbed/images/slider_handle_r.png
deleted file mode 100644
index 1bc1614..0000000
--- a/tests/manual/testbed/images/slider_handle_r.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/slider_handle_white.png b/tests/manual/testbed/images/slider_handle_white.png
deleted file mode 100644
index 4f4f551..0000000
--- a/tests/manual/testbed/images/slider_handle_white.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/slider_track.png b/tests/manual/testbed/images/slider_track.png
deleted file mode 100644
index 3ab0d21..0000000
--- a/tests/manual/testbed/images/slider_track.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/slider_track_filled.png b/tests/manual/testbed/images/slider_track_filled.png
deleted file mode 100644
index 045e6c8..0000000
--- a/tests/manual/testbed/images/slider_track_filled.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/slider_track_left.png b/tests/manual/testbed/images/slider_track_left.png
deleted file mode 100644
index b1cc989..0000000
--- a/tests/manual/testbed/images/slider_track_left.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/slider_track_right.png b/tests/manual/testbed/images/slider_track_right.png
deleted file mode 100644
index 2936c7c..0000000
--- a/tests/manual/testbed/images/slider_track_right.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/title.png b/tests/manual/testbed/images/title.png
deleted file mode 100644
index e3110a2..0000000
--- a/tests/manual/testbed/images/title.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/workarea_left.png b/tests/manual/testbed/images/workarea_left.png
deleted file mode 100644
index 3b8bb71..0000000
--- a/tests/manual/testbed/images/workarea_left.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/images/workarea_right.png b/tests/manual/testbed/images/workarea_right.png
deleted file mode 100644
index 2d82242..0000000
--- a/tests/manual/testbed/images/workarea_right.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/testbed/testBed.qml b/tests/manual/testbed/testBed.qml
deleted file mode 100644
index b74bd1a..0000000
--- a/tests/manual/testbed/testBed.qml
+++ /dev/null
@@ -1,156 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-
-Rectangle {
- id: main
-
- width: 950
- height: 800
- color: '#171717'
-
- ListView {
- id: testCaseList
- width: 160
- anchors.top: titlebar.bottom
- anchors.left: parent.left
- anchors.bottom: parent.bottom
-
- model: TestBedModel {}
- delegate: delegateItem
-
- section.property: "group"
- section.criteria: ViewSection.FullString
- section.delegate: sectionHeading
-
- }
-
- Image {
- id: titlebar
- source: "images/title.png"
- anchors.top: parent.top
- anchors.left: parent.left
- width: 160
-
- Text {
- id: effectsListTitle
- anchors.fill: parent
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- text: "Effects"
- color: "white"
- font.family: "Arial"
- font.bold: true
- font.pixelSize: 12
- }
- }
-
- Loader {
- id: testLoader
- anchors {left: testCaseList.right; right: parent.right; top: parent.top; bottom: parent.bottom}
- }
-
- Image {
- anchors {right: testLoader.right; rightMargin: 300; top: parent.top; bottom: parent.bottom}
- source: "images/workarea_right.png"
- }
-
- Image {
- anchors {left: testLoader.left; top: parent.top; bottom: parent.bottom}
- source: "images/workarea_left.png"
- }
-
-
- Component {
- id: sectionHeading
- Item {
- width: parent.width
- height: 23
- Image {
- source: "images/group_top.png"
- width: parent.width
- }
- Image {
- id: icon
- source: "images/icon_" + section.replace(/ /g, "_").toLowerCase() + ".png"
- anchors {top: parent.top; topMargin: 6; left: parent.left; leftMargin: 6}
- }
- Text {
- id: sectionText
- text: section
- anchors {fill: parent; leftMargin: 25; topMargin: 3}
- color: "white"
- verticalAlignment: Text.AlignVCenter
- font.family: "Arial"
- font.bold: true
- font.pixelSize: 12
- }
- }
- }
-
- Component {
- id: delegateItem
- Item {
- width: ListView.view.width
- height: last ? 27 : 20
-
- Image {
- source: "images/group_bottom.png"
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- anchors.right: parent.right
- smooth: true
- visible: last && index != 20 ? 1 : 0
- }
-
- Rectangle {
- width: parent.width
- color: "#323232"
- height: 20
- visible: (testLoader.source.toString().search(name) != -1)
- }
- Text {
- id: delegateText;
- anchors {fill: parent; leftMargin: 25; topMargin: 3}
- text: name.slice(4, name.indexOf("."))
- font.family: "Arial"
- font.pixelSize: 12
- color: delegateMouseArea.pressed ? "white" : "#CCCCCC"
- }
- MouseArea {
- id: delegateMouseArea
- anchors.fill: parent;
- onClicked: {
- testLoader.source = name;
- testLoader.item.currentTest = delegateText.text;
- }
- }
- }
- }
-}
diff --git a/tests/manual/testbed/testbed.qmlproject b/tests/manual/testbed/testbed.qmlproject
deleted file mode 100644
index d4909f8..0000000
--- a/tests/manual/testbed/testbed.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.0
-
-Project {
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
- /* List of plugin directories passed to QML runtime */
- // importPaths: [ " ../exampleplugin " ]
-}
diff --git a/tests/system/auto/auto.pro b/tests/system/auto/auto.pro
deleted file mode 100644
index 8554607..0000000
--- a/tests/system/auto/auto.pro
+++ /dev/null
@@ -1,16 +0,0 @@
-QT += testlib
-
-TARGET = tst_imagecompare
-CONFIG += console
-CONFIG -= app_bundle
-TEMPLATE = app
-
-SOURCES += tst_imagecompare.cpp \
- imagecompare.cpp \
- main.cpp
-
-DEFINES += SRCDIR=\\\"$$PWD/\\\"
-
-HEADERS += \
- imagecompare.h \
- tst_imagecompare.h
diff --git a/tests/system/auto/imagecompare.cpp b/tests/system/auto/imagecompare.cpp
deleted file mode 100644
index a290d4b..0000000
--- a/tests/system/auto/imagecompare.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "imagecompare.h"
-
-ImageCompare::ImageCompare(QObject *parent) : QObject(parent){
-}
-
-bool ImageCompare::ComparePixels(QImage actual, QImage expected, int tolerance, QString filename){
-
- bool result = true;
- bool compareAlpha, compareRed, compareGreen, compareBlue;
- int diffPixelCount = 0;
- QImage diffImage(300, 300, QImage::Format_ARGB32);
- diffImage.fill(Qt::white);
-
- for(int y = 0; y < 300; y++){
- for(int x = 0; x < 300; x++){
-
- // Pixel difference is set initially to false.
- bool diff = false;
-
- // Gets the color of the pixel in the given position.
- QRgb pixelActual = actual.pixel(x,y);
- QRgb pixelExpected = expected.pixel(x,y);
-
- // Compares separately the alpha, red, green and blue components of an ARGB value within the specified tolerance.
- compareAlpha = (abs(qAlpha(pixelActual) - qAlpha(pixelExpected)) <= tolerance);
- compareRed = (abs(qRed(pixelActual) - qRed(pixelExpected)) <= tolerance);
- compareGreen = (abs(qGreen(pixelActual) - qGreen(pixelExpected)) <= tolerance);
- compareBlue = (abs(qBlue(pixelActual) - qBlue(pixelExpected)) <= tolerance);
-
- // Result value holds the overall boolean status are the compared images the same or different.
- result &= (compareAlpha && compareRed && compareGreen && compareBlue);
-
- // When the compared pixels differ, diff value is set to true and the pixel position is marked to an additional image file.
- diff = !(compareAlpha && compareRed && compareGreen && compareBlue);
- if (diff == true){
- diffImage.setPixel(x, y, qRgba(255, 0, 0, 255));
- ++diffPixelCount;
- }
- }
- }
-
- if(result == false){
- qDebug() << "The percentage difference in" << filename << ":" << diffPixelCount << "/" << 300*300 << "=" << 100.0*diffPixelCount/(300*300);
- QDir wd = QDir().dirName();
- wd.mkdir("diffImages");
- diffImage.save("diffImages/" + filename);
- }
-
- return result;
-}
-
-bool ImageCompare::CompareSizes(QImage actual, QImage expected){
- bool sizesMatch = true;
- if (actual.width() == expected.width() && actual.height() == expected.height()){
- sizesMatch = true;
- }
- else sizesMatch = false;
-
- return sizesMatch;
-}
diff --git a/tests/system/auto/imagecompare.h b/tests/system/auto/imagecompare.h
deleted file mode 100644
index 6c8f693..0000000
--- a/tests/system/auto/imagecompare.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef IMAGECOMPARE_H
-#define IMAGECOMPARE_H
-
-#include <QObject>
-#include <QtCore/QCoreApplication>
-#include <QtCore/QDir>
-#include <QtGui/QImage>
-#include <math.h>
-#include <QDebug>
-
-class ImageCompare : public QObject
-{
- Q_OBJECT
-
-public:
- explicit ImageCompare(QObject *parent = 0);
- bool ComparePixels(QImage actual, QImage expected, int tolerance = 0, QString filename = "difference.png");
- bool CompareSizes(QImage actual, QImage expected);
-
-signals:
-
-public slots:
-
-};
-
-#endif // IMAGECOMPARE_H
diff --git a/tests/system/auto/main.cpp b/tests/system/auto/main.cpp
deleted file mode 100644
index 731e1ff..0000000
--- a/tests/system/auto/main.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtCore/QCoreApplication>
-#include "tst_imagecompare.h"
-
-int main(int argc, char *argv[]){
-
- QCoreApplication a(argc, argv);
-
- tst_imagecompare test;
-
- // Tolerance for pixel ARGB component comparison can be set using command line argument -t with tolerance integer value
- // E.g. [program name] -t [tolerance]
- int tolerance = 0;
- for(int i = 0; i < argc; i++){
- if (strcmp(argv[i], "-t") == 0){
- tolerance = atoi(argv[i+1]);
-
- // Tolerance arguments are removed from the argument list so the list can be sent to QTestLib
- for(i; i < argc; i++){
- argv[i] = argv[i+2];
- }
- argc -= 2;
- break;
- }
- }
- test.setDiffTolerance(tolerance);
-
- // To be enabled/uncommented if test result output is needed in XML format
- //QStringList arguments;
- //arguments << " " << "-o" << "results.xml" << "-xml";
- //QTest::qExec(&test, arguments);
-
- QTest::qExec(&test, argc, argv);
-
- return 0;
-}
diff --git a/tests/system/auto/tst_imagecompare.cpp b/tests/system/auto/tst_imagecompare.cpp
deleted file mode 100644
index fdaeab2..0000000
--- a/tests/system/auto/tst_imagecompare.cpp
+++ /dev/null
@@ -1,2121 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtCore/QString>
-#include <QtCore/QDir>
-#include <QtCore/QProcess>
-#include <QStringList>
-#include <QtGui/QImage>
-#include <QDebug>
-#include "imagecompare.h"
-#include "tst_imagecompare.h"
-
-QDir expectedDir("../images");
-QDir actualDir("./output");
-int diffTolerance = 0;
-
-void tst_imagecompare::setDiffTolerance(int tolerance){
- diffTolerance = tolerance;
-}
-
-void tst_imagecompare::initTestCase(){
- QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
- QString qtDir = env.value("QTDIR");
- QStringList dumperpath;
- dumperpath << "../../../tools/pngdumper/pngdumper.qml";
-
- // Verifies that QTDIR environment variable is set
- QCOMPARE(qtDir == "", false);
-
- // Verifies does the expected images folder exist
- QCOMPARE(expectedDir.exists(), true);
-
- QProcess *myProcess = new QProcess();
- myProcess->start(qtDir + "/bin/qmlscene", dumperpath);
- myProcess->waitForFinished(300000);
-
- // Verifies does the output folder exist
- QCOMPARE(actualDir.exists(), true);
-
- // Verifies that the output folder includes dumped png images
- QStringList filters;
- filters << "*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
- QCOMPARE(list.size() == 0, false);
-}
-
-void tst_imagecompare::blend_varMode(){
- QStringList filters;
- filters << "Blend_mode*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-
-void tst_imagecompare::brightnessContrast_varBrightness(){
- QStringList filters;
- filters << "BrightnessContrast_brightness*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::brightnessContrast_varContrast(){
- QStringList filters;
- filters << "BrightnessContrast_contrast*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-
-void tst_imagecompare::colorize_varHue(){
- QStringList filters;
- filters << "Colorize_hue*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::colorize_varSaturation(){
- QStringList filters;
- filters << "Colorize_saturation*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::colorize_varLightness(){
- QStringList filters;
- filters << "Colorize_lightness*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-
-void tst_imagecompare::colorOverlay_varColor(){
- QStringList filters;
- filters << "ColorOverlay_color*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-
-void tst_imagecompare::conicalGradient_varAngle(){
- QStringList filters;
- filters << "ConicalGradient_angle*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::conicalGradient_varHorizontalOffset(){
- QStringList filters;
- filters << "ConicalGradient_horizontalOffset*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::conicalGradient_varVerticalOffset(){
- QStringList filters;
- filters << "ConicalGradient_verticalOffset*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::conicalGradient_varGradient(){
- QStringList filters;
- filters << "ConicalGradient_gradient*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::conicalGradient_varMaskSource(){
- QStringList filters;
- filters << "ConicalGradient_maskSource*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-
-void tst_imagecompare::desaturate_varDesaturation(){
- QStringList filters;
- filters << "Desaturate_desaturation*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-
-void tst_imagecompare::displace_varDisplacement(){
- QStringList filters;
- filters << "Displace_displacement*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-
-void tst_imagecompare::dropShadow_varRadius(){
- QStringList filters;
- filters << "DropShadow_radius*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::dropShadow_varColor(){
- QStringList filters;
- filters << "DropShadow_color*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::dropShadow_varHorizontalOffset(){
- QStringList filters;
- filters << "DropShadow_horizontalOffset*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::dropShadow_varVerticalOffset(){
- QStringList filters;
- filters << "DropShadow_verticalOffset*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::dropShadow_varSpread(){
- QStringList filters;
- filters << "DropShadow_spread*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::dropShadow_varFast(){
- QStringList filters;
- filters << "DropShadow_fast*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-
-void tst_imagecompare::glow_varRadius(){
- QStringList filters;
- filters << "Glow_radius*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::glow_varColor(){
- QStringList filters;
- filters << "Glow_color*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::glow_varSpread(){
- QStringList filters;
- filters << "Glow_spread*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::glow_varFast(){
- QStringList filters;
- filters << "Glow_fast*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-
-void tst_imagecompare::fastBlur_varBlur(){
- QStringList filters;
- filters << "FastBlur_blur*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::fastBlur_varTransparentBorder(){
- QStringList filters;
- filters << "FastBlur_transparentBorder*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-
-void tst_imagecompare::gammaAdjust_varGamma(){
- QStringList filters;
- filters << "GammaAdjust_gamma*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-
-void tst_imagecompare::gaussianBlur_varRadius(){
- QStringList filters;
- filters << "GaussianBlur_radius*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::gaussianBlur_varDeviation(){
- QStringList filters;
- filters << "GaussianBlur_deviation*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::gaussianBlur_varTransparentBorder(){
- QStringList filters;
- filters << "GaussianBlur_transparentBorder*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-
-void tst_imagecompare::hueSaturation_varHue(){
- QStringList filters;
- filters << "HueSaturation_hue*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::hueSaturation_varSaturation(){
- QStringList filters;
- filters << "HueSaturation_saturation*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::hueSaturation_varLightness(){
- QStringList filters;
- filters << "HueSaturation_lightness*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-
-void tst_imagecompare::innerShadow_varRadius(){
- QStringList filters;
- filters << "InnerShadow_radius*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::innerShadow_varHorizontalOffset(){
- QStringList filters;
- filters << "InnerShadow_horizontalOffset*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::innerShadow_varVerticalOffset(){
- QStringList filters;
- filters << "InnerShadow_verticalOffset*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::innerShadow_varSpread(){
- QStringList filters;
- filters << "InnerShadow_spread*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::innerShadow_varFast(){
- QStringList filters;
- filters << "InnerShadow_fast*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::innerShadow_varColor(){
- QStringList filters;
- filters << "InnerShadow_color*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-
-void tst_imagecompare::linearGradient_varGradient(){
- QStringList filters;
- filters << "LinearGradient_gradient*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::linearGradient_varStart(){
- QStringList filters;
- filters << "LinearGradient_start*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::linearGradient_varEnd(){
- QStringList filters;
- filters << "LinearGradient_end*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::linearGradient_varMaskSource(){
- QStringList filters;
- filters << "LinearGradient_maskSource*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-
-void tst_imagecompare::opacityMask_varMaskSource(){
- QStringList filters;
- filters << "OpacityMask_maskSource*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-
-void tst_imagecompare::radialGradient_varHorizontalOffset(){
- QStringList filters;
- filters << "RadialGradient_horizontalOffset*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::radialGradient_varVerticalOffset(){
- QStringList filters;
- filters << "RadialGradient_verticalOffset*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::radialGradient_varHorizontalRadius(){
- QStringList filters;
- filters << "RadialGradient_horizontalRadius*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::radialGradient_varVerticalRadius(){
- QStringList filters;
- filters << "RadialGradient_verticalRadius*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::radialGradient_varGradient(){
- QStringList filters;
- filters << "RadialGradient_gradient*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::radialGradient_varAngle(){
- QStringList filters;
- filters << "RadialGradient_angle*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::radialGradient_varMaskSource(){
- QStringList filters;
- filters << "RadialGradient_maskSource*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-
-void tst_imagecompare::rectangularGlow_varGlowRadius(){
- QStringList filters;
- filters << "RectangularGlow_glowRadius*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::rectangularGlow_varSpread(){
- QStringList filters;
- filters << "RectangularGlow_spread*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::rectangularGlow_varColor(){
- QStringList filters;
- filters << "RectangularGlow_color*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::rectangularGlow_varCornerRadius(){
- QStringList filters;
- filters << "RectangularGlow_cornerRadius*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-
-void tst_imagecompare::recursiveBlur_varLoops(){
- QStringList filters;
- filters << "RecursiveBlur_loops*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::recursiveBlur_varRadius(){
- QStringList filters;
- filters << "RecursiveBlur_radius*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::recursiveBlur_varTransparentBorder(){
- QStringList filters;
- filters << "RecursiveBlur_transparentBorder*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-
-void tst_imagecompare::thresholdMask_varSpread(){
- QStringList filters;
- filters << "ThresholdMask_spread*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::thresholdMask_varThreshold(){
- QStringList filters;
- filters << "ThresholdMask_threshold*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-
-void tst_imagecompare::radialBlur_varAngle(){
- QStringList filters;
- filters << "RadialBlur_angle*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::radialBlur_varHorizontalOffset(){
- QStringList filters;
- filters << "RadialBlur_horizontalOffset*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::radialBlur_varVerticalOffset(){
- QStringList filters;
- filters << "RadialBlur_verticalOffset*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-
-void tst_imagecompare::directionalBlur_varAngle(){
- QStringList filters;
- filters << "DirectionalBlur_angle*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::directionalBlur_varLength(){
- QStringList filters;
- filters << "DirectionalBlur_length*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-
-void tst_imagecompare::zoomBlur_varHorizontalOffset(){
- QStringList filters;
- filters << "ZoomBlur_horizontalOffset*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::zoomBlur_varVerticalOffset(){
- QStringList filters;
- filters << "ZoomBlur_verticalOffset*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::zoomBlur_varLength(){
- QStringList filters;
- filters << "ZoomBlur_length*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-
-void tst_imagecompare::levelAdjust_varMinimumInput(){
- QStringList filters;
- filters << "LevelAdjust_minimumInput*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::levelAdjust_varMaximumInput(){
- QStringList filters;
- filters << "LevelAdjust_maximumInput*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::levelAdjust_varMinimumOutput(){
- QStringList filters;
- filters << "LevelAdjust_minimumOutput*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::levelAdjust_varMaximumOutput(){
- QStringList filters;
- filters << "LevelAdjust_maximumOutput*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-
-void tst_imagecompare::maskedBlur_varRadius(){
- QStringList filters;
- filters << "MaskedBlur_radius*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::maskedBlur_varFast(){
- QStringList filters;
- filters << "MaskedBlur_fast*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
-void tst_imagecompare::maskedBlur_varTransparentBorder(){
- QStringList filters;
- filters << "MaskedBlur_transparentBorder*.png";
- actualDir.setNameFilters(filters);
- QStringList list = actualDir.entryList();
-
- for (int i = 0; i < list.size(); ++i){
- QString filename = list.at(i).toLocal8Bit().constData();
- qDebug() << "Testing shader image " + filename;
- QString actualFile = actualDir.absolutePath() + "/" + filename;
- QString expectedFile = expectedDir.absolutePath() + "/" + filename;
-
- QImage actual(actualFile);
- QImage expected(expectedFile);
-
- // Verifies that pngdumper generated image is not a null size image
- QCOMPARE((actual.width() != 0 || actual.height() != 0), true);
-
- ImageCompare compare;
-
- // Verifies that actual and expected images have the same size
- QCOMPARE(compare.CompareSizes(actual, expected), true);
-
- // Verifies that actual and expected images are pixel-wise the same
- QCOMPARE(compare.ComparePixels(actual, expected, diffTolerance, filename), true);
- }
-}
diff --git a/tests/system/auto/tst_imagecompare.h b/tests/system/auto/tst_imagecompare.h
deleted file mode 100644
index 7e8cdf2..0000000
--- a/tests/system/auto/tst_imagecompare.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Graphical Effects module.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef TST_IMAGECOMPARE_H
-#define TST_IMAGECOMPARE_H
-
-#include <QtTest/QtTest>
-
-class tst_imagecompare : public QObject
-{
- Q_OBJECT
-
-public:
- void setDiffTolerance(int tolerance);
-
-private Q_SLOTS:
- void initTestCase();
- void blend_varMode();
- void brightnessContrast_varBrightness();
- void brightnessContrast_varContrast();
- void colorize_varHue();
- void colorize_varSaturation();
- void colorize_varLightness();
- void colorOverlay_varColor();
- void conicalGradient_varAngle();
- void conicalGradient_varHorizontalOffset();
- void conicalGradient_varVerticalOffset();
- void conicalGradient_varGradient();
- void conicalGradient_varMaskSource();
- void desaturate_varDesaturation();
- void displace_varDisplacement();
- void dropShadow_varRadius();
- void dropShadow_varColor();
- void dropShadow_varHorizontalOffset();
- void dropShadow_varVerticalOffset();
- void dropShadow_varSpread();
- void dropShadow_varFast();
- void glow_varRadius();
- void glow_varColor();
- void glow_varSpread();
- void glow_varFast();
- void fastBlur_varBlur();
- void fastBlur_varTransparentBorder();
- void gammaAdjust_varGamma();
- void gaussianBlur_varRadius();
- void gaussianBlur_varDeviation();
- void gaussianBlur_varTransparentBorder();
- void hueSaturation_varHue();
- void hueSaturation_varSaturation();
- void hueSaturation_varLightness();
- void innerShadow_varRadius();
- void innerShadow_varHorizontalOffset();
- void innerShadow_varVerticalOffset();
- void innerShadow_varSpread();
- void innerShadow_varFast();
- void innerShadow_varColor();
- void linearGradient_varGradient();
- void linearGradient_varStart();
- void linearGradient_varEnd();
- void linearGradient_varMaskSource();
- void opacityMask_varMaskSource();
- void radialGradient_varHorizontalOffset();
- void radialGradient_varVerticalOffset();
- void radialGradient_varHorizontalRadius();
- void radialGradient_varVerticalRadius();
- void radialGradient_varGradient();
- void radialGradient_varAngle();
- void radialGradient_varMaskSource();
- void rectangularGlow_varGlowRadius();
- void rectangularGlow_varSpread();
- void rectangularGlow_varColor();
- void rectangularGlow_varCornerRadius();
- void recursiveBlur_varLoops();
- void recursiveBlur_varRadius();
- void recursiveBlur_varTransparentBorder();
- void thresholdMask_varSpread();
- void thresholdMask_varThreshold();
- void radialBlur_varAngle();
- void radialBlur_varHorizontalOffset();
- void radialBlur_varVerticalOffset();
- void directionalBlur_varAngle();
- void directionalBlur_varLength();
- void zoomBlur_varHorizontalOffset();
- void zoomBlur_varVerticalOffset();
- void zoomBlur_varLength();
- void levelAdjust_varMinimumInput();
- void levelAdjust_varMaximumInput();
- void levelAdjust_varMinimumOutput();
- void levelAdjust_varMaximumOutput();
- void maskedBlur_varRadius();
- void maskedBlur_varFast();
- void maskedBlur_varTransparentBorder();
-};
-
-#endif // TST_IMAGECOMPARE_H
diff --git a/tests/tests.pro b/tests/tests.pro
deleted file mode 100644
index 2b527af..0000000
--- a/tests/tests.pro
+++ /dev/null
@@ -1,2 +0,0 @@
-TEMPLATE = subdirs
-SUBDIRS += manual auto