3 import com.nokia.meego 1.1
9 property alias value: flash.value
11 iconSource: flashIcon(flash.value);
13 title: qsTr("Flash mode");
16 // TODO: move this out of here.
19 value: settings.imageFlashMode
20 // TODO: scene modes can change flash value. what to do here ?
21 onValueChanged: settings.imageFlashMode = value;
24 function flashIcon(val) {
25 var x = row.children.length;
27 for (i = 0; i < x; i++) {
28 if (row.children[i].value == val) {
29 return row.children[i].normalIcon;
36 height: button.checked ? 64 : 0
37 width: button.checked ? (children.length * height) + (children.length - 1) * spacing : 0
41 // TODO: seems animation is not working
42 PropertyAnimation { duration: 250; }
46 normalIcon: "image://theme/icon-m-camera-flash-auto"
47 checkedIcon: "image://theme/icon-m-camera-flash-auto-pressed"
48 onClicked: settings.imageFlashMode = value;
50 savedValue: settings.imageFlashMode
54 normalIcon: "image://theme/icon-m-camera-flash-always"
55 checkedIcon: "image://theme/icon-m-camera-flash-always-pressed"
56 onClicked: settings.imageFlashMode = value;
58 savedValue: settings.imageFlashMode
62 normalIcon: "image://theme/icon-m-camera-flash-off"
63 checkedIcon: "image://theme/icon-m-camera-flash-off-pressed"
64 onClicked: settings.imageFlashMode = value;
66 savedValue: settings.imageFlashMode
70 normalIcon: "image://theme/icon-m-camera-flash-red-eye"
71 checkedIcon: "image://theme/icon-m-camera-flash-red-eye-pressed"
72 onClicked: settings.imageFlashMode = value;
74 savedValue: settings.imageFlashMode