3e89c01678baac3f48be0ba9b886d8b362885fa9
[harmattan/cameraplus] / qml / ImageWhiteBalancePage.qml
1 // -*- qml -*-
2 import QtQuick 1.1
3 import com.nokia.meego 1.1
4 import QtCamera 1.0
5 import "data.js" as Data
6
7 Page {
8         id: page
9         property Camera cam: null
10
11         Rectangle {
12                 color: "black"
13                 width: parent.width
14                 height: row.height + title.height + 30
15                 anchors.bottom: toolBar.top
16                 opacity: 0.5
17
18                 SectionHeader {
19                         id: title
20                         anchors.top: parent.top
21                         anchors.topMargin: 10
22                         text: qsTr("White balance");
23                 }
24
25                 Row {
26                         id: row
27                         anchors.left: parent.left
28                         anchors.right: parent.right
29                         anchors.leftMargin: 20
30                         anchors.rightMargin: 20
31                         anchors.top: title.bottom
32                         anchors.topMargin: 10
33
34                         IconButton {
35                                 width: parent.width / 5
36                                 normalIcon: "image://theme/" + Data.wbIcon(value);
37                                 checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
38                                 value: WhiteBalance.Auto
39                                 savedValue: settings.imageWhiteBalance
40                                 onClicked: settings.imageWhiteBalance = value;
41                                 text: Data.wbName(value);
42                         }
43
44                         IconButton {
45                                 width: parent.width / 5
46                                 normalIcon: "image://theme/" + Data.wbIcon(value);
47                                 checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
48                                 value: WhiteBalance.Sunset
49                                 savedValue: settings.imageWhiteBalance
50                                 onClicked: settings.imageWhiteBalance = value;
51                                 text: Data.wbName(value);
52                         }
53
54                         IconButton {
55                                 width: parent.width / 5
56                                 normalIcon: "image://theme/" + Data.wbIcon(value);
57                                 checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
58                                 value: WhiteBalance.Cloudy
59                                 savedValue: settings.imageWhiteBalance
60                                 onClicked: settings.imageWhiteBalance = value;
61                                 text: Data.wbName(value);
62                         }
63
64                         IconButton {
65                                 width: parent.width / 5
66                                 normalIcon: "image://theme/" + Data.wbIcon(value);
67                                 checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
68                                 value: WhiteBalance.Flourescent
69                                 savedValue: settings.imageWhiteBalance
70                                 onClicked: settings.imageWhiteBalance = value;
71                                 text: Data.wbName(value);
72                         }
73
74                         IconButton {
75                                 width: parent.width / 5
76                                 normalIcon: "image://theme/" + Data.wbIcon(value);
77                                 checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
78                                 value: WhiteBalance.Tungsten
79                                 savedValue: settings.imageWhiteBalance
80                                 onClicked: settings.imageWhiteBalance = value;
81                                 text: Data.wbName(value);
82                         }
83                 }
84         }
85
86         ToolBar {
87                 id: toolBar
88                 anchors.bottom: parent.bottom
89                 tools: ToolBarLayout {
90                         id: layout
91                         ToolIcon { iconId: "icon-m-toolbar-back"; onClicked: pageStack.pop(); }
92                 }
93         }
94 }