3 import com.nokia.meego 1.1
9 property alias dimmer: camDimmer
12 Component.onCompleted: theme.inverted = true;
14 // Stolen from https://qt.gitorious.org/qt-components/qt-components/blobs/master/examples/meego/QmlComponentGallery/qml/ListPage.qml
15 function replacePage(file) {
16 var component = Qt.createComponent(file)
18 if (component.status == Component.Ready) {
19 pageStack.replace(component, {cam: cam}, true);
22 console.log("Error loading component:", component.errorString());
26 function openFile(file) {
27 var component = Qt.createComponent(file)
29 if (component.status == Component.Ready) {
30 pageStack.push(component);
33 console.log("Error loading component:", component.errorString());
37 platformStyle: PageStackWindowStyle {
40 portraitBackground: " "
41 landscapeBackground: " "
45 onDeviceIdChanged: cam.start();
51 Component.onCompleted: { cam.deviceId = 0; }
74 if (cam.mode == Camera.VideoMode) {
75 replacePage("VideoPage.qml");
78 replacePage("ImagePage.qml");
84 initialPage: ImagePage { cam: cam }