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.
17 controlsVisible: false
18 policyMode: CameraResources.PostCapture
22 if (status == PageStatus.Active) {
28 // Unlikely that we need this.
31 if (cam.idle && page.status == PageStatus.Active) {
48 startY: view.height / 2
49 PathLine { x: view.width * 2; y: view.height / 2 }
52 flickDeceleration: 999999 // Insanely high value to prevent panning multiple images
53 preferredHighlightBegin: 0.5
54 preferredHighlightEnd: 0.5
55 highlightRangeMode: PathView.StrictlyEnforceRange
58 model: SparqlListModel {
59 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)"
61 connection: SparqlConnection {
63 driver: "QTRACKER_DIRECT"
64 onStatusChanged: checkStatus(status)
66 function checkStatus(status) {
67 if (status == SparqlConnection.Error) {
68 console.log("Error = "+connection.errorString());
74 // TODO: tap post capture and then immediately back and you can see the error
75 // and the standby widget underneath it.
81 width: view.width - 10
83 anchors.centerIn: parent
85 text: qsTr("Failed to load preview");
86 verticalAlignment: Text.AlignVCenter
87 horizontalAlignment: Text.AlignHCenter
95 width: view.width - 10
97 anchors.centerIn: parent
105 anchors.bottom: parent.bottom
106 tools: ToolBarLayout {
108 ToolIcon { iconId: "icon-m-toolbar-back"; onClicked: { cam.start(); pageStack.pop(); } }