Browse Source

Transform Reel Artwork out of existence

Donald Carr 8 năm trước cách đây
mục cha
commit
3d10c51c5d
3 tập tin đã thay đổi với 42 bổ sung1 xóa
  1. 1 0
      qml/qml.pro
  2. 2 1
      qml/views/reel/Reel.qml
  3. 39 0
      qml/views/reel/ReelImage.qml

+ 1 - 0
qml/qml.pro

@@ -24,6 +24,7 @@ DISTFILES += \
         views/conveyor/Monty_python_foot.png \
         views/basic/Basic.qml \
         views/reel/Reel.qml \
+        views/reel/ReelImage.qml \
         views/procession/Procession.qml \
         views/procession/ProcessionImage.qml \
         views/simplelistview/SimpleListView.qml \

+ 2 - 1
qml/views/reel/Reel.qml

@@ -8,7 +8,7 @@ View {
     id: root
 
     property var pictureDelegate: Component {
-        ArtImage {}
+        ReelImage {}
     }
 
     Settings {
@@ -40,6 +40,7 @@ View {
             }
             var col = columnArray[globalSettings.columnCount - 1]
             priorImage = col.imageArray.shift()
+            priorImage.bowOut()
         }
 
         NumberAnimation on t { from: 0; to: 1; duration: 1000; loops: -1 }

+ 39 - 0
qml/views/reel/ReelImage.qml

@@ -0,0 +1,39 @@
+import QtQuick 2.0
+
+import "../.."
+
+ArtImage {
+    id: root
+
+    function bowOut() {
+        deathBow.start()
+    }
+
+    transform: Rotation {
+        id: evilAxis
+        origin.x: root.width/2
+        origin.y: root.height
+        axis { x: 1; y: 0; z: 0 }
+    }
+    SequentialAnimation {
+        id: deathBow
+//        PropertyAction {
+//            target: root
+//            property: "z"
+//            value: root.z + 1
+//        }
+        NumberAnimation {
+            easing.type: "InQuad"
+            target: evilAxis
+            property: "angle"
+            from: 0
+            to: 90
+            duration: 3000
+        }
+        PropertyAction {
+            target: root
+            property: "visible"
+            value: false
+        }
+    }
+}