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
44 anchors.top: parent.top
45 anchors.left: parent.left
46 anchors.right: parent.right
47 anchors.bottom: toolBar.top
49 contentHeight: col.height
59 text: qsTr("Image settings");
63 text: qsTr("Capture mode");
67 anchors.horizontalCenter: parent.horizontalCenter
69 Button { text: qsTr("Normal"); }
70 Button { text: qsTr("Self timer"); }
71 Button { text: qsTr("Fast capture"); }
76 text: qsTr("Self timer");
80 anchors.horizontalCenter: parent.horizontalCenter
82 Button { text: qsTr("2 seconds"); }
83 Button { text: qsTr("10 seconds"); }
87 text: qsTr("Light sensitivity");
91 anchors.horizontalCenter: parent.horizontalCenter
94 text: qsTr("Automatic");
95 checked: settings.imageIso == 0;
96 onClicked: settings.imageIso = 0;
100 text: qsTr("ISO 100");
101 checked: settings.imageIso == 100;
102 onClicked: settings.imageIso = 100;
106 text: qsTr("ISO 200");
107 checked: settings.imageIso == 200;
108 onClicked: settings.imageIso = 200;
112 text: qsTr("ISO 400");
113 checked: settings.imageIso == 400;
114 onClicked: settings.imageIso = 400;
118 text: qsTr("ISO 800");
119 checked: settings.imageIso == 800;
120 onClicked: settings.imageIso = 800;
125 text: qsTr("Aspect ratio");
129 anchors.horizontalCenter: parent.horizontalCenter
131 onCheckedButtonChanged: {
132 // This is needed to initially setup the
133 // resolutions buttons
134 imageSettings.resolutions.aspectRatio = checkedButton.aspect;
135 settings.imageAspectRatio = imageSettings.resolutions.aspectRatio;
139 model: imageSettings.aspectRatios
141 property string aspect: modelData;
142 text: qsTr(modelData);
143 checked: settings.imageAspectRatio == modelData;
146 showError(qsTr("Camera is busy saving."));
150 settings.imageAspectRatio = modelData;
151 imageSettings.resolutions.aspectRatio = modelData;
158 text: qsTr("Resolution");
163 anchors.horizontalCenter: parent.horizontalCenter
168 model: imageSettings.resolutions
170 // http://stackoverflow.com/questions/1026069/capitalize-the-first-letter-of-string-in-javascript
171 function name(name, mp) {
172 return name.charAt(0).toUpperCase() + name.slice(1) + " " + mp + " Mpx";
176 property string resolution: resolutionName
177 property string aspectRatio: resolutionAspectRatio
178 text: resolutions.name(resolutionName, megaPixels);
179 checked: settings.imageResolution == resolutionName
182 showError(qsTr("Camera is busy saving."));
186 settings.imageResolution = resolutionName;
193 anchors.horizontalCenter: parent.horizontalCenter
200 anchors.bottom: parent.bottom
201 tools: ToolBarLayout {
203 ToolIcon { iconId: "icon-m-toolbar-back-white"; onClicked: pageStack.pop(); }