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("Aspect ratio");
67 anchors.horizontalCenter: parent.horizontalCenter
69 onCheckedButtonChanged: {
70 // This is needed to initially setup the
71 // resolutions buttons
72 imageSettings.resolutions.aspectRatio = checkedButton.aspect;
73 settings.imageAspectRatio = imageSettings.resolutions.aspectRatio;
77 model: imageSettings.aspectRatios
79 property string aspect: modelData;
80 text: qsTr(modelData);
81 checked: settings.imageAspectRatio == modelData;
84 showError(qsTr("Camera is busy saving."));
88 settings.imageAspectRatio = modelData;
89 imageSettings.resolutions.aspectRatio = modelData;
96 text: qsTr("Resolution");
101 anchors.horizontalCenter: parent.horizontalCenter
106 model: imageSettings.resolutions
108 // http://stackoverflow.com/questions/1026069/capitalize-the-first-letter-of-string-in-javascript
109 function name(name, mp) {
110 return name.charAt(0).toUpperCase() + name.slice(1) + " " + mp + " Mpx";
114 property string resolution: resolutionName
115 property string aspectRatio: resolutionAspectRatio
116 text: resolutions.name(resolutionName, megaPixels);
117 checked: settings.imageResolution == resolutionName
120 showError(qsTr("Camera is busy saving."));
124 settings.imageResolution = resolutionName;
131 anchors.horizontalCenter: parent.horizontalCenter
138 anchors.bottom: parent.bottom
139 tools: ToolBarLayout {
141 ToolIcon { iconId: "icon-m-toolbar-back-white"; onClicked: pageStack.pop(); }