summaryrefslogtreecommitdiffstats
path: root/tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestImageMipmap.qml
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-08-08 10:48:15 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-08-08 10:48:15 (GMT)
commite625a3f646073204240bea11feff08df6bdba17e (patch)
tree89bc5b2e8a24418372b7fdb6c3c0778639ece956 /tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestImageMipmap.qml
parent9b9f3af8bae02ca60a49dd4b59a84b5cdf04a2fd (diff)
parentbb070cae0cde7a83d519582e5872908f7eb2b51b (diff)
downloadQt-e625a3f646073204240bea11feff08df6bdba17e.zip
Qt-e625a3f646073204240bea11feff08df6bdba17e.tar.gz
Qt-e625a3f646073204240bea11feff08df6bdba17e.tar.bz2
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qt-qa-team
* 'master' of git://scm.dev.nokia.troll.no/qt/qt-qa-team: (784 commits) Fixed compile error in qwindowsurface_qws.cpp. Fixed regression introduced by 5842d19cf3dff37a85c. Remove DerivedSources.pro from WebKit. Support debuggable in the makefile build system QLabel documentation: add warning about sanitizing input runonphone: fix failure to terminate Fix license headers in new files from coda patch runonphone: command line args improperly passed to TRK after CODA patch Mark all Symbian debug binaries debuggable by default Preventing QSoftkeyManager giving false positive memory leaks Detect linked fonts by name (insead of via CLinkedTypeface* Api) Fixed memory leak in QMessageBox::setInformativeText in Symbian Revert "fix QFileInfo::isSymLink() for NTFS mount points" Fix typo for ifdef QT_NO_ACCESSIBILITY Call QAccessible::updateAccessibility when a widget is deleted Fix gamma corrected source color in GL Make macdeployqt more robust against usage of symbolic links. Memory leak fix in Symbian open file dialog Revert binary search in QTextEngine::findItem Runonphone with CODA support ...
Diffstat (limited to 'tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestImageMipmap.qml')
-rw-r--r--tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestImageMipmap.qml95
1 files changed, 95 insertions, 0 deletions
diff --git a/tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestImageMipmap.qml b/tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestImageMipmap.qml
new file mode 100644
index 0000000..aad8ddb
--- /dev/null
+++ b/tests/manual/declarative/qmlshadersplugin/qml/qmlshadersplugintest/TestImageMipmap.qml
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QML Shaders plugin of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+import QtQuick 1.0
+import Qt.labs.shaders 1.0
+
+Rectangle {
+ anchors.fill: parent;
+ color: "white"
+
+ Timer {
+ running: true
+ interval: 2000
+ repeat: true
+ onTriggered: {
+ if (theSource.mipmap && theSource.smooth){
+ theSource.smooth = false
+ } else if (theSource.mipmap && !theSource.smooth){
+ theSource.smooth = true
+ theSource.mipmap = false
+ } else if (!theSource.mipmap && theSource.smooth){
+ theSource.smooth = false
+ } else if (!theSource.mipmap && !theSource.smooth){
+ theSource.smooth = true
+ theSource.mipmap = true
+ }
+ }
+ }
+
+ ShaderEffectSource {
+ id: theSource
+ sourceImage: "wallpaper.jpg"
+ mipmap: false
+ smooth: false
+ }
+
+ ShaderEffectItem {
+ id: effect
+ anchors.centerIn: parent;
+ width: parent.width * 0.8
+ height: parent.height * 0.8
+ property variant source: theSource
+ }
+
+ Rectangle {
+ width: parent.width
+ height: 40
+ color: "#cc000000"
+
+ Text {
+ id: label
+ anchors.centerIn: parent
+ text: "Mipmap: " + theSource.mipmap + ", Smooth: " + theSource.smooth
+ color: "white"
+ font.bold: true
+ }
+ }
+}