Added resource policy support (Still needs more testing) and refactored the pipeline...
[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 { text: qsTr("Automatic"); }
89                                 Button { text: qsTr("ISO 100"); }
90                                 Button { text: qsTr("ISO 200"); }
91                                 Button { text: qsTr("ISO 400"); }
92                                 Button { text: qsTr("ISO 800"); }
93                         }
94
95                         SectionHeader {
96                                 text: qsTr("Aspect ratio");
97                         }
98
99                         ButtonRow {
100                                 anchors.horizontalCenter: parent.horizontalCenter
101                                 Button { text: qsTr("16:9"); }
102                                 Button { text: qsTr("4:3"); }
103                                 Button { text: qsTr("3:2"); }
104                         }
105
106                         SectionHeader {
107                                 text: qsTr("Resolution");
108                         }
109
110                         ButtonRow {
111                                 anchors.horizontalCenter: parent.horizontalCenter
112                                 Button {}
113                                 Button {}
114                                 Button {}
115                         }
116
117                         CameraSettings {
118                                 anchors.horizontalCenter: parent.horizontalCenter
119                         }
120                 }
121         }
122
123         ToolBar {
124                 id: toolBar
125                 anchors.bottom: parent.bottom
126                 tools: ToolBarLayout {
127                         id: layout
128                         ToolIcon { iconId: "icon-m-toolbar-back"; onClicked: pageStack.pop(); }
129                 }
130         }
131 }