Added copyright headers and COPYING file.
[harmattan/cameraplus] / qml / ImageSettingsPage.qml
1 // -*- qml -*-
2
3 /*!
4  * This file is part of CameraPlus.
5  *
6  * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
7  *
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.
12  *
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.
17  *
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
21  */
22
23 import QtQuick 1.1
24 import com.nokia.meego 1.1
25 import QtCamera 1.0
26 import CameraPlus 1.0
27
28 import "data.js" as Data
29
30 CameraPage {
31         id: page
32         controlsVisible: false
33         policyMode: CameraResources.Image
34         needsPipeline: false
35
36         Rectangle {
37                 color: "black"
38                 anchors.fill: parent
39         }
40
41         Flickable {
42                 anchors.top: parent.top
43                 anchors.left: parent.left
44                 anchors.right: parent.right
45                 anchors.bottom: toolBar.top
46                 anchors.margins: 10
47                 contentHeight: col.height
48
49                 Column {
50                         id: col
51
52                         width: parent.width
53                         spacing: 10
54
55                         Label {
56                                 // TODO:
57                                 text: qsTr("Image settings");
58                         }
59
60                         SectionHeader {
61                                 text: qsTr("Capture mode");
62                         }
63
64                         ButtonRow {
65                                 anchors.horizontalCenter: parent.horizontalCenter
66                                 // TODO:
67                                 Button { text: qsTr("Normal"); }
68                                 Button { text: qsTr("Self timer"); }
69                                 Button { text: qsTr("Fast capture"); }
70                         }
71
72                         Row {
73                                 width: parent.width
74
75                                 ListItem {
76                                         id: wb
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");
82                                 }
83
84                                 ListItem {
85                                         id: cf
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");
91                                 }
92                         }
93
94                         SectionHeader {
95                                 text: qsTr("Self timer");
96                         }
97
98                         ButtonRow {
99                                 anchors.horizontalCenter: parent.horizontalCenter
100                                 // TODO:
101                                 Button { text: qsTr("2 seconds"); }
102                                 Button { text: qsTr("10 seconds"); }
103                         }
104
105                         SectionHeader {
106                                 text: qsTr("Light sensitivity");
107                         }
108
109                         ButtonRow {
110                                 anchors.horizontalCenter: parent.horizontalCenter
111
112                                 Button {
113                                         text: qsTr("Automatic");
114                                         checked: settings.imageIso == 0;
115                                         onClicked: settings.imageIso = 0;
116                                 }
117
118                                 Button {
119                                         text: qsTr("ISO 100");
120                                         checked: settings.imageIso == 100;
121                                         onClicked: settings.imageIso = 100;
122                                 }
123
124                                 Button {
125                                         text: qsTr("ISO 200");
126                                         checked: settings.imageIso == 200;
127                                         onClicked: settings.imageIso = 200;
128                                 }
129
130                                 Button {
131                                         text: qsTr("ISO 400");
132                                         checked: settings.imageIso == 400;
133                                         onClicked: settings.imageIso = 400;
134                                 }
135
136                                 Button {
137                                         text: qsTr("ISO 800");
138                                         checked: settings.imageIso == 800;
139                                         onClicked: settings.imageIso = 800;
140                                 }
141                         }
142
143                         SectionHeader {
144                                 text: qsTr("Aspect ratio");
145                         }
146
147                         ButtonRow {
148                                 anchors.horizontalCenter: parent.horizontalCenter
149                                 // TODO:
150                                 Button { text: qsTr("16:9"); }
151                                 Button { text: qsTr("4:3"); }
152                                 Button { text: qsTr("3:2"); }
153                         }
154
155                         SectionHeader {
156                                 text: qsTr("Resolution");
157                         }
158
159                         ButtonRow {
160                                 anchors.horizontalCenter: parent.horizontalCenter
161                                 // TODO:
162                                 Button {}
163                                 Button {}
164                                 Button {}
165                         }
166
167                         CameraSettings {
168                                 anchors.horizontalCenter: parent.horizontalCenter
169                         }
170                 }
171         }
172
173         ToolBar {
174                 id: toolBar
175                 anchors.bottom: parent.bottom
176                 tools: ToolBarLayout {
177                         id: layout
178                         ToolIcon { iconId: "icon-m-toolbar-back"; onClicked: pageStack.pop(); }
179                 }
180         }
181 }