diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-08-05 12:21:13 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-08-06 15:20:46 +0200 |
commit | bbc8fcaefa1cc4c8dafb4d1453990154c7b00d3c (patch) | |
tree | 743018b0719338cf0fc560c2a59ecc2219bb4aed /views | |
parent | 0d929de1743e9574f7972c9f5b84592202601a00 (diff) | |
download | kube-bbc8fcaefa1cc4c8dafb4d1453990154c7b00d3c.tar.gz kube-bbc8fcaefa1cc4c8dafb4d1453990154c7b00d3c.zip |
A calendar filter
Diffstat (limited to 'views')
-rw-r--r-- | views/calendar/qml/View.qml | 7 | ||||
-rw-r--r-- | views/calendar/qml/WeekView.qml | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/views/calendar/qml/View.qml b/views/calendar/qml/View.qml index 3fc5d021..ac446b88 100644 --- a/views/calendar/qml/View.qml +++ b/views/calendar/qml/View.qml | |||
@@ -120,7 +120,8 @@ RowLayout { | |||
120 | } | 120 | } |
121 | spacing: Kube.Units.smallSpacing | 121 | spacing: Kube.Units.smallSpacing |
122 | Repeater { | 122 | Repeater { |
123 | model: Kube.EntityModel { | 123 | model: Kube.CheckableEntityModel { |
124 | id: calendarModel | ||
124 | type: "calendar" | 125 | type: "calendar" |
125 | roles: ["name", "color"] | 126 | roles: ["name", "color"] |
126 | } | 127 | } |
@@ -131,7 +132,8 @@ RowLayout { | |||
131 | spacing: Kube.Units.smallSpacing | 132 | spacing: Kube.Units.smallSpacing |
132 | Kube.CheckBox { | 133 | Kube.CheckBox { |
133 | opacity: 0.9 | 134 | opacity: 0.9 |
134 | checked: true | 135 | checked: model.checked |
136 | onToggled: model.checked = checked | ||
135 | } | 137 | } |
136 | Kube.Label { | 138 | Kube.Label { |
137 | text: model.name | 139 | text: model.name |
@@ -158,5 +160,6 @@ RowLayout { | |||
158 | Layout.fillWidth: true | 160 | Layout.fillWidth: true |
159 | currentDate: root.currentDate | 161 | currentDate: root.currentDate |
160 | startDate: root.selectedDate | 162 | startDate: root.selectedDate |
163 | calendarFilter: calendarModel.checkedEntities | ||
161 | } | 164 | } |
162 | } | 165 | } |
diff --git a/views/calendar/qml/WeekView.qml b/views/calendar/qml/WeekView.qml index 980ec432..2d16b772 100644 --- a/views/calendar/qml/WeekView.qml +++ b/views/calendar/qml/WeekView.qml | |||
@@ -30,6 +30,7 @@ FocusScope { | |||
30 | property var hourHeight: Kube.Units.gridUnit * 2 | 30 | property var hourHeight: Kube.Units.gridUnit * 2 |
31 | property date currentDate | 31 | property date currentDate |
32 | property date startDate: currentDate | 32 | property date startDate: currentDate |
33 | property var calendarFilter | ||
33 | 34 | ||
34 | Item { | 35 | Item { |
35 | anchors { | 36 | anchors { |
@@ -94,6 +95,7 @@ FocusScope { | |||
94 | model: Kube.DayLongEventModel { | 95 | model: Kube.DayLongEventModel { |
95 | start: root.startDate | 96 | start: root.startDate |
96 | length: root.daysToShow | 97 | length: root.daysToShow |
98 | calendarFilter: root.calendarFilter | ||
97 | } | 99 | } |
98 | 100 | ||
99 | delegate: Item { | 101 | delegate: Item { |
@@ -181,6 +183,7 @@ FocusScope { | |||
181 | model: Kube.PeriodDayEventModel { | 183 | model: Kube.PeriodDayEventModel { |
182 | start: root.startDate | 184 | start: root.startDate |
183 | length: root.daysToShow | 185 | length: root.daysToShow |
186 | calendarFilter: root.calendarFilter | ||
184 | } | 187 | } |
185 | delegate: Rectangle { | 188 | delegate: Rectangle { |
186 | id: dayDelegate | 189 | id: dayDelegate |