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.Video
34 controlsVisible: cam.running && !videoMode.recording && videoMode.canCapture && !cameraMode.busy && dimmer.opacity == 0.0 && !previewAnimationRunning
35 orientationLock: PageOrientation.LockLandscape
37 function startRecording() {
38 if (!fileSystem.available) {
39 showError(qsTr("Camera cannot record videos in mass storage mode."));
43 if (!checkBattery()) {
44 showError(qsTr("Not enough battery to record video."));
48 if (!checkDiskSpace()) {
49 showError(qsTr("Not enough space to record video."));
53 openFileNow("RecordingPage.qml");
58 anchors.right: parent.right
59 anchors.rightMargin: 20
60 anchors.verticalCenter: parent.verticalCenter
61 iconSource: "image://theme/icon-m-camera-video-record"
66 onClicked: startRecording();
68 visible: controlsVisible
75 page.setPreview(preview);
80 anchors.top: parent.top
82 anchors.left: parent.left
83 anchors.leftMargin: 20
90 visible: controlsVisible
98 id: resolutionIndicator
99 source: "image://theme/" + Data.videoIcon(settings.videoResolution);
104 source: visible ? "image://theme/" + Data.wbIcon(settings.videoWhiteBalance) + "-screen" : ""
105 visible: settings.videoWhiteBalance != WhiteBalance.Auto
110 source: "image://theme/" + Data.cfIcon(settings.videoColorFilter) + "-screen"
111 visible: settings.videoColorFilter != ColorTone.Normal
116 visible: settings.useGps
117 source: "image://theme/icon-m-camera-location"
119 PropertyAnimation on opacity {
120 easing.type: Easing.OutSine
121 loops: Animation.Infinite
125 running: settings.useGps && !positionSource.position.longitudeValid
134 anchors.top: parent.top
135 anchors.right: parent.right
136 anchors.topMargin: 20
137 anchors.rightMargin: 20
142 iconSource: "image://theme/icon-m-camera-roll"
143 onClicked: openFile("PostCapturePage.qml");
144 visible: controlsVisible
149 anchors.bottom: parent.bottom
150 anchors.bottomMargin: 20
151 anchors.left: parent.left
152 anchors.leftMargin: 20
154 targetWidth: parent.width - (anchors.leftMargin * 2) - (66 * 1.5)
155 visible: controlsVisible
156 expanded: settings.showToolBar
157 onExpandedChanged: settings.showToolBar = expanded;
164 onClicked: toolBar.push(items);
167 onClicked: toolBar.push(items);
169 VideoWhiteBalanceButton {
170 onClicked: toolBar.push(items);
172 VideoColorFilterButton {
173 onClicked: toolBar.push(items);
178 iconSource: "image://theme/icon-m-toolbar-view-menu-white"
179 onClicked: openFile("VideoSettingsPage.qml");