summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKimmo Ollila <kimmo.ollila@theqtcompany.com>2015-12-29 10:05:23 +0200
committerKimmo Ollila <kimmo.ollila@theqtcompany.com>2015-12-29 09:33:02 +0000
commitdec0f1a1ba2c64536a982b04a148d8b841aec03a (patch)
tree5b92fc7875c8b293932a732ade5f5d955c783497
parent045b94f4a3154f90ad954d529071794772deb8c3 (diff)
Added BusyIndicator when demos are loading
Change-Id: I18736e93262774051b02e5b33bdc1ce3b6adfa83 Task-Id: QTRD-3772 Reviewed-by: Teemu Holappa <teemu.holappa@theqtcompany.com>
-rw-r--r--qml/BusyIndicator.qml33
-rw-r--r--qml/Main.qml23
-rw-r--r--qml/images/spinner.pngbin0 -> 11738 bytes
-rw-r--r--resources.qrc2
-rw-r--r--startup.pro3
5 files changed, 52 insertions, 9 deletions
diff --git a/qml/BusyIndicator.qml b/qml/BusyIndicator.qml
new file mode 100644
index 0000000..ba0c339
--- /dev/null
+++ b/qml/BusyIndicator.qml
@@ -0,0 +1,33 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Digia Plc
+** All rights reserved.
+** For any questions to Digia, please use contact form at http://www.qt.io
+**
+** This file is part of Qt Enterprise Embedded.
+**
+** Licensees holding valid Qt Enterprise licenses may use this file in
+** accordance with the Qt Enterprise License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.
+**
+** If you have questions regarding the use of this file, please use
+** contact form at http://www.qt.io
+**
+****************************************************************************/
+import QtQuick 2.4
+
+Image {
+ height: width
+ source: "images/spinner.png"
+ sourceSize.width: Math.min(127, width)
+ sourceSize.height: Math.min(127, height)
+
+ RotationAnimator on rotation {
+ duration: 800
+ loops: Animation.Infinite
+ from: 0
+ to: 360
+ running: visible
+ }
+}
diff --git a/qml/Main.qml b/qml/Main.qml
index ce7fef7..5b1db16 100644
--- a/qml/Main.qml
+++ b/qml/Main.qml
@@ -20,7 +20,6 @@ import QtQuick.Window 2.2
import QtQuick.Enterprise.VirtualKeyboard 1.2
import com.qtcompany.B2QtLauncher 1.0
-
Window {
id: window
@@ -260,25 +259,33 @@ Window {
Item {
id: splashScreen
visible: opacity > 0
-
anchors.fill: parent
+ BusyIndicator {
+ id: busyIndicator
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.bottom: splashLabel.top
+ anchors.bottomMargin: height * .5
+ width: parent.width * .1
+ }
+
Text {
id: splashLabel
- color: "white"
- text: "Loading..."
- anchors.centerIn: parent;
- anchors.verticalCenterOffset: -height
- font.pixelSize: engine.titleFontSize()
+ color: "black"
+ text: qsTr("Loading %1...").arg(engine.applicationName.slice(0, -1))
+ anchors.bottom: codeLessImage.top
+ anchors.bottomMargin: font.pixelSize
+ anchors.horizontalCenter: parent.horizontalCenter
+ font.pixelSize: engine.fontSize() * 1.2
}
Image {
+ id: codeLessImage
source: "images/codeless.png"
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom;
anchors.margins: parent.height * 0.1;
}
-
}
Item {
diff --git a/qml/images/spinner.png b/qml/images/spinner.png
new file mode 100644
index 0000000..f64144a
--- /dev/null
+++ b/qml/images/spinner.png
Binary files differ
diff --git a/resources.qrc b/resources.qrc
index 99ec1a6..e0bf1f8 100644
--- a/resources.qrc
+++ b/resources.qrc
@@ -17,5 +17,7 @@
<file>qml/images/Play_btn.png</file>
<file>qml/images/close-button.png</file>
<file>qml/images/settings.png</file>
+ <file>qml/BusyIndicator.qml</file>
+ <file>qml/images/spinner.png</file>
</qresource>
</RCC>
diff --git a/startup.pro b/startup.pro
index 283db2a..4e73fcf 100644
--- a/startup.pro
+++ b/startup.pro
@@ -27,7 +27,8 @@ OTHER_FILES += \
qml/Main.qml \
qml/ApplicationIcon.qml \
qml/GlimmeringQtLogo.qml \
- qml/BootScreen.qml
+ qml/BootScreen.qml \
+ qml/BusyIndicator.qml
android {
target.path = $$[INSTALL_ROOT]/system/bin