ISO settings are now functional
[harmattan/cameraplus] / qml / ImageSettingsPage.qml
1 // -*- qml -*-
2 import QtQuick 1.1
3 import com.nokia.meego 1.1
4 import QtCamera 1.0
5 import CameraPlus 1.0
6
7 import "data.js" as Data
8
9 CameraPage {
10         id: page
11         controlsVisible: false
12         policyMode: CameraResources.Image
13         needsPipeline: false
14
15         Rectangle {
16                 color: "black"
17                 anchors.fill: parent
18         }
19
20         Flickable {
21                 anchors.top: parent.top
22                 anchors.left: parent.left
23                 anchors.right: parent.right
24                 anchors.bottom: toolBar.top
25                 anchors.margins: 10
26                 contentHeight: col.height
27
28                 Column {
29                         id: col
30
31                         width: parent.width
32                         spacing: 10
33
34                         Label {
35                                 // TODO:
36                                 text: qsTr("Image settings");
37                         }
38
39                         SectionHeader {
40                                 text: qsTr("Capture mode");
41                         }
42
43                         ButtonRow {
44                                 anchors.horizontalCenter: parent.horizontalCenter
45                                 Button { text: qsTr("Normal"); }
46                                 Button { text: qsTr("Self timer"); }
47                                 Button { text: qsTr("Fast capture"); }
48                         }
49
50                         Row {
51                                 width: parent.width
52
53                                 ListItem {
54                                         id: wb
55                                         width: parent.width / 2
56                                         title: qsTr("White balance");
57                                         subtitle: Data.wbName(settings.imageWhiteBalance);
58                                         iconId: Data.wbSelectedIcon(settings.imageWhiteBalance);
59                                         onClicked: openFile("ImageWhiteBalancePage.qml");
60                                 }
61
62                                 ListItem {
63                                         id: cf
64                                         width: parent.width / 2
65                                         title: qsTr("Color filter");
66                                         subtitle: Data.cfName(settings.imageColorFilter);
67                                         iconId: Data.cfSelectedIcon(settings.imageColorFilter);
68                                         onClicked: openFile("ImageColorFilterPage.qml");
69                                 }
70                         }
71
72                         SectionHeader {
73                                 text: qsTr("Self timer");
74                         }
75
76                         ButtonRow {
77                                 anchors.horizontalCenter: parent.horizontalCenter
78                                 Button { text: qsTr("2 seconds"); }
79                                 Button { text: qsTr("10 seconds"); }
80                         }
81
82                         SectionHeader {
83                                 text: qsTr("Light sensitivity");
84                         }
85
86                         ButtonRow {
87                                 anchors.horizontalCenter: parent.horizontalCenter
88                                 Button {
89                                         text: qsTr("Automatic");
90                                         checked: settings.imageIso == 0;
91                                         onClicked: settings.imageIso = 0;
92                                 }
93
94                                 Button {
95                                         text: qsTr("ISO 100");
96                                         checked: settings.imageIso == 100;
97                                         onClicked: settings.imageIso = 100;
98                                 }
99
100                                 Button {
101                                         text: qsTr("ISO 200");
102                                         checked: settings.imageIso == 200;
103                                         onClicked: settings.imageIso = 200;
104                                 }
105
106                                 Button {
107                                         text: qsTr("ISO 400");
108                                         checked: settings.imageIso == 400;
109                                         onClicked: settings.imageIso = 400;
110                                 }
111
112                                 Button {
113                                         text: qsTr("ISO 800");
114                                         checked: settings.imageIso == 800;
115                                         onClicked: settings.imageIso = 800;
116                                 }
117                         }
118
119                         SectionHeader {
120                                 text: qsTr("Aspect ratio");
121                         }
122
123                         ButtonRow {
124                                 anchors.horizontalCenter: parent.horizontalCenter
125                                 Button { text: qsTr("16:9"); }
126                                 Button { text: qsTr("4:3"); }
127                                 Button { text: qsTr("3:2"); }
128                         }
129
130                         SectionHeader {
131                                 text: qsTr("Resolution");
132                         }
133
134                         ButtonRow {
135                                 anchors.horizontalCenter: parent.horizontalCenter
136                                 Button {}
137                                 Button {}
138                                 Button {}
139                         }
140
141                         CameraSettings {
142                                 anchors.horizontalCenter: parent.horizontalCenter
143                         }
144                 }
145         }
146
147         ToolBar {
148                 id: toolBar
149                 anchors.bottom: parent.bottom
150                 tools: ToolBarLayout {
151                         id: layout
152                         ToolIcon { iconId: "icon-m-toolbar-back"; onClicked: pageStack.pop(); }
153                 }
154         }
155 }