4 * This file is part of CameraPlus.
6 * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 import com.nokia.meego 1.1
27 import "data.js" as Data
32 policyMode: CameraResources.Image
33 controlsVisible: capture.visible && cam.running && !standbyWidget.visible
35 orientationLock: PageOrientation.LockLandscape
39 anchors.right: parent.right
40 anchors.rightMargin: 20
41 anchors.verticalCenter: parent.verticalCenter
42 iconSource: "image://theme/icon-m-camera-shutter"
47 if (!checkBattery()) {
48 showError(qsTr("Not enough battery to capture images."));
52 if (!checkDiskSpace()) {
53 showError(qsTr("Not enough space to capture images."));
57 if (!fileSystem.available) {
58 showError(qsTr("Camera cannot capture images in mass storage mode."));
62 if (!mountProtector.lock()) {
63 showError(qsTr("Failed to lock images directory."));
67 metaData.setMetaData();
69 var fileName = fileNaming.imageFileName();
70 if (!imageMode.capture(fileName)) {
71 showError(qsTr("Failed to capture image. Please restart the camera."));
75 trackerStore.storeImage(fileName);
78 visible: imageMode.canCapture && !cameraMode.animationRunning && !previewAnimationRunning && cam.running
84 onPreviewAvailable: page.setPreview(preview);
85 onSaved: mountProtector.unlock();
90 visible: controlsVisible
91 anchors.top: parent.top
92 anchors.left: parent.left
94 anchors.leftMargin: 20
99 visible: controlsVisible
100 anchors.top: flash.bottom
101 anchors.left: parent.left
102 anchors.topMargin: 10
103 anchors.leftMargin: 20
108 visible: controlsVisible
109 anchors.top: scene.bottom
110 anchors.left: parent.left
111 anchors.topMargin: 10
112 anchors.leftMargin: 20
117 anchors.bottom: parent.bottom
118 anchors.bottomMargin: 20
119 anchors.left: parent.left
120 anchors.leftMargin: 20
123 onClicked: openFile("ImageSettingsPage.qml");
124 visible: controlsVisible
130 source: indicators.pressed ? "image://theme/meegotouch-camera-settings-indicators-background-pressed" : "image://theme/meegotouch-camera-settings-indicators-background"
139 id: resolutionIndicator
140 source: "image://theme/" + Data.imageIcon(settings.imageAspectRatio, settings.imageResolution);
145 source: "image://theme/" + Data.wbIcon(settings.imageWhiteBalance) + "-screen"
146 visible: settings.imageWhiteBalance != WhiteBalance.Auto
151 source: "image://theme/" + Data.cfIcon(settings.imageColorFilter) + "-screen"
152 visible: settings.imageColorFilter != ColorTone.Normal
157 visible: settings.imageIso != 0
158 source: "image://theme/" + Data.isoIcon(settings.imageIso);
163 visible: settings.useGps
164 source: "image://theme/icon-m-camera-location"
166 PropertyAnimation on opacity {
167 easing.type: Easing.OutSine
168 loops: Animation.Infinite
172 running: settings.useGps && !positionSource.position.longitudeValid
181 anchors.top: parent.top
182 anchors.right: parent.right
183 anchors.topMargin: 20
184 anchors.rightMargin: 20
189 iconSource: "image://theme/icon-m-camera-roll"
190 onClicked: openFile("PostCapturePage.qml");
191 visible: controlsVisible