Make a new component CameraPositionSource to get rid of QtMobility dependency
[harmattan/cameraplus] / qml / CameraSettings.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
25 Column {
26     id: col
27     spacing: 10
28     width: parent.width
29
30     CameraLabel {
31         font.pixelSize: 36
32         text: qsTr("Camera settings")
33         width: parent.width
34     }
35
36     TextSwitch {
37         text: qsTr("Show grid lines")
38
39         // We have to do it that way because QML complains about a binding
40         // loop for checked if we bind the checked property to the settings value.
41         Component.onCompleted: checked = settings.gridEnabled
42
43         onCheckedChanged: settings.gridEnabled = checked
44     }
45
46     SectionHeader {
47         text: qsTr("Creator name")
48         width: parent.width
49     }
50
51     CameraTextField {
52         placeholderText: qsTr("Name or copyright")
53         width: parent.width
54         text: settings.creatorName
55         onTextChanged: settings.creatorName = text
56     }
57
58     TextSwitch {
59         text: qsTr("Use zoom keys for capture")
60
61         // We have to do it that way because QML complains about a binding
62         // loop for checked if we bind the checked property to the settings value.
63         Component.onCompleted: checked = settings.zoomAsShutter
64         onCheckedChanged: settings.zoomAsShutter = checked
65     }
66
67     TextSwitch {
68         text: qsTr("Enable camera sounds")
69
70         // We have to do it that way because QML complains about a binding
71         // loop for checked if we bind the checked property to the settings value.
72         Component.onCompleted: checked = settings.soundEnabled
73         onCheckedChanged: settings.soundEnabled = checked
74     }
75
76     TextSwitch {
77         id: useGps
78         text: qsTr("Use GPS")
79
80         // We have to do it that way because QML complains about a binding
81         // loop for checked if we bind the checked property to the settings value.
82         Component.onCompleted: checked = settings.useGps
83         onCheckedChanged: settings.useGps = checked
84     }
85
86     TextSwitch {
87         // TODO: transition when hiding/showing and we should scroll a bit to show it
88         visible: useGps.checked
89
90         text: qsTr("Use geotags")
91
92         // We have to do it that way because QML complains about a binding
93         // loop for checked if we bind the checked property to the settings value.
94         Component.onCompleted: checked = settings.useGeotags
95         onCheckedChanged: settings.useGeotags = checked
96     }
97 }