3 import com.nokia.meego 1.1
4 import com.nokia.extras 1.1
7 import QtMobility.systeminfo 1.2
9 // TODO: metadata creator name, gps, geotags
10 // TODO: resolutions and aspect ratios
12 // TODO: battery low state
14 // TODO: flash not ready
15 // TODO: focus, caf, ...
17 // TODO: portrait/landscape
18 // TODO: record video in a hidden directory and then copy the video to avoid tracker indexing it.
19 // TODO: stop viewfinder in postcapture and settings pages ?
20 // TODO: resource policy
21 // TODO: prevent going to mass storage while recording and capturing
23 // TODO: grid lines, face tracking
24 // TODO: complete settings pages
25 // TODO: stop camera properly when we get closed.
26 // TODO: select primary/secondary camera.
27 // TODO: disable debug builds.
28 // TODO: seems start gets called when we are shutting down
29 // TODO: seems start gets called twice when we are starting up if screen is locked or dimmed ?!
34 property alias dimmer: camDimmer
38 Component.onCompleted: {
39 theme.inverted = true;
40 if (settings.mode == 0) {
41 openFile("ImagePage.qml");
44 openFile("VideoPage.qml");
48 function showError(msg) {
56 if (resourcePolicy.acquired) {
60 // TODO: We need a way to force a stop.
83 imageSuffix: cam.imageSuffix
84 videoSuffix: cam.videoSuffix
87 // Stolen from https://qt.gitorious.org/qt-components/qt-components/blobs/master/examples/meego/QmlComponentGallery/qml/ListPage.qml
88 function replacePage(file) {
89 var component = Qt.createComponent(file)
91 if (component.status == Component.Ready) {
92 pageStack.replace(component, {cam: cam}, true);
95 console.log("Error loading component:", component.errorString());
99 function openFile(file) {
100 var component = Qt.createComponent(file)
102 if (component.status == Component.Ready) {
103 pageStack.push(component, {cam: cam});
106 console.log("Error loading component:", component.errorString());
110 platformStyle: PageStackWindowStyle {
118 // TODO: is this needed ?
119 if (platformWindow.active) {
127 // TODO: hardcoding device id
128 Component.onCompleted: { cam.deviceId = 0; mode = settings.mode; }
145 value: ready ? camera.mode == Camera.VideoMode ? settings.videoSceneMode : settings.imageSceneMode : 0
149 id: colorToneController
151 value: ready ? camera.mode == Camera.VideoMode ? settings.videoColorFilter : settings.imageColorFilter : 0
155 id: whiteBalanceController
157 value: ready ? camera.mode == Camera.VideoMode ? settings.videoWhiteBalance : settings.imageWhiteBalance : 0
169 if (cam.mode == Camera.VideoMode) {
170 replacePage("VideoPage.qml");
173 replacePage("ImagePage.qml");