Enable night mode when the camera scene mode is night. Not when the settings are...
[harmattan/cameraplus] / qml / ImagePage.qml
1 // -*- qml -*-
2 import QtQuick 1.1
3 import com.nokia.meego 1.1
4 import QtCamera 1.0
5
6 CameraPage {
7         id: page
8
9         controlsVisible: capture.visible
10
11         Button {
12                 id: capture
13                 anchors.right: parent.right
14                 anchors.rightMargin: 20
15                 anchors.verticalCenter: parent.verticalCenter
16                 iconSource: "image://theme/icon-m-camera-shutter"
17                 width: 75
18                 height: 75
19                 opacity: 0.5
20                 // TODO:
21                 onClicked: imageMode.capture("/home/developer/foo.png");
22                 visible: imageMode.canCapture && !cameraMode.animationRunning && !previewAnimationRunning
23         }
24
25         ImageMode {
26                 id: imageMode
27                 camera: cam
28                 onPreviewAvailable: page.setPreview(preview);
29                 nightMode: sceneController.value == Scene.Night
30         }
31
32         FlashButton {
33                 id: flash
34                 visible: capture.visible
35                 anchors.top: parent.top
36                 anchors.left: parent.left
37                 anchors.topMargin: 20
38                 anchors.leftMargin: 20
39         }
40
41         ImageSceneButton {
42                 id: scene
43                 visible: capture.visible
44                 anchors.top: flash.bottom
45                 anchors.left: parent.left
46                 anchors.topMargin: 10
47                 anchors.leftMargin: 20
48         }
49
50         EvCompButton {
51                 id: evComp
52                 visible: capture.visible
53                 anchors.top: scene.bottom
54                 anchors.left: parent.left
55                 anchors.topMargin: 10
56                 anchors.leftMargin: 20
57         }
58
59         Indicators {
60                 visible: capture.visible
61                 anchors.bottom: parent.bottom
62                 anchors.bottomMargin: 20
63                 anchors.left: parent.left
64                 anchors.leftMargin: 20
65
66                 onClicked: openFile("ImageSettingsPage.qml");
67 //                Image {
68 ///                        
69 //                }
70         }
71
72         // TODO: filenaming.
73         // TODO: metadata
74 }