BusyIndicator prototyping
authorJanne Kiiski <janne.kiiski@ixonos.com>
Mon, 22 Nov 2010 14:03:14 +0000 (16:03 +0200)
committerJanne Kiiski <janne.kiiski@ixonos.com>
Mon, 22 Nov 2010 14:03:14 +0000 (16:03 +0200)
src/qmlui/BusyIndicator.qml [new file with mode: 0644]
src/qmlui/DelegateBase.qml
src/qmlui/FriendsView.qml
src/qmlui/ListBase.qml
src/qmlui/res.qrc
src/src.pro

diff --git a/src/qmlui/BusyIndicator.qml b/src/qmlui/BusyIndicator.qml
new file mode 100644 (file)
index 0000000..b0b2da9
--- /dev/null
@@ -0,0 +1,29 @@
+import Qt 4.7
+
+Image {
+    id: container
+    property bool on: true
+    smooth: true
+    visible: container.on
+    source: "qrc:/res/busy.png";
+
+    SequentialAnimation on rotation {
+        loops: Animation.Infinite
+        PropertyAction { value: 0 }
+        PauseAnimation { duration: 200 }
+        PropertyAction { value: 45 }
+        PauseAnimation { duration: 200 }
+        PropertyAction { value: 90 }
+        PauseAnimation { duration: 200 }
+        PropertyAction { value: 135 }
+        PauseAnimation { duration: 200 }
+        PropertyAction { value: 180 }
+        PauseAnimation { duration: 200 }
+        PropertyAction { value: 225 }
+        PauseAnimation { duration: 200 }
+        PropertyAction { value: 270 }
+        PauseAnimation { duration: 200 }
+        PropertyAction { value: 315 }
+        PauseAnimation { duration: 200 }
+    }
+}
index 12b49bb..fe15972 100644 (file)
@@ -61,6 +61,8 @@ Item {
         width: 50
     }
 
+    BusyIndicator { anchors.centerIn: image; on: image.status != Image.Ready }
+
     BorderImage {
         id: borderImage
         anchors.fill: image
index 961fcd2..0ef4c73 100644 (file)
@@ -1,6 +1,7 @@
 import Qt 4.7
 
 ListBase {
+    busyOn: count == 0
     model: friendModel
     delegate: DelegateBase {
         id: delegate
@@ -12,6 +13,7 @@ ListBase {
     Component {
         id: detailsComponent
         Item {
+            id: detailsComponentContainer
             state: delegate.state
             height: messageRow.height + addressRow.height + timeRow.height
             width: parent.width
index 893d4af..f5b07b7 100644 (file)
@@ -6,4 +6,8 @@ ListView {
     focus: true
     clip: true
     highlightMoveDuration: 300
+
+    property alias busyOn : busyIndicator.on
+
+    BusyIndicator { id: busyIndicator; anchors.centerIn: parent; on: false }
 }
index 2cdb77e..2a5fecc 100644 (file)
@@ -31,5 +31,7 @@
         <file>ListBase.qml</file>
         <file>DetailEditorRow.qml</file>
         <file>PanelSelectorButton.qml</file>
+        <file>res/busy.png</file>
+        <file>BusyIndicator.qml</file>
     </qresource>
 </RCC>
index f3ce005..b524559 100644 (file)
@@ -205,7 +205,8 @@ OTHER_FILES += qmlui/Main.qml \
     qmlui/FriendsView.qml \
     qmlui/LocationsView.qml \
     qmlui/DetailEditorRow.qml \
-    qmlui/PanelSelectorButton.qml
+    qmlui/PanelSelectorButton.qml \
+    qmlui/BusyIndicator.qml
 
 QT += network \
     webkit  \