3 import com.nokia.meego 1.1
8 // QML QtGallery stuff is crap.
9 // Most of the ideas (and some code) for loading and displaying images are stolen from
10 // N9QmlPhotoPicker https://github.com/petrumotrescu/N9QmlPhotoPicker
12 // TODO: this is really basic.
16 property Camera cam: null
29 startY: view.height / 2
30 PathLine { x: view.width * 2; y: view.height / 2 }
33 flickDeceleration: 999999 // Insanely high value to prevent panning multiple images
34 preferredHighlightBegin: 0.5
35 preferredHighlightEnd: 0.5
36 highlightRangeMode: PathView.StrictlyEnforceRange
39 model: SparqlListModel {
40 query: "SELECT nie:url(?urn) AS ?url tracker:id(?urn) AS ?trackerid nie:mimeType(?urn) AS ?mime WHERE { ?urn rdf:type nfo:Media . ?urn nfo:equipment \"urn:equipment:" + deviceInfo.manufacturer + ":" + deviceInfo.model + ":\" ; tracker:available \"true\"^^xsd:boolean OPTIONAL { ?urn nie:contentCreated ?created } } ORDER BY DESC (?created)"
42 connection: SparqlConnection {
44 driver: "QTRACKER_DIRECT"
45 onStatusChanged: checkStatus(status)
47 function checkStatus(status) {
48 if (status == SparqlConnection.Error)
49 console.log("Error = "+connection.errorString());
59 width: view.width - 10
61 anchors.centerIn: parent
63 text: qsTr("Failed to load preview");
64 verticalAlignment: Text.AlignVCenter
65 horizontalAlignment: Text.AlignHCenter
73 width: view.width - 10
75 anchors.centerIn: parent
84 anchors.bottom: parent.bottom
85 tools: ToolBarLayout {
87 ToolIcon { iconId: "icon-m-toolbar-back"; onClicked: pageStack.pop(); }