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 MouseArea { Text { height: parent.height width: parent.width text: url } anchors.fill: parent onClicked: { console.log("selected torrent: " + url); } } } } }