First attempt at removing QtQuick 1.1 hardcoding from qml files.
[harmattan/cameraplus] / qml / ImageIsoButton.qml
1 // -*- qml -*-
2
3 /*!
4  * This file is part of CameraPlus.
5  *
6  * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21  */
22
23 @IMPORT_QT_QUICK@
24 import com.nokia.meego 1.1
25 import QtCamera 1.0
26 import "data.js" as Data
27
28 ToolIcon {
29     id: button
30
31     iconSource: "image://theme/" + Data.isoIcon(settings.imageIso)
32
33     property list<Item> items: [
34         Label {
35             height: parent ? parent.height : 0
36             text: qsTr("ISO")
37             verticalAlignment: Text.AlignVCenter
38         },
39         Button {
40             property int value: 0
41             onClicked: settings.imageIso = value
42             text: qsTr("Auto")
43             width: 100
44             checked: settings.imageIso == value
45             anchors.verticalCenter: parent ? parent.verticalCenter : undefined
46         },
47         Button {
48             property int value: 100
49             onClicked: settings.imageIso = value
50             text: value
51             width: 100
52             checked: settings.imageIso == value
53             anchors.verticalCenter: parent ? parent.verticalCenter : undefined
54         },
55         Button {
56             property int value: 200
57             onClicked: settings.imageIso = value
58             text: value
59             width: 100
60             checked: settings.imageIso == value
61             anchors.verticalCenter: parent ? parent.verticalCenter : undefined
62         },
63         Button {
64             property int value: 400
65             onClicked: settings.imageIso = value
66             text: value
67             width: 100
68             checked: settings.imageIso == value
69             anchors.verticalCenter: parent ? parent.verticalCenter : undefined
70         },
71         Button {
72             property int value: 800
73             onClicked: settings.imageIso = value
74             text: value
75             width: 100
76             checked: settings.imageIso == value
77             anchors.verticalCenter: parent ? parent.verticalCenter : undefined
78         }
79     ]
80 }