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
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"); }
78 width: parent.width / 2
79 title: qsTr("White balance");
80 subtitle: Data.wbName(settings.imageWhiteBalance);
81 iconId: Data.wbSelectedIcon(settings.imageWhiteBalance);
82 onClicked: openFile("ImageWhiteBalancePage.qml");
87 width: parent.width / 2
88 title: qsTr("Color filter");
89 subtitle: Data.cfName(settings.imageColorFilter);
90 iconId: Data.cfSelectedIcon(settings.imageColorFilter);
91 onClicked: openFile("ImageColorFilterPage.qml");
96 text: qsTr("Self timer");
100 anchors.horizontalCenter: parent.horizontalCenter
102 Button { text: qsTr("2 seconds"); }
103 Button { text: qsTr("10 seconds"); }
107 text: qsTr("Light sensitivity");
111 anchors.horizontalCenter: parent.horizontalCenter
114 text: qsTr("Automatic");
115 checked: settings.imageIso == 0;
116 onClicked: settings.imageIso = 0;
120 text: qsTr("ISO 100");
121 checked: settings.imageIso == 100;
122 onClicked: settings.imageIso = 100;
126 text: qsTr("ISO 200");
127 checked: settings.imageIso == 200;
128 onClicked: settings.imageIso = 200;
132 text: qsTr("ISO 400");
133 checked: settings.imageIso == 400;
134 onClicked: settings.imageIso = 400;
138 text: qsTr("ISO 800");
139 checked: settings.imageIso == 800;
140 onClicked: settings.imageIso = 800;
145 text: qsTr("Aspect ratio");
149 anchors.horizontalCenter: parent.horizontalCenter
151 onCheckedButtonChanged: {
152 // This is needed to initially setup the
153 // resolutions buttons
154 imageSettings.resolutions.aspectRatio = checkedButton.aspect;
155 settings.imageAspectRatio = imageSettings.resolutions.aspectRatio;
159 model: imageSettings.aspectRatios
161 property string aspect: modelData;
162 text: qsTr(modelData);
163 checked: settings.imageAspectRatio == modelData;
166 showError(qsTr("Camera is busy saving."));
170 settings.imageAspectRatio = modelData;
171 imageSettings.resolutions.aspectRatio = modelData;
178 text: qsTr("Resolution");
183 anchors.horizontalCenter: parent.horizontalCenter
188 model: imageSettings.resolutions
190 // http://stackoverflow.com/questions/1026069/capitalize-the-first-letter-of-string-in-javascript
191 function name(name, mp) {
192 return name.charAt(0).toUpperCase() + name.slice(1) + " " + mp + " Mpx";
196 property string resolution: resolutionName
197 property string aspectRatio: resolutionAspectRatio
198 text: resolutions.name(resolutionName, megaPixels);
199 checked: settings.imageResolution == resolutionName
202 showError(qsTr("Camera is busy saving."));
206 settings.imageResolution = resolutionName;
213 anchors.horizontalCenter: parent.horizontalCenter
220 anchors.bottom: parent.bottom
221 tools: ToolBarLayout {
223 ToolIcon { iconId: "icon-m-toolbar-back"; onClicked: pageStack.pop(); }