691.3.1
by Gary.Wzl
1.UI fine-tuned for week number display in monthly view(bug #1464407) |
1 |
/*
|
759.1.1
by Nekhelesh Ramananthan
Switched settings page to listitemlayouts |
2 |
* Copyright (C) 2013-2016 Canonical Ltd
|
691.3.1
by Gary.Wzl
1.UI fine-tuned for week number display in monthly view(bug #1464407) |
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 |
*/
|
|
759.1.1
by Nekhelesh Ramananthan
Switched settings page to listitemlayouts |
18 |
|
745.1.1
by Renato Araujo Oliveira Filho
Update to ubuntu sdk 1.3 and qtquick 2.4 |
19 |
import QtQuick 2.4 |
719.1.7
by Alan Pope
Fix Settings page - thanks Dan Chapman |
20 |
import Ubuntu.Components 1.3 |
691.3.1
by Gary.Wzl
1.UI fine-tuned for week number display in monthly view(bug #1464407) |
21 |
|
22 |
Page { |
|
759.1.1
by Nekhelesh Ramananthan
Switched settings page to listitemlayouts |
23 |
id: settingsPage
|
691.3.1
by Gary.Wzl
1.UI fine-tuned for week number display in monthly view(bug #1464407) |
24 |
objectName: "settings" |
25 |
||
26 |
visible: false |
|
27 |
||
759.1.1
by Nekhelesh Ramananthan
Switched settings page to listitemlayouts |
28 |
header: PageHeader { |
745.2.4
by Renato Araujo Oliveira Filho
Merged: lp:~renatofilho/ubuntu-calendar-app/sdk-1-3 |
29 |
title: i18n.tr("Settings") |
759.1.5
by Nekhelesh Ramananthan
Removed square brackets and changed back to ListView |
30 |
leadingActionBar.actions: Action { |
31 |
text: i18n.tr("Back") |
|
32 |
iconName: "back" |
|
33 |
onTriggered: { |
|
34 |
pop() |
|
691.3.1
by Gary.Wzl
1.UI fine-tuned for week number display in monthly view(bug #1464407) |
35 |
}
|
759.1.5
by Nekhelesh Ramananthan
Removed square brackets and changed back to ListView |
36 |
}
|
691.3.1
by Gary.Wzl
1.UI fine-tuned for week number display in monthly view(bug #1464407) |
37 |
}
|
38 |
||
759.1.1
by Nekhelesh Ramananthan
Switched settings page to listitemlayouts |
39 |
Component.onCompleted: { |
759.1.2
by Nekhelesh Ramananthan
Switched CalendarChoicePopup.qml to ListItemLayouts |
40 |
weekCheckBox.checked = mainView.displayWeekNumber |
41 |
lunarCalCheckBox.checked = mainView.displayLunarCalendar |
|
691.3.1
by Gary.Wzl
1.UI fine-tuned for week number display in monthly view(bug #1464407) |
42 |
}
|
43 |
||
44 |
Column { |
|
45 |
id: settingsColumn
|
|
46 |
objectName: "settingsColumn" |
|
759.1.1
by Nekhelesh Ramananthan
Switched settings page to listitemlayouts |
47 |
|
691.3.1
by Gary.Wzl
1.UI fine-tuned for week number display in monthly view(bug #1464407) |
48 |
spacing: units.gu(0.5) |
759.1.1
by Nekhelesh Ramananthan
Switched settings page to listitemlayouts |
49 |
anchors { top: settingsPage.header.bottom; left: parent.left; right: parent.right; bottom: parent.bottom } |
50 |
||
51 |
ListItem { |
|
52 |
height: weekNumberLayout.height + divider.height |
|
53 |
ListItemLayout { |
|
54 |
id: weekNumberLayout
|
|
55 |
title.text: i18n.tr("Show week numbers") |
|
56 |
CheckBox { |
|
57 |
id: weekCheckBox
|
|
58 |
objectName: "weekCheckBox" |
|
59 |
SlotsLayout.position: SlotsLayout.Last |
|
60 |
onCheckedChanged: { |
|
759.1.2
by Nekhelesh Ramananthan
Switched CalendarChoicePopup.qml to ListItemLayouts |
61 |
mainView.displayWeekNumber = weekCheckBox.checked |
759.1.1
by Nekhelesh Ramananthan
Switched settings page to listitemlayouts |
62 |
}
|
63 |
}
|
|
64 |
}
|
|
65 |
}
|
|
66 |
||
67 |
ListItem { |
|
68 |
height: lunarCalLayout.height + divider.height |
|
69 |
ListItemLayout { |
|
70 |
id: lunarCalLayout
|
|
71 |
title.text: i18n.tr("Show lunar calendar") |
|
72 |
CheckBox { |
|
759.1.2
by Nekhelesh Ramananthan
Switched CalendarChoicePopup.qml to ListItemLayouts |
73 |
id: lunarCalCheckBox
|
759.1.1
by Nekhelesh Ramananthan
Switched settings page to listitemlayouts |
74 |
objectName: "lunarCalCheckbox" |
75 |
SlotsLayout.position: SlotsLayout.Last |
|
76 |
onCheckedChanged: { |
|
759.1.2
by Nekhelesh Ramananthan
Switched CalendarChoicePopup.qml to ListItemLayouts |
77 |
mainView.displayLunarCalendar = lunarCalCheckBox.checked |
759.1.1
by Nekhelesh Ramananthan
Switched settings page to listitemlayouts |
78 |
}
|
79 |
}
|
|
80 |
}
|
|
81 |
}
|
|
691.3.1
by Gary.Wzl
1.UI fine-tuned for week number display in monthly view(bug #1464407) |
82 |
}
|
83 |
}
|