diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-11-05 06:58:49 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-11-05 06:58:49 (GMT) |
commit | cba11823806177b1b226d4685644d7a425f2bcf5 (patch) | |
tree | ec8298312f0b8c3a0bc333f1e02bb8dee953f501 /tests/auto/declarative | |
parent | e6a682189c4cd7f291648b9190b68cce79106b86 (diff) | |
parent | 418e59135e1287d2e335ec4a3379a03e63895e3a (diff) | |
download | Qt-cba11823806177b1b226d4685644d7a425f2bcf5.zip Qt-cba11823806177b1b226d4685644d7a425f2bcf5.tar.gz Qt-cba11823806177b1b226d4685644d7a425f2bcf5.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r-- | tests/auto/declarative/declarative.pro | 1 | ||||
-rw-r--r-- | tests/auto/declarative/qmlsystempalette/qmlsystempalette.pro | 5 | ||||
-rw-r--r-- | tests/auto/declarative/qmlsystempalette/tst_qmlsystempalette.cpp | 154 | ||||
-rw-r--r-- | tests/auto/declarative/visual/fillmode/data-MAC/fillmode.0.png | bin | 0 -> 26099 bytes | |||
-rw-r--r-- | tests/auto/declarative/visual/fillmode/data-MAC/fillmode.qml | 279 | ||||
-rw-r--r-- | tests/auto/declarative/visual/fillmode/data/fillmode.0.png | bin | 0 -> 26099 bytes | |||
-rw-r--r-- | tests/auto/declarative/visual/fillmode/data/fillmode.qml | 279 | ||||
-rw-r--r-- | tests/auto/declarative/visual/fillmode/face.png | bin | 0 -> 905 bytes | |||
-rw-r--r-- | tests/auto/declarative/visual/fillmode/fillmode.qml | 16 |
9 files changed, 734 insertions, 0 deletions
diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro index e586925..02d5a55 100644 --- a/tests/auto/declarative/declarative.pro +++ b/tests/auto/declarative/declarative.pro @@ -31,6 +31,7 @@ SUBDIRS += \ qmlpixmapcache \ # Cover qmlpropertymap \ # Cover qmlqt \ # Cover + qmlsystempalette \ # Cover qmltimer \ # Cover qmlxmllistmodel \ # Cover repeater \ # Cover diff --git a/tests/auto/declarative/qmlsystempalette/qmlsystempalette.pro b/tests/auto/declarative/qmlsystempalette/qmlsystempalette.pro new file mode 100644 index 0000000..4d55b46 --- /dev/null +++ b/tests/auto/declarative/qmlsystempalette/qmlsystempalette.pro @@ -0,0 +1,5 @@ +load(qttest_p4) +contains(QT_CONFIG,declarative): QT += declarative gui +macx:CONFIG -= app_bundle + +SOURCES += tst_qmlsystempalette.cpp diff --git a/tests/auto/declarative/qmlsystempalette/tst_qmlsystempalette.cpp b/tests/auto/declarative/qmlsystempalette/tst_qmlsystempalette.cpp new file mode 100644 index 0000000..039eaa8 --- /dev/null +++ b/tests/auto/declarative/qmlsystempalette/tst_qmlsystempalette.cpp @@ -0,0 +1,154 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include <qtest.h> +#include <QtDeclarative/qmlengine.h> +#include <QtDeclarative/qmlcomponent.h> +#include <private/qmlsystempalette_p.h> +#include <qpalette.h> +#include "../../../shared/util.h" + +class tst_qmlsystempalette : public QObject + +{ + Q_OBJECT +public: + tst_qmlsystempalette(); + +private slots: + void activePalette(); + void inactivePalette(); + void disabledPalette(); + +private: + QmlEngine engine; +}; + +tst_qmlsystempalette::tst_qmlsystempalette() +{ +} + +void tst_qmlsystempalette::activePalette() +{ + QString componentStr = "import Qt 4.6\nSystemPalette { }"; + QmlComponent component(&engine, componentStr.toLatin1(), QUrl("file://")); + QmlSystemPalette *object = qobject_cast<QmlSystemPalette*>(component.create()); + + QVERIFY(object != 0); + + QPalette palette; + palette.setCurrentColorGroup(QPalette::Active); + QCOMPARE(palette.window().color(), object->window()); + QCOMPARE(palette.windowText().color(), object->windowText()); + QCOMPARE(palette.base().color(), object->base()); + QCOMPARE(palette.text().color(), object->text()); + QCOMPARE(palette.alternateBase().color(), object->alternateBase()); + QCOMPARE(palette.button().color(), object->button()); + QCOMPARE(palette.buttonText().color(), object->buttonText()); + QCOMPARE(palette.light().color(), object->light()); + QCOMPARE(palette.midlight().color(), object->midlight()); + QCOMPARE(palette.dark().color(), object->dark()); + QCOMPARE(palette.mid().color(), object->mid()); + QCOMPARE(palette.shadow().color(), object->shadow()); + QCOMPARE(palette.highlight().color(), object->highlight()); + QCOMPARE(palette.highlightedText().color(), object->highlightedText()); + + delete object; +} + +void tst_qmlsystempalette::inactivePalette() +{ + QString componentStr = "import Qt 4.6\nSystemPalette { colorGroup: SystemPalette.Inactive }"; + QmlComponent component(&engine, componentStr.toLatin1(), QUrl("file://")); + QmlSystemPalette *object = qobject_cast<QmlSystemPalette*>(component.create()); + + QVERIFY(object != 0); + + QPalette palette; + palette.setCurrentColorGroup(QPalette::Inactive); + QCOMPARE(palette.window().color(), object->window()); + QCOMPARE(palette.windowText().color(), object->windowText()); + QCOMPARE(palette.base().color(), object->base()); + QCOMPARE(palette.text().color(), object->text()); + QCOMPARE(palette.alternateBase().color(), object->alternateBase()); + QCOMPARE(palette.button().color(), object->button()); + QCOMPARE(palette.buttonText().color(), object->buttonText()); + QCOMPARE(palette.light().color(), object->light()); + QCOMPARE(palette.midlight().color(), object->midlight()); + QCOMPARE(palette.dark().color(), object->dark()); + QCOMPARE(palette.mid().color(), object->mid()); + QCOMPARE(palette.shadow().color(), object->shadow()); + QCOMPARE(palette.highlight().color(), object->highlight()); + QCOMPARE(palette.highlightedText().color(), object->highlightedText()); + + delete object; +} + +void tst_qmlsystempalette::disabledPalette() +{ + QString componentStr = "import Qt 4.6\nSystemPalette { colorGroup: SystemPalette.Disabled }"; + QmlComponent component(&engine, componentStr.toLatin1(), QUrl("file://")); + QmlSystemPalette *object = qobject_cast<QmlSystemPalette*>(component.create()); + + QVERIFY(object != 0); + + QPalette palette; + palette.setCurrentColorGroup(QPalette::Disabled); + QCOMPARE(palette.window().color(), object->window()); + QCOMPARE(palette.windowText().color(), object->windowText()); + QCOMPARE(palette.base().color(), object->base()); + QCOMPARE(palette.text().color(), object->text()); + QCOMPARE(palette.alternateBase().color(), object->alternateBase()); + QCOMPARE(palette.button().color(), object->button()); + QCOMPARE(palette.buttonText().color(), object->buttonText()); + QCOMPARE(palette.light().color(), object->light()); + QCOMPARE(palette.midlight().color(), object->midlight()); + QCOMPARE(palette.dark().color(), object->dark()); + QCOMPARE(palette.mid().color(), object->mid()); + QCOMPARE(palette.shadow().color(), object->shadow()); + QCOMPARE(palette.highlight().color(), object->highlight()); + QCOMPARE(palette.highlightedText().color(), object->highlightedText()); + + delete object; +} + +QTEST_MAIN(tst_qmlsystempalette) + +#include "tst_qmlsystempalette.moc" diff --git a/tests/auto/declarative/visual/fillmode/data-MAC/fillmode.0.png b/tests/auto/declarative/visual/fillmode/data-MAC/fillmode.0.png Binary files differnew file mode 100644 index 0000000..9c9ceae --- /dev/null +++ b/tests/auto/declarative/visual/fillmode/data-MAC/fillmode.0.png diff --git a/tests/auto/declarative/visual/fillmode/data-MAC/fillmode.qml b/tests/auto/declarative/visual/fillmode/data-MAC/fillmode.qml new file mode 100644 index 0000000..7ac6f51 --- /dev/null +++ b/tests/auto/declarative/visual/fillmode/data-MAC/fillmode.qml @@ -0,0 +1,279 @@ +import Qt.VisualTest 4.6 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 32 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 48 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 64 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 80 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 96 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 112 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 128 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 144 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 160 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 176 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 192 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 208 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 224 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 240 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 256 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 272 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 288 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 304 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 320 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 336 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 352 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 368 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 384 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 400 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 416 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 432 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 448 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 464 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 480 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 496 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 512 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 528 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 544 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 560 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 576 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 592 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 608 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 624 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 640 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 656 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 672 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 688 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 704 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Key { + type: 6 + key: 16777249 + modifiers: 0 + text: "" + autorep: false + count: 1 + } + Frame { + msec: 720 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 736 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 752 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 768 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 784 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 800 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 816 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 832 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 848 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 864 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 880 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 896 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 912 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 928 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 944 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 960 + image: "fillmode.0.png" + } + Frame { + msec: 976 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 992 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 1008 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 1024 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 1040 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 1056 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } +} diff --git a/tests/auto/declarative/visual/fillmode/data/fillmode.0.png b/tests/auto/declarative/visual/fillmode/data/fillmode.0.png Binary files differnew file mode 100644 index 0000000..9c9ceae --- /dev/null +++ b/tests/auto/declarative/visual/fillmode/data/fillmode.0.png diff --git a/tests/auto/declarative/visual/fillmode/data/fillmode.qml b/tests/auto/declarative/visual/fillmode/data/fillmode.qml new file mode 100644 index 0000000..58af8e8 --- /dev/null +++ b/tests/auto/declarative/visual/fillmode/data/fillmode.qml @@ -0,0 +1,279 @@ +import Qt.VisualTest 4.6 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 32 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 48 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 64 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 80 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 96 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 112 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 128 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 144 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 160 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 176 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 192 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 208 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 224 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 240 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 256 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 272 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 288 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 304 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 320 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 336 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 352 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 368 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 384 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 400 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 416 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 432 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 448 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 464 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 480 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 496 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 512 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 528 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 544 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 560 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 576 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 592 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 608 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 624 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 640 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 656 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 672 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 688 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 704 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Key { + type: 6 + key: 16777249 + modifiers: 67108864 + text: "" + autorep: false + count: 1 + } + Frame { + msec: 720 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 736 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 752 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 768 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 784 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 800 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 816 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 832 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 848 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 864 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 880 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 896 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 912 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 928 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 944 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 960 + image: "fillmode.0.png" + } + Frame { + msec: 976 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 992 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 1008 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 1024 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 1040 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } + Frame { + msec: 1056 + hash: "c8cb8d51ca04231dc272133faaf2fb6d" + } +} diff --git a/tests/auto/declarative/visual/fillmode/face.png b/tests/auto/declarative/visual/fillmode/face.png Binary files differnew file mode 100644 index 0000000..9623b1a --- /dev/null +++ b/tests/auto/declarative/visual/fillmode/face.png diff --git a/tests/auto/declarative/visual/fillmode/fillmode.qml b/tests/auto/declarative/visual/fillmode/fillmode.qml new file mode 100644 index 0000000..8450bf2 --- /dev/null +++ b/tests/auto/declarative/visual/fillmode/fillmode.qml @@ -0,0 +1,16 @@ +import Qt 4.6 + +Rectangle { + id: screen; width: 750; height: 600; color: "gray" + property string source: "face.png" + + Grid { + columns: 3 + Image { width: 250; height: 300; source: screen.source; fillMode: Image.Stretch } + Image { width: 250; height: 300; source: screen.source; fillMode: Image.PreserveAspectFit; smooth: true } + Image { width: 250; height: 300; source: screen.source; fillMode: Image.PreserveAspectCrop } + Image { width: 250; height: 300; source: screen.source; fillMode: Image.Tile; smooth: true } + Image { width: 250; height: 300; source: screen.source; fillMode: Image.TileHorizontally } + Image { width: 250; height: 300; source: screen.source; fillMode: Image.TileVertically } + } +} |