-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathSettingsDialog.qml
150 lines (141 loc) · 5.64 KB
/
SettingsDialog.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/*****************************************************************************
* Copyright: 2011-2013 Michael Zanetti <[email protected]> *
* *
* This file is part of Xbmcremote *
* *
* Xbmcremote is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* Xbmcremote is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
* *
****************************************************************************/
import QtQuick 1.1
import com.nokia.meego 1.0
Sheet {
id: settingsDialog
acceptButtonText: qsTr("Save")
rejectButtonText: qsTr("Cancel")
content: Flickable {
height: parent.height
width: parent.width
contentHeight: settingsCol.height
Column {
id: settingsCol
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: appWindow.pageMargin
spacing: 10
SectionHeader {
headerText: qsTr("Look and feel")
width: parent.width
}
CheckBox {
id: cbInvertTheme
text: qsTr("Invert theme")
checked: settings.themeInverted
}
CheckBox {
id: cbUseThumbnails
text: qsTr("Use Thumbnails")
checked: settings.useThumbnails
}
CheckBox {
id: cbKeepDisplayLit
text: qsTr("Keep display on when charging")
checked: settings.keepDisplayLit
}
CheckBox {
id: cbIgnoreArticle
text: qsTr("Ignore articles for sorting")
checked: settings.ignoreArticle
}
Row {
width: parent.width
CheckBox {
id: cbMusicEnabled
text: qsTr("Music")
checked: settings.musicEnabled
width: parent.width / 2
}
CheckBox {
id: cbVideosEnabled
text: qsTr("Videos")
checked: settings.videosEnabled
width: parent.width / 2
}
}
Row {
width: parent.width
CheckBox {
id: cbPicturesEnabled
text: qsTr("Pictures")
checked: settings.picturesEnabled
width: parent.width / 2
}
CheckBox {
id: cbPvrEnabled
text: qsTr("TV Channels")
checked: settings.pvrEnabled
width: parent.width / 2
}
}
SectionHeader {
headerText: qsTr("Phone calls")
width: parent.width
}
CheckBox {
id: cbChangeVol
text: qsTr("Change volume")
checked: settings.changeVolumeOnCall
}
Slider {
id: slVolume
width: parent.width - 20
anchors.right: parent.right
value: settings.volumeOnCall
enabled: cbChangeVol.checked
maximumValue: 100
}
CheckBox {
id: cbPauseVideo
text: qsTr("Pause video")
checked: settings.pauseVideoOnCall
}
CheckBox {
id: cbPauseMusic
text: qsTr("Pause music")
checked: settings.pauseMusicOnCall
}
CheckBox {
id: cbShowNotifications
text: qsTr("Show call notifications")
checked: settings.showCallNotifications
}
}
}
onAccepted: {
console.log("sheet accepted")
theme.inverted = cbInvertTheme.checked;
settings.themeInverted = cbInvertTheme.checked
settings.keepDisplayLit = cbKeepDisplayLit.checked
settings.ignoreArticle = cbIgnoreArticle.checked
settings.changeVolumeOnCall = cbChangeVol.checked
settings.volumeOnCall = slVolume.value
settings.pauseMusicOnCall = cbPauseMusic.checked
settings.pauseVideoOnCall = cbPauseVideo.checked
settings.useThumbnails = cbUseThumbnails.checked
settings.showCallNotifications = cbShowNotifications.checked
settings.musicEnabled = cbMusicEnabled.checked
settings.videosEnabled = cbVideosEnabled.checked
settings.picturesEnabled = cbPicturesEnabled.checked
settings.pvrEnabled = cbPvrEnabled.checked
}
}