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
28 import "data.js" as Data
32 controlsVisible: false
33 policyMode: CameraResources.Image
34 enableViewfinder: false
35 standbyVisible: !Qt.application.active
43 anchors.top: parent.top
44 anchors.left: parent.left
45 anchors.right: parent.right
46 anchors.bottom: toolBar.top
48 contentHeight: col.height
58 text: qsTr("Image settings");
62 text: qsTr("Capture mode");
66 anchors.horizontalCenter: parent.horizontalCenter
68 Button { text: qsTr("Normal"); }
69 Button { text: qsTr("Self timer"); }
70 Button { text: qsTr("Fast capture"); }
75 text: qsTr("Self timer");
79 anchors.horizontalCenter: parent.horizontalCenter
81 Button { text: qsTr("2 seconds"); }
82 Button { text: qsTr("10 seconds"); }
86 text: qsTr("Light sensitivity");
90 anchors.horizontalCenter: parent.horizontalCenter
93 text: qsTr("Automatic");
94 checked: settings.imageIso == 0;
95 onClicked: settings.imageIso = 0;
99 text: qsTr("ISO 100");
100 checked: settings.imageIso == 100;
101 onClicked: settings.imageIso = 100;
105 text: qsTr("ISO 200");
106 checked: settings.imageIso == 200;
107 onClicked: settings.imageIso = 200;
111 text: qsTr("ISO 400");
112 checked: settings.imageIso == 400;
113 onClicked: settings.imageIso = 400;
117 text: qsTr("ISO 800");
118 checked: settings.imageIso == 800;
119 onClicked: settings.imageIso = 800;
124 text: qsTr("Aspect ratio");
128 anchors.horizontalCenter: parent.horizontalCenter
130 onCheckedButtonChanged: {
131 // This is needed to initially setup the
132 // resolutions buttons
133 imageSettings.resolutions.aspectRatio = checkedButton.aspect;
134 settings.imageAspectRatio = imageSettings.resolutions.aspectRatio;
138 model: imageSettings.aspectRatios
140 property string aspect: modelData;
141 text: qsTr(modelData);
142 checked: settings.imageAspectRatio == modelData;
145 showError(qsTr("Camera is busy saving."));
149 settings.imageAspectRatio = modelData;
150 imageSettings.resolutions.aspectRatio = modelData;
157 text: qsTr("Resolution");
162 anchors.horizontalCenter: parent.horizontalCenter
167 model: imageSettings.resolutions
169 // http://stackoverflow.com/questions/1026069/capitalize-the-first-letter-of-string-in-javascript
170 function name(name, mp) {
171 return name.charAt(0).toUpperCase() + name.slice(1) + " " + mp + " Mpx";
175 property string resolution: resolutionName
176 property string aspectRatio: resolutionAspectRatio
177 text: resolutions.name(resolutionName, megaPixels);
178 checked: settings.imageResolution == resolutionName
181 showError(qsTr("Camera is busy saving."));
185 settings.imageResolution = resolutionName;
192 anchors.horizontalCenter: parent.horizontalCenter
199 anchors.bottom: parent.bottom
200 tools: ToolBarLayout {
202 ToolIcon { iconId: "icon-m-toolbar-back"; onClicked: pageStack.pop(); }