3 import com.nokia.meego 1.1
7 // TODO: metadata creator name, gps, geotags
8 // TODO: resolutions and aspect ratios
11 // TODO: battery low state
13 // TODO: flash not ready
14 // TODO: focus, caf, ...
16 // TODO: portrait/landscape
17 // TODO: record in a hidden directory and then copy the video to avoid tracker indexing it.
22 property alias dimmer: camDimmer
26 Component.onCompleted: {
27 theme.inverted = true;
28 if (settings.mode == 0) {
29 openFile("ImagePage.qml");
32 openFile("VideoPage.qml");
40 // Stolen from https://qt.gitorious.org/qt-components/qt-components/blobs/master/examples/meego/QmlComponentGallery/qml/ListPage.qml
41 function replacePage(file) {
42 var component = Qt.createComponent(file)
44 if (component.status == Component.Ready) {
45 pageStack.replace(component, {cam: cam}, true);
48 console.log("Error loading component:", component.errorString());
52 function openFile(file) {
53 var component = Qt.createComponent(file)
55 if (component.status == Component.Ready) {
56 pageStack.push(component, {cam: cam});
59 console.log("Error loading component:", component.errorString());
63 platformStyle: PageStackWindowStyle {
69 target: platformWindow
71 if (platformWindow.active) {
75 // This is a noop if camera is not idle so calling it will not hurt
83 if (idle && !platformWindow.active) {
89 if (platformWindow.active) {
97 // TODO: hardcoding device id
98 Component.onCompleted: { cam.deviceId = 0; mode = settings.mode; }
115 value: ready ? camera.mode == Camera.VideoMode ? settings.videoSceneMode : settings.imageSceneMode : 0
119 id: colorToneController
121 value: ready ? camera.mode == Camera.VideoMode ? settings.videoColorFilter : settings.imageColorFilter : 0
125 id: whiteBalanceController
127 value: ready ? camera.mode == Camera.VideoMode ? settings.videoWhiteBalance : settings.imageWhiteBalance : 0
139 if (cam.mode == Camera.VideoMode) {
140 replacePage("VideoPage.qml");
143 replacePage("ImagePage.qml");