3 import com.nokia.meego 1.1
7 // TODO: metadata creator name, gps, geotags
8 // TODO: resolutions and aspect ratios
10 // TODO: battery low state
12 // TODO: flash not ready
13 // TODO: focus, caf, ...
15 // TODO: portrait/landscape
16 // TODO: record in a hidden directory and then copy the video to avoid tracker indexing it.
21 property alias dimmer: camDimmer
25 Component.onCompleted: {
26 theme.inverted = true;
27 if (settings.mode == 0) {
28 openFile("ImagePage.qml");
31 openFile("VideoPage.qml");
41 imageSuffix: cam.imageSuffix
42 videoSuffix: cam.videoSuffix
45 // Stolen from https://qt.gitorious.org/qt-components/qt-components/blobs/master/examples/meego/QmlComponentGallery/qml/ListPage.qml
46 function replacePage(file) {
47 var component = Qt.createComponent(file)
49 if (component.status == Component.Ready) {
50 pageStack.replace(component, {cam: cam}, true);
53 console.log("Error loading component:", component.errorString());
57 function openFile(file) {
58 var component = Qt.createComponent(file)
60 if (component.status == Component.Ready) {
61 pageStack.push(component, {cam: cam});
64 console.log("Error loading component:", component.errorString());
68 platformStyle: PageStackWindowStyle {
74 target: platformWindow
76 if (platformWindow.active) {
80 // This is a noop if camera is not idle so calling it will not hurt
88 if (idle && !platformWindow.active) {
94 if (platformWindow.active) {
102 // TODO: hardcoding device id
103 Component.onCompleted: { cam.deviceId = 0; mode = settings.mode; }
120 value: ready ? camera.mode == Camera.VideoMode ? settings.videoSceneMode : settings.imageSceneMode : 0
124 id: colorToneController
126 value: ready ? camera.mode == Camera.VideoMode ? settings.videoColorFilter : settings.imageColorFilter : 0
130 id: whiteBalanceController
132 value: ready ? camera.mode == Camera.VideoMode ? settings.videoWhiteBalance : settings.imageWhiteBalance : 0
144 if (cam.mode == Camera.VideoMode) {
145 replacePage("VideoPage.qml");
148 replacePage("ImagePage.qml");