29
29
title: i18n.tr("Notifications")
31
NotificationsManager {
32
id: notificationsManager
37
height: labelSubtitle.height + units.gu(2)
40
text: i18n.tr("Selected apps can alert you using notification bubbles, sounds, vibrations, and the Notifications list.")
41
wrapMode: Text.WordWrap
33
clickAppsSoundsNotifyModel.updateEnabledEntries()
34
clickAppsVibrationsNotifyModel.updateEnabledEntries()
49
highlightWhenPressed: false
38
ClickApplicationsNotifyModel {
39
id: clickAppsSoundsNotifyModel
40
objectName: "clickAppsSoundsNotifyModel"
41
notifyType: ClickApplicationsNotifyModel.SoundsNotify
42
sourceModel: ClickApplicationsModel
45
ClickApplicationsNotifyModel {
46
id: clickAppsVibrationsNotifyModel
47
objectName: "clickAppsVibrationsNotifyModel"
48
notifyType: ClickApplicationsNotifyModel.VibrationsNotify
49
sourceModel: ClickApplicationsModel
57
57
right: parent.right
59
59
bottom: parent.bottom
61
model: notificationsManager.model
61
model: ClickApplicationsModel
63
contentHeight: contentItem.childrenRect.height
65
delegate: ListItem.Standard {
67
Component.onCompleted: {
68
if (modelData.icon.search("/") == -1) {
69
iconName = modelData.icon
72
iconSource = modelData.icon
76
checked: modelData.status
79
modelData.status = checked;
71
height: labelSubtitle.height + units.gu(2)
74
text: i18n.tr("Apps can alert you using sounds, vibrations, notification bubbles and the Notification list.")
75
wrapMode: Text.WordWrap
76
color: theme.palette.normal.backgroundSecondaryText
81
topMargin: units.gu(1)
85
highlightWhenPressed: false
90
title.text: i18n.tr("Apps that notify with sound");
92
objectName: "clickAppsSoundsNotifyLabel"
93
text: clickAppsSoundsNotifyModel.count
94
SlotsLayout.position: SlotsLayout.Trailing;
98
SlotsLayout.position: SlotsLayout.Trailing;
104
if (clickAppsSoundsNotifyModel.count <= 0) {
108
pageStack.push(Qt.resolvedUrl("ClickAppsSoundsNotify.qml"),
109
{ model: clickAppsSoundsNotifyModel })
115
title.text: i18n.tr("Apps that notify with vibration");
117
objectName: "clickAppsVibrationsNotifyLabel"
118
text: clickAppsVibrationsNotifyModel.count
119
SlotsLayout.position: SlotsLayout.Trailing;
123
SlotsLayout.position: SlotsLayout.Trailing;
129
if (clickAppsVibrationsNotifyModel.count <= 0) {
133
pageStack.push(Qt.resolvedUrl("ClickAppsVibrationsNotify.qml"),
134
{ model: clickAppsVibrationsNotifyModel })
140
title.text: i18n.tr("Applications:")
141
title.color: theme.palette.normal.backgroundSecondaryText
148
height: layout.height + (divider.visible ? divider.height : 0)
150
onClicked: pageStack.push(Qt.resolvedUrl("ClickAppNotifications.qml"),
157
Component.onCompleted: {
158
var iconPath = model.icon.toString()
159
if (iconPath.search("/") == -1) {
160
icon.name = model.icon
162
icon.source = model.icon
166
title.text: model.displayName
168
if (!model.enableNotifications) {
169
return i18n.tr("No notifications")
173
if (model.soundsNotify) {
174
arr.push(i18n.tr("Sounds"))
176
if (model.vibrationsNotify) {
177
arr.push(i18n.tr("Vibrations"))
179
if (model.bubblesNotify) {
180
arr.push(i18n.tr("Bubbles"))
182
if (model.listNotify) {
183
arr.push(i18n.tr("Notification List"))
186
return arr.join(", ")
190
SlotsLayout.position: SlotsLayout.Leading;
195
SlotsLayout.position: SlotsLayout.Trailing;