summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@digia.com>2013-08-13 08:57:34 +0200
committerGunnar Sletta <gunnar.sletta@digia.com>2013-08-14 09:45:50 +0200
commit3ec7a9cd21b51faedc4b03765bce16d4d7059041 (patch)
treeb00fe7d25e5b77d6b8f8b2485020ae7e1da177dc
parentb5c15fd4b9a3dfbb9d8f35c7156bdf8ac87572ed (diff)
FlyingIcon and ExtremeTable benchmarks
Change-Id: I450f0b6eb77e9fcc462a4f1f35033aba9324b3f9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
-rw-r--r--benchmarks/extremetable/main.qml121
-rw-r--r--benchmarks/flyingicons/icon1.pngbin0 -> 3751 bytes
-rw-r--r--benchmarks/flyingicons/icon2.pngbin0 -> 3946 bytes
-rw-r--r--benchmarks/flyingicons/icon3.pngbin0 -> 4392 bytes
-rw-r--r--benchmarks/flyingicons/icon4.pngbin0 -> 3737 bytes
-rw-r--r--benchmarks/flyingicons/main.qml92
6 files changed, 213 insertions, 0 deletions
diff --git a/benchmarks/extremetable/main.qml b/benchmarks/extremetable/main.qml
new file mode 100644
index 0000000..34e12ac
--- /dev/null
+++ b/benchmarks/extremetable/main.qml
@@ -0,0 +1,121 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the Scenegraph Playground module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** 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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** 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, Digia gives you certain additional
+** rights. These rights are described in the Digia 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.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Rectangle {
+ id: root
+
+ width: 1500
+ height: 900
+
+ gradient: Gradient {
+ GradientStop { position: 0; color: "steelblue" }
+ GradientStop { position: 1; color: "black" }
+ }
+
+ GridView {
+ id: grid
+
+ model: 100000
+
+ anchors.fill: parent
+
+ cellWidth: 50
+ cellHeight: 20
+
+ clip: true
+
+ delegate: Item {
+
+ width: grid.cellWidth
+ height: grid.cellHeight
+
+ Rectangle {
+ anchors.fill: parent
+ anchors.margins: 2
+
+ gradient: Gradient {
+ GradientStop { position: 0; color: "white"; }
+ GradientStop { position: 1; color: "lightsteelblue" }
+ }
+
+ Text {
+ text: index
+ anchors.centerIn: parent
+ }
+ }
+ }
+ }
+
+ Rectangle {
+ id: box
+ color: Qt.rgba(1, 1, 1, 0.5);
+ border.width: 5
+ border.color: Qt.rgba(0, 0, 0, 0.5);
+ radius: 20
+
+ width: label.width + 50
+ height: label.height + 50
+
+ SequentialAnimation on x {
+ NumberAnimation { to: root.width - box.width; duration: 8047 }
+ NumberAnimation { to: 0; duration: 8047 }
+ loops: Animation.Infinite
+ }
+
+ SequentialAnimation on y {
+ NumberAnimation { from: 0; to: root.height - box.height; duration: 5713 }
+ NumberAnimation { from: root.height - box.height; to: 0; duration: 5713 }
+ loops: Animation.Infinite
+ }
+
+ Text {
+ id: label
+ anchors.centerIn: parent
+ text: "This is Qt!\nIsn't it neat?"
+ font.pixelSize: 60
+ style: Text.Raised
+ color: "black"
+ }
+ }
+
+}
diff --git a/benchmarks/flyingicons/icon1.png b/benchmarks/flyingicons/icon1.png
new file mode 100644
index 0000000..708d916
--- /dev/null
+++ b/benchmarks/flyingicons/icon1.png
Binary files differ
diff --git a/benchmarks/flyingicons/icon2.png b/benchmarks/flyingicons/icon2.png
new file mode 100644
index 0000000..d2e2a48
--- /dev/null
+++ b/benchmarks/flyingicons/icon2.png
Binary files differ
diff --git a/benchmarks/flyingicons/icon3.png b/benchmarks/flyingicons/icon3.png
new file mode 100644
index 0000000..069d18d
--- /dev/null
+++ b/benchmarks/flyingicons/icon3.png
Binary files differ
diff --git a/benchmarks/flyingicons/icon4.png b/benchmarks/flyingicons/icon4.png
new file mode 100644
index 0000000..af980ca
--- /dev/null
+++ b/benchmarks/flyingicons/icon4.png
Binary files differ
diff --git a/benchmarks/flyingicons/main.qml b/benchmarks/flyingicons/main.qml
new file mode 100644
index 0000000..54b7ab6
--- /dev/null
+++ b/benchmarks/flyingicons/main.qml
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the Scenegraph Playground module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** 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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** 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, Digia gives you certain additional
+** rights. These rights are described in the Digia 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.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Rectangle {
+
+ id: root
+
+ width: 1500
+ height: 900
+
+ property real itemSize: 20
+ property int rows: height / itemSize - 2;
+ property int cols: width / itemSize - 2;
+
+ gradient: Gradient {
+ GradientStop { position: 0; color: "steelblue" }
+ GradientStop { position: 1; color: "black" }
+ }
+
+ Repeater {
+
+ model: root.rows * root.cols
+
+ onModelChanged: if (model != 0) print("Populating with " + model + " items...");
+
+ Image {
+ width: root.itemSize
+ height: root.itemSize
+
+ sourceSize: Qt.size(width, height);
+ source: "icon" + (1 + index % 4) + ".png"
+
+ property int xPos: ((index % cols) + 1) * root.itemSize;
+ property int yPos: (Math.floor(index / cols) + 1) * root.itemSize;
+ x: xPos + shift
+ y: yPos + shift
+
+ property real shift: -10
+ SequentialAnimation on shift {
+ PauseAnimation { duration: index * 3; }
+ SequentialAnimation {
+ NumberAnimation { to: 10; duration: 1000; easing.type: Easing.InOutSine }
+ NumberAnimation { to: -10; duration: 1000; easing.type: Easing.InOutSine }
+ loops: Animation.Infinite
+ }
+ }
+
+
+ }
+ }
+
+}