Activated the option to disable capture previews
[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 import QtCamera 1.0
25
26 Column {
27     property Camera camera
28
29     id: col
30     spacing: 10
31     width: parent.width
32
33     CameraLabel {
34         font.pixelSize: 36
35         text: qsTr("Camera settings")
36         width: parent.width
37     }
38
39     SectionHeader {
40         text: qsTr("Camera")
41     }
42
43     Row {
44         anchors.horizontalCenter: parent.horizontalCenter
45         enabled: camera != null && camera.running && camera.idle
46
47         CameraButton {
48             text: qsTr("Back (Primary)");
49             checkable: true
50             checked: settings.device == 0
51             onClicked: settings.device = 0
52         }
53
54         CameraButton {
55             text: qsTr("Front (Secondary)");
56             checkable: true
57             checked: settings.device == 1
58             onClicked: settings.device = 1
59         }
60     }
61
62     CameraTextSwitch {
63         text: qsTr("Show grid lines")
64
65         checked: settings.gridEnabled
66         onCheckedChanged: settings.gridEnabled = checked
67     }
68
69     SectionHeader {
70         text: qsTr("Creator name")
71     }
72
73     CameraTextField {
74         placeholderText: qsTr("Name or copyright")
75         width: parent.width
76         text: settings.creatorName
77         onTextChanged: settings.creatorName = text
78     }
79
80     CameraTextSwitch {
81         text: qsTr("Use zoom keys for capture")
82         checked: settings.zoomAsShutter
83         onCheckedChanged: settings.zoomAsShutter = checked
84     }
85
86     CameraTextSwitch {
87         text: qsTr("Use proximity sensor for capture")
88
89         checked: settings.proximityAsShutter
90         onCheckedChanged: settings.proximityAsShutter = checked
91     }
92
93     CameraTextSwitch {
94         text: qsTr("Enable camera sounds")
95
96         checked: settings.soundEnabled
97         onCheckedChanged: settings.soundEnabled = checked
98     }
99
100     CameraTextSwitch {
101         text: qsTr("Preview images and videos after capturing")
102         checked: settings.enablePreview
103         onCheckedChanged: settings.enablePreview = checked
104     }
105
106     CameraTextSwitch {
107         id: useGps
108         text: qsTr("Use GPS")
109
110         checked: settings.useGps
111         onCheckedChanged: settings.useGps = checked
112     }
113
114     CameraTextSwitch {
115         // TODO: transition when hiding/showing and we should scroll a bit to show it
116         visible: useGps.checked
117
118         text: qsTr("Use geotags")
119         checked: settings.useGeotags
120         onCheckedChanged: settings.useGeotags = checked
121     }
122 }