400.1.1
by mihirsoni-123
Added copyright header comments in all the pages |
1 |
/*
|
400.1.2
by mihirsoni-123
updated copyright year |
2 |
* Copyright (C) 2013-2014 Canonical Ltd
|
400.1.1
by mihirsoni-123
Added copyright header comments in all the pages |
3 |
*
|
4 |
* This file is part of Ubuntu Calendar App
|
|
5 |
*
|
|
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.
|
|
9 |
*
|
|
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.
|
|
14 |
*
|
|
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/>.
|
|
17 |
*/
|
|
192.2.1
by Kunal Parmar
Reminder support added |
18 |
.pragma library |
19 |
||
192.2.3
by Kunal Parmar
Merge from Trunk |
20 |
.import QtOrganizer 5.0 as QtPim |
21 |
||
22 |
var recurrenceLabel = getRecurrenceLabels(); |
|
211.2.1
by Mihir
Added limit functionality to event |
23 |
var limitLabel = getLimitLabels(); |
286.1.1
by Mihir Soni
Added repeate week days |
24 |
var weekLabel = getWeekLabels(); |
286.1.16
by Mihir Soni
changes as per review comments |
25 |
// It contains multiple weekly entries to handle following occurence
|
26 |
//1.Every Weekday (Monday to Friday
|
|
27 |
//2.Every Monday, Wednesday and Friday
|
|
28 |
//3.Every Tuesday and Thursday
|
|
29 |
//4.Weekly
|
|
192.2.3
by Kunal Parmar
Merge from Trunk |
30 |
var recurrenceValue = [ QtPim.RecurrenceRule.Invalid, |
286.1.3
by Mihir Soni
cleande the code |
31 |
QtPim.RecurrenceRule.Daily, |
32 |
QtPim.RecurrenceRule.Weekly, |
|
286.1.16
by Mihir Soni
changes as per review comments |
33 |
QtPim.RecurrenceRule.Weekly, |
34 |
QtPim.RecurrenceRule.Weekly, |
|
35 |
QtPim.RecurrenceRule.Weekly, |
|
286.1.3
by Mihir Soni
cleande the code |
36 |
QtPim.RecurrenceRule.Monthly, |
37 |
QtPim.RecurrenceRule.Yearly]; |
|
192.2.3
by Kunal Parmar
Merge from Trunk |
38 |
|
39 |
function getRecurrenceLabels() { |
|
372.1.1
by Kunal Parmar
Moved component to file to ease the translation |
40 |
var component = Qt.createComponent(Qt.resolvedUrl("RecurrenceLabelDefines.qml")); |
41 |
var object = component.createObject(Qt.application); |
|
192.2.3
by Kunal Parmar
Merge from Trunk |
42 |
return object.recurrenceLabel; |
43 |
}
|
|
211.2.1
by Mihir
Added limit functionality to event |
44 |
function getLimitLabels(){ |
372.1.1
by Kunal Parmar
Moved component to file to ease the translation |
45 |
var component = Qt.createComponent(Qt.resolvedUrl("LimitLabelDefines.qml")); |
46 |
var object = component.createObject(Qt.application); |
|
211.2.1
by Mihir
Added limit functionality to event |
47 |
return object.limitLabel; |
48 |
}
|
|
286.1.1
by Mihir Soni
Added repeate week days |
49 |
function getWeekLabels(){ |
50 |
var object = Qt.createQmlObject('\ |
|
463.1.1
by Akiva Avraham
Updated library imports to qtquick-2.3 |
51 |
import QtQuick 2.3;\
|
422.5.1
by Akiva Avraham
Upgraded component library imports |
52 |
import Ubuntu.Components 1.1;\
|
286.1.1
by Mihir Soni
Added repeate week days |
53 |
QtObject {\
|
286.1.12
by Mihir Soni
Change as per review comments |
54 |
property var weekLabel:[Qt.locale().dayName(7,Locale.NarrowFormat),\
|
286.1.7
by Mihir Soni
Added localization form Qt.locale |
55 |
Qt.locale().dayName(1,Locale.NarrowFormat),\
|
56 |
Qt.locale().dayName(2,Locale.NarrowFormat),\
|
|
57 |
Qt.locale().dayName(3,Locale.NarrowFormat),\
|
|
58 |
Qt.locale().dayName(4,Locale.NarrowFormat),\
|
|
59 |
Qt.locale().dayName(5,Locale.NarrowFormat),\
|
|
60 |
Qt.locale().dayName(6,Locale.NarrowFormat)];}', Qt.application, 'weekLabelObj'); |
|
286.1.1
by Mihir Soni
Added repeate week days |
61 |
return object.weekLabel; |
62 |
}
|