Use the new Selector instead of the existing mess
[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: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-shutter.png"
17                 width: 75
18                 height: 75
19                 opacity: 0.5
20                 onClicked: imageMode.capture("/home/developer/foo.png");
21                 visible: imageMode.canCapture && !cameraMode.animationRunning && !previewAnimationRunning
22         }
23
24         ImageMode {
25                 id: imageMode
26                 camera: cam
27                 onPreviewAvailable: page.setPreview(preview);
28                 // TODO: this is not working
29                 nightMode: scene.sceneValue == 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         SceneButton {
42                 id: scene
43                 visible: capture.visible
44                 anchors.top: parent.top
45                 anchors.left: parent.left
46                 anchors.topMargin: 20 + 64 + 10
47                 anchors.leftMargin: 20
48         }
49
50         Selector {
51                 id: evComp
52                 visible: capture.visible
53                 anchors.top: parent.top
54                 anchors.left: parent.left
55                 anchors.topMargin: 20 + 64 + 10 + 64 + 10
56                 anchors.leftMargin: 20
57                 timerConstraints: slider.pressed
58                 widget: Slider {
59                         id: slider
60                         orientation: Qt.Horizontal
61 //                        anchors.horizontalCenter: parent.horizontalCenter
62                 }
63         }
64
65         // TODO: filenaming.
66         // TODO: metadata
67 }