Initial sailfish port
[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 QtQuick 2.0
24 import QtCamera 1.0
25
26 CameraToolIcon {
27     id: button
28
29     iconSource: cameraTheme.isoIcon(settings.imageIso)
30
31     property CameraToolBarTools tools: CameraToolBarTools {
32         CameraLabel {
33             height: parent ? parent.height : 0
34             text: qsTr("ISO")
35             verticalAlignment: Text.AlignVCenter
36         }
37
38         CameraButton {
39             property int value: 0
40             onClicked: settings.imageIso = value
41             text: qsTr("Auto")
42             width: 100
43             checked: settings.imageIso == value
44             anchors.verticalCenter: parent ? parent.verticalCenter : undefined
45         }
46
47         CameraButton {
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
56         CameraButton {
57             property int value: 200
58             onClicked: settings.imageIso = value
59             text: value
60             width: 100
61             checked: settings.imageIso == value
62             anchors.verticalCenter: parent ? parent.verticalCenter : undefined
63         }
64
65         CameraButton {
66             property int value: 400
67             onClicked: settings.imageIso = value
68             text: value
69             width: 100
70             checked: settings.imageIso == value
71             anchors.verticalCenter: parent ? parent.verticalCenter : undefined
72         }
73
74         CameraButton {
75             property int value: 800
76             onClicked: settings.imageIso = value
77             text: value
78             width: 100
79             checked: settings.imageIso == value
80             anchors.verticalCenter: parent ? parent.verticalCenter : undefined
81         }
82     }
83 }