Added a method to obtain the QtCamDevice from the mode
[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 && cam.running && !standbyWidget.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         }
30
31         FlashButton {
32                 id: flash
33                 visible: controlsVisible
34                 anchors.top: parent.top
35                 anchors.left: parent.left
36                 anchors.topMargin: 20
37                 anchors.leftMargin: 20
38         }
39
40         ImageSceneButton {
41                 id: scene
42                 visible: controlsVisible
43                 anchors.top: flash.bottom
44                 anchors.left: parent.left
45                 anchors.topMargin: 10
46                 anchors.leftMargin: 20
47         }
48
49         EvCompButton {
50                 id: evComp
51                 visible: controlsVisible
52                 anchors.top: scene.bottom
53                 anchors.left: parent.left
54                 anchors.topMargin: 10
55                 anchors.leftMargin: 20
56         }
57
58         Indicators {
59                 visible: controlsVisible
60                 anchors.bottom: parent.bottom
61                 anchors.bottomMargin: 20
62                 anchors.left: parent.left
63                 anchors.leftMargin: 20
64
65                 onClicked: openFile("ImageSettingsPage.qml");
66 //                Image {
67 ///                        
68 //                }
69         }
70
71         // TODO: filenaming.
72         // TODO: metadata
73 }