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
42 anchors.top: parent.top
43 anchors.left: parent.left
44 anchors.right: parent.right
45 anchors.bottom: toolBar.top
47 contentHeight: col.height
57 text: qsTr("Image settings");
61 text: qsTr("Capture mode");
65 anchors.horizontalCenter: parent.horizontalCenter
67 Button { text: qsTr("Normal"); }
68 Button { text: qsTr("Self timer"); }
69 Button { text: qsTr("Fast capture"); }
77 width: parent.width / 2
78 title: qsTr("White balance");
79 subtitle: Data.wbName(settings.imageWhiteBalance);
80 iconId: Data.wbSelectedIcon(settings.imageWhiteBalance);
81 onClicked: openFile("ImageWhiteBalancePage.qml");
86 width: parent.width / 2
87 title: qsTr("Color filter");
88 subtitle: Data.cfName(settings.imageColorFilter);
89 iconId: Data.cfSelectedIcon(settings.imageColorFilter);
90 onClicked: openFile("ImageColorFilterPage.qml");
95 text: qsTr("Self timer");
99 anchors.horizontalCenter: parent.horizontalCenter
101 Button { text: qsTr("2 seconds"); }
102 Button { text: qsTr("10 seconds"); }
106 text: qsTr("Light sensitivity");
110 anchors.horizontalCenter: parent.horizontalCenter
113 text: qsTr("Automatic");
114 checked: settings.imageIso == 0;
115 onClicked: settings.imageIso = 0;
119 text: qsTr("ISO 100");
120 checked: settings.imageIso == 100;
121 onClicked: settings.imageIso = 100;
125 text: qsTr("ISO 200");
126 checked: settings.imageIso == 200;
127 onClicked: settings.imageIso = 200;
131 text: qsTr("ISO 400");
132 checked: settings.imageIso == 400;
133 onClicked: settings.imageIso = 400;
137 text: qsTr("ISO 800");
138 checked: settings.imageIso == 800;
139 onClicked: settings.imageIso = 800;
144 text: qsTr("Aspect ratio");
148 anchors.horizontalCenter: parent.horizontalCenter
150 onCheckedButtonChanged: {
151 // This is needed to initially setup the
152 // resolutions buttons
153 imageSettings.resolutions.aspectRatio = checkedButton.aspect;
154 settings.imageAspectRatio = imageSettings.resolutions.aspectRatio;
158 model: imageSettings.aspectRatios
160 property string aspect: modelData;
161 text: qsTr(modelData);
162 checked: settings.imageAspectRatio == modelData;
165 showError(qsTr("Camera is busy saving."));
169 settings.imageAspectRatio = modelData;
170 imageSettings.resolutions.aspectRatio = modelData;
177 text: qsTr("Resolution");
182 anchors.horizontalCenter: parent.horizontalCenter
187 model: imageSettings.resolutions
189 // http://stackoverflow.com/questions/1026069/capitalize-the-first-letter-of-string-in-javascript
190 function name(name, mp) {
191 return name.charAt(0).toUpperCase() + name.slice(1) + " " + mp + " Mpx";
195 property string resolution: resolutionName
196 property string aspectRatio: resolutionAspectRatio
197 text: resolutions.name(resolutionName, megaPixels);
198 checked: settings.imageResolution == resolutionName
201 showError(qsTr("Camera is busy saving."));
205 settings.imageResolution = resolutionName;
212 anchors.horizontalCenter: parent.horizontalCenter
219 anchors.bottom: parent.bottom
220 tools: ToolBarLayout {
222 ToolIcon { iconId: "icon-m-toolbar-back"; onClicked: pageStack.pop(); }