Added a monitor for MyDocs availability
[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                 onClicked: {
21                         if (!fileSystem.available) {
22                                 showError(qsTr("Camera cannot capture images in mass storage mode."));
23                         }
24                         else if (!imageMode.capture(fileNaming.imageFileName())) {
25                                 showError(qsTr("Failed to capture image. Please restart the camera."));
26                         }
27                 }
28
29                 visible: imageMode.canCapture && !cameraMode.animationRunning && !previewAnimationRunning
30         }
31
32         ImageMode {
33                 id: imageMode
34                 camera: cam
35                 onPreviewAvailable: page.setPreview(preview);
36         }
37
38         FlashButton {
39                 id: flash
40                 visible: controlsVisible
41                 anchors.top: parent.top
42                 anchors.left: parent.left
43                 anchors.topMargin: 20
44                 anchors.leftMargin: 20
45         }
46
47         ImageSceneButton {
48                 id: scene
49                 visible: controlsVisible
50                 anchors.top: flash.bottom
51                 anchors.left: parent.left
52                 anchors.topMargin: 10
53                 anchors.leftMargin: 20
54         }
55
56         EvCompButton {
57                 id: evComp
58                 visible: controlsVisible
59                 anchors.top: scene.bottom
60                 anchors.left: parent.left
61                 anchors.topMargin: 10
62                 anchors.leftMargin: 20
63         }
64
65         Indicators {
66                 visible: controlsVisible
67                 anchors.bottom: parent.bottom
68                 anchors.bottomMargin: 20
69                 anchors.left: parent.left
70                 anchors.leftMargin: 20
71
72                 onClicked: openFile("ImageSettingsPage.qml");
73 //                Image {
74 ///                        
75 //                }
76         }
77
78         Button {
79                 id: cameraRoll
80                 anchors.top: parent.top
81                 anchors.right: parent.right
82                 anchors.topMargin: 20
83                 anchors.rightMargin: 20
84                 width: 56
85                 height: 56
86
87                 opacity: 0.5
88                 iconSource: "image://theme/icon-m-camera-roll"
89                 onClicked: openFile("PostCapturePage.qml");
90                 visible: controlsVisible
91         }
92
93         // TODO: metadata
94 }