Added TorrentPickerPage.
[qtrapids] / src / qml-client / qml / TorrentPickerPage.qml
diff --git a/src/qml-client/qml/TorrentPickerPage.qml b/src/qml-client/qml/TorrentPickerPage.qml
new file mode 100644 (file)
index 0000000..44226af
--- /dev/null
@@ -0,0 +1,55 @@
+import QtQuick 1.1
+import Qt.labs.components 1.0
+import com.nokia.meego 1.0
+import com.meego 1.0
+import com.nokia.extras 1.0
+
+import QtMobility.gallery 1.1
+import QtRapids 1.0
+
+Page {
+    
+    id: torrentPickerPage
+    Component.onCompleted: console.log("TorrentPicker Running!")
+    DocumentGalleryModel {
+        id: torrentFileModel
+
+        rootType: DocumentGallery.File
+        properties: ["url"]
+        filter: GalleryWildcardFilter {
+            property: "fileName";
+            value: "*.torrent";
+        }
+
+        onProgressChanged: console.log("Width has changed to: ", progress)
+
+//         onCountChanged: {
+//             selection.clear()
+//             for (var i = 0; i < count; i++)
+//                 selection.append({"selected": false})
+//         }
+    }
+    // TODO: Don't really need this, we can only select one file, I guess?
+//     ListModel {
+//         id: selection
+//     }
+    ListView {
+        width: 200; height: 400
+        model: torrentFileModel
+        delegate: torrentFileDelegate
+    }
+    Component {
+        id: torrentFileDelegate
+
+        Item {
+            height: 60
+            width: parent.width
+            Text {
+                text: "Torrent"
+            }
+            Text {
+                text: url
+            }
+        }
+    }
+}
\ No newline at end of file