Adjust the font size for the headers in the settings pages
[harmattan/cameraplus] / qml / VideoSettingsPage.qml
1 // -*- qml -*-
2
3 /*!
4  * This file is part of CameraPlus.
5  *
6  * Copyright (C) 2012 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 1.1
24 import com.nokia.meego 1.1
25 import QtCamera 1.0
26 import CameraPlus 1.0
27
28 import "data.js" as Data
29
30 CameraPage {
31         id: page
32         controlsVisible: false
33         policyMode: CameraResources.Video
34         needsPipeline: false
35
36         Rectangle {
37                 color: "black"
38                 anchors.fill: parent
39         }
40
41         Flickable {
42                 anchors.top: parent.top
43                 anchors.left: parent.left
44                 anchors.right: parent.right
45                 anchors.bottom: toolBar.top
46                 anchors.margins: 10
47                 contentHeight: col.height
48
49                 Column {
50                         id: col
51
52                         width: parent.width
53                         spacing: 10
54
55                         Label {
56                                 font.pixelSize: 36
57                                 text: qsTr("Video settings");
58                         }
59
60                         Row {
61                                 width: parent.width
62
63                                 ListItem {
64                                         id: wb
65                                         width: parent.width / 2
66                                         title: qsTr("White balance");
67                                         subtitle: Data.wbName(settings.videoWhiteBalance);
68                                         iconId: Data.wbSelectedIcon(settings.videoWhiteBalance);
69                                         onClicked: openFile("VideoWhiteBalancePage.qml");
70                                 }
71
72                                 ListItem {
73                                         id: cf
74                                         width: parent.width / 2
75                                         title: qsTr("Color filter");
76                                         subtitle: Data.cfName(settings.videoColorFilter);
77                                         iconId: Data.cfSelectedIcon(settings.videoColorFilter);
78                                         onClicked: openFile("VideoColorFilterPage.qml");
79                                 }
80                         }
81
82                         SectionHeader {
83                                 text: qsTr("Resolution");
84                         }
85
86                         ButtonRow {
87                                 anchors.horizontalCenter: parent.horizontalCenter
88                                 exclusive: false
89
90                                 Repeater {
91                                         id: resolutions
92
93                                         model: videoSettings.resolutions
94
95                                         function name(name, res) {
96                                                 return name.charAt(0).toUpperCase() + name.slice(1) + " " + res;
97                                         }
98
99                                         delegate: Button {
100                                                 text: resolutions.name(resolutionName, resolution);
101                                                 checked: settings.videoResolution == resolutionName;
102                                                 onClicked: {
103                                                         if (!cam.idle) {
104                                                                 showError(qsTr("Camera is busy saving."));
105                                                                 return;
106                                                         }
107
108                                                         settings.videoResolution = resolutionName;
109                                                 }
110                                         }
111                                 }
112                         }
113
114                         CameraSettings {
115                                 anchors.horizontalCenter: parent.horizontalCenter
116                         }
117                 }
118         }
119
120         ToolBar {
121                 id: toolBar
122                 anchors.bottom: parent.bottom
123                 tools: ToolBarLayout {
124                         id: layout
125                         ToolIcon { iconId: "icon-m-toolbar-back"; onClicked: pageStack.pop(); }
126                 }
127         }
128 }