Use Qt.application.active instead of platformWindow.active
[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 CameraPlus 1.0
6 import "data.js" as Data
7
8 CameraPage {
9         id: page
10
11         controlsVisible: false
12         policyMode: CameraResources.Image
13         needsPipeline: true
14
15         Rectangle {
16                 color: "black"
17                 width: parent.width
18                 height: row.height + title.height + 30
19                 anchors.bottom: toolBar.top
20                 opacity: 0.5
21
22                 SectionHeader {
23                         id: title
24                         anchors.top: parent.top
25                         anchors.topMargin: 10
26                         text: qsTr("White balance");
27                 }
28
29                 Row {
30                         id: row
31                         anchors.left: parent.left
32                         anchors.right: parent.right
33                         anchors.leftMargin: 20
34                         anchors.rightMargin: 20
35                         anchors.top: title.bottom
36                         anchors.topMargin: 10
37
38                         IconButton {
39                                 width: parent.width / 5
40                                 normalIcon: "image://theme/" + Data.wbIcon(value);
41                                 checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
42                                 value: WhiteBalance.Auto
43                                 savedValue: settings.imageWhiteBalance
44                                 onClicked: settings.imageWhiteBalance = value;
45                                 text: Data.wbName(value);
46                         }
47
48                         IconButton {
49                                 width: parent.width / 5
50                                 normalIcon: "image://theme/" + Data.wbIcon(value);
51                                 checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
52                                 value: WhiteBalance.Sunset
53                                 savedValue: settings.imageWhiteBalance
54                                 onClicked: settings.imageWhiteBalance = value;
55                                 text: Data.wbName(value);
56                         }
57
58                         IconButton {
59                                 width: parent.width / 5
60                                 normalIcon: "image://theme/" + Data.wbIcon(value);
61                                 checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
62                                 value: WhiteBalance.Cloudy
63                                 savedValue: settings.imageWhiteBalance
64                                 onClicked: settings.imageWhiteBalance = value;
65                                 text: Data.wbName(value);
66                         }
67
68                         IconButton {
69                                 width: parent.width / 5
70                                 normalIcon: "image://theme/" + Data.wbIcon(value);
71                                 checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
72                                 value: WhiteBalance.Flourescent
73                                 savedValue: settings.imageWhiteBalance
74                                 onClicked: settings.imageWhiteBalance = value;
75                                 text: Data.wbName(value);
76                         }
77
78                         IconButton {
79                                 width: parent.width / 5
80                                 normalIcon: "image://theme/" + Data.wbIcon(value);
81                                 checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
82                                 value: WhiteBalance.Tungsten
83                                 savedValue: settings.imageWhiteBalance
84                                 onClicked: settings.imageWhiteBalance = value;
85                                 text: Data.wbName(value);
86                         }
87                 }
88         }
89
90         ToolBar {
91                 id: toolBar
92                 anchors.bottom: parent.bottom
93                 tools: ToolBarLayout {
94                         id: layout
95                         ToolIcon { iconId: "icon-m-toolbar-back"; onClicked: pageStack.pop(); }
96                 }
97         }
98 }