diff options
author | Minijackson <minijackson@riseup.net> | 2018-05-14 16:19:43 +0200 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2018-05-15 11:36:32 +0200 |
commit | b234c6c74ba76e8d58ab9a55ab1054eb761697e1 (patch) | |
tree | 116d2ec96bb51919ae7c1c274b31178f1faf059b /views | |
parent | d353ec997f06891455dce9b51333687da670a03e (diff) | |
download | kube-b234c6c74ba76e8d58ab9a55ab1054eb761697e1.tar.gz kube-b234c6c74ba76e8d58ab9a55ab1054eb761697e1.zip |
Implement DayLongEventModel and integrate it to calendar
Diffstat (limited to 'views')
-rw-r--r-- | views/calendar/main.qml | 59 | ||||
-rw-r--r-- | views/calendar/qml/DaylongEvents.qml | 18 | ||||
-rw-r--r-- | views/calendar/qml/WeekView.qml | 5 |
3 files changed, 66 insertions, 16 deletions
diff --git a/views/calendar/main.qml b/views/calendar/main.qml index 26898685..e3915e74 100644 --- a/views/calendar/main.qml +++ b/views/calendar/main.qml | |||
@@ -74,10 +74,67 @@ ApplicationWindow { | |||
74 | { | 74 | { |
75 | resource: "caldavresource", | 75 | resource: "caldavresource", |
76 | summary: "Test Event4", | 76 | summary: "Test Event4", |
77 | description: "This is test event #3", | 77 | description: "This is test event #4", |
78 | starts: "2018-04-12T22:00:00", | 78 | starts: "2018-04-12T22:00:00", |
79 | ends: "2018-04-15T03:00:00", | 79 | ends: "2018-04-15T03:00:00", |
80 | }, | 80 | }, |
81 | { | ||
82 | resource: "caldavresource", | ||
83 | summary: "!!! Test Event5", | ||
84 | description: "!!! This is test event #5", | ||
85 | starts: "2018-04-22T22:00:00", | ||
86 | ends: "2018-04-25T03:00:00", | ||
87 | }, | ||
88 | |||
89 | // Day-long events | ||
90 | { | ||
91 | resource: "caldavresource", | ||
92 | summary: "Test day-long event1", | ||
93 | description: "This is test day-long event #1", | ||
94 | starts: "2018-04-10T00:00:00", | ||
95 | ends: "2018-04-14T00:00:00", | ||
96 | allDay: true, | ||
97 | }, | ||
98 | { | ||
99 | resource: "caldavresource", | ||
100 | summary: "Test day-long event2", | ||
101 | description: "This is test day-long event #2", | ||
102 | starts: "2018-04-11T00:00:00", | ||
103 | ends: "2018-04-23T00:00:00", | ||
104 | allDay: true, | ||
105 | }, | ||
106 | { | ||
107 | resource: "caldavresource", | ||
108 | summary: "Test day-long event3", | ||
109 | description: "This is test day-long event #3", | ||
110 | starts: "2018-04-01T00:00:00", | ||
111 | ends: "2018-04-13T00:00:00", | ||
112 | allDay: true, | ||
113 | }, | ||
114 | { | ||
115 | resource: "caldavresource", | ||
116 | summary: "Test day-long event4", | ||
117 | description: "This is test day-long event #4", | ||
118 | starts: "2018-04-01T00:00:00", | ||
119 | ends: "2018-04-25T00:00:00", | ||
120 | allDay: true, | ||
121 | }, | ||
122 | { | ||
123 | resource: "caldavresource", | ||
124 | summary: "!!! Test day-long event5", | ||
125 | description: "!!! This is test day-long event #5", | ||
126 | starts: "2018-04-01T00:00:00", | ||
127 | ends: "2018-04-05T00:00:00", | ||
128 | allDay: true, | ||
129 | }, | ||
130 | { | ||
131 | resource: "caldavresource", | ||
132 | summary: "!!! Test day-long event6", | ||
133 | description: "!!! This is test day-long event #6", | ||
134 | starts: "2018-04-23T00:00:00", | ||
135 | ends: "2018-04-25T00:00:00", | ||
136 | allDay: true, | ||
137 | }, | ||
81 | ], | 138 | ], |
82 | }], | 139 | }], |
83 | } | 140 | } |
diff --git a/views/calendar/qml/DaylongEvents.qml b/views/calendar/qml/DaylongEvents.qml index 340c9d79..a07b66dd 100644 --- a/views/calendar/qml/DaylongEvents.qml +++ b/views/calendar/qml/DaylongEvents.qml | |||
@@ -1,16 +1,8 @@ | |||
1 | import QtQuick 2.7 | 1 | import QtQuick 2.7 |
2 | 2 | ||
3 | ListModel { | 3 | import org.kube.framework 1.0 as Kube |
4 | ListElement { | 4 | |
5 | color: "#af1a6a" | 5 | Kube.DayLongEventModel { |
6 | starts: 1 | 6 | start: "2018-04-09" |
7 | duration: 4 | 7 | length: 7 |
8 | text: "Baustelle Adalbertstr." | ||
9 | } | ||
10 | ListElement { | ||
11 | color: "#134bab" | ||
12 | starts: 0 | ||
13 | duration: 6 | ||
14 | text: "Urlaub" | ||
15 | } | ||
16 | } | 8 | } |
diff --git a/views/calendar/qml/WeekView.qml b/views/calendar/qml/WeekView.qml index f798e489..5272e6a4 100644 --- a/views/calendar/qml/WeekView.qml +++ b/views/calendar/qml/WeekView.qml | |||
@@ -97,7 +97,8 @@ FocusScope { | |||
97 | width: root.dayWidth * model.duration | 97 | width: root.dayWidth * model.duration |
98 | height: parent.height | 98 | height: parent.height |
99 | x: root.dayWidth * model.starts | 99 | x: root.dayWidth * model.starts |
100 | color: model.color | 100 | //color: model.color |
101 | color: "#af1a6a" | ||
101 | border.width: 1 | 102 | border.width: 1 |
102 | border.color: Kube.Colors.viewBackgroundColor | 103 | border.color: Kube.Colors.viewBackgroundColor |
103 | 104 | ||
@@ -107,7 +108,7 @@ FocusScope { | |||
107 | leftMargin: Kube.Units.smallSpacing | 108 | leftMargin: Kube.Units.smallSpacing |
108 | } | 109 | } |
109 | color: Kube.Colors.highlightedTextColor | 110 | color: Kube.Colors.highlightedTextColor |
110 | text: model.text | 111 | text: model.summary |
111 | } | 112 | } |
112 | } | 113 | } |
113 | } | 114 | } |