2
* Copyright (C) 2014 Canonical Ltd
4
* This file is part of Ubuntu Calendar App
6
* Ubuntu Calendar App is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 3 as
8
* published by the Free Software Foundation.
10
* Ubuntu Calendar App is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
import Ubuntu.Components 1.1
21
import Ubuntu.Components.ListItems 1.0 as ListItem
25
objectName: "eventReminder"
27
property var visualReminder: null
28
property var audibleReminder: null
29
property var reminderModel: null
30
property var eventTitle: null
31
property var reminderTime: visualReminder.secondsBeforeStart
35
title: i18n.tr("Reminder")
37
head.backAction: Action{
40
visualReminder.repetitionCount = 3;
41
visualReminder.repetitionDelay = 120;
42
visualReminder.message = eventTitle
43
visualReminder.secondsBeforeStart = reminderTime;
45
audibleReminder.repetitionCount = 3;
46
audibleReminder.repetitionDelay = 120;
47
audibleReminder.secondsBeforeStart = reminderTime;
58
contentHeight: reminderModel.count * units.gu(7)
77
property alias isChecked: reminderCheckbox.checked
83
checked: root.reminderTime === value
86
root.reminderTime = value
88
// Ensures only one reminder option is selected
89
for(var i=0; i<reminderModel.count; i++) {
90
if(_reminders.itemAt(i).isChecked &&
92
_reminders.itemAt(i).isChecked = false