aboutsummaryrefslogtreecommitdiffstats
path: root/examples/bluetooth/lowenergyscanner/Scanner/Dialog.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/bluetooth/lowenergyscanner/Scanner/Dialog.qml')
-rw-r--r--examples/bluetooth/lowenergyscanner/Scanner/Dialog.qml48
1 files changed, 48 insertions, 0 deletions
diff --git a/examples/bluetooth/lowenergyscanner/Scanner/Dialog.qml b/examples/bluetooth/lowenergyscanner/Scanner/Dialog.qml
new file mode 100644
index 000000000..75e82642a
--- /dev/null
+++ b/examples/bluetooth/lowenergyscanner/Scanner/Dialog.qml
@@ -0,0 +1,48 @@
+// Copyright (C) 2013 BlackBerry Limited. All rights reserved.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Rectangle {
+ id: dialog
+ width: parent.width / 3 * 2
+ height: dialogTextId.height + background.height + 20
+ z: 50
+ property string dialogText: ""
+ property bool busyImage: true
+ border.width: 1
+ border.color: "#363636"
+ radius: 10
+
+ Text {
+ id: dialogTextId
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.top: parent.top
+ anchors.topMargin: 10
+
+ elide: Text.ElideMiddle
+ text: dialog.dialogText
+ color: "#363636"
+ wrapMode: Text.Wrap
+ }
+
+ Image {
+ id: background
+
+ width: 20
+ height: 20
+ anchors.top: dialogTextId.bottom
+ anchors.horizontalCenter: dialogTextId.horizontalCenter
+ visible: parent.busyImage
+ source: "assets/busy_dark.png"
+ fillMode: Image.PreserveAspectFit
+ NumberAnimation on rotation {
+ duration: 3000
+ from: 0
+ to: 360
+ loops: Animation.Infinite
+ }
+ }
+}