5import org.mauikit.controls as Maui
6import org.mauikit.calendar as Cal
22 implicitHeight: _layout.implicitHeight + topPadding + bottomPadding
30 property alias incidence : incidenceWrapper
36 onIncidenceStartChanged:
38 incidenceStartDateCombo.selectedDate = control.incidence.incidenceStart;
39 incidenceStartTimeCombo.selectedTime = incidenceWrapper.incidenceStart;
40 incidenceStartDateCombo.displayText = incidenceWrapper.incidenceStartDateDisplay;
41 incidenceStartTimeCombo.displayText = incidenceWrapper.incidenceStartTimeDisplay;
44 onIncidenceEndChanged:
46 incidenceEndDateCombo.selectedDate = control.incidence.incidenceEnd;
47 incidenceEndTimeCombo.selectedTime = incidenceWrapper.incidenceEnd;
48 incidenceEndDateCombo.displayText = incidenceWrapper.incidenceEndDateDisplay;
49 incidenceEndTimeCombo.displayText = incidenceWrapper.incidenceEndTimeDisplay;
53 contentItem:
Maui.ScrollColumn
63 label1.text:
i18n(
"Description")
67 Layout.fillWidth:
true
69 text: incidenceWrapper.summary
70 placeholderText:
i18n(`Add a title
for your ${incidenceWrapper.incidenceTypeStr.toLowerCase()}`)
71 onTextChanged: incidenceWrapper.summary = text
73 onAccepted : incidenceWrapper.summary = text
79 label1.text:
i18n(
"Calendar")
84 Layout.fillWidth:
true
86 valueRole:
"collectionColor"
88 model: Cal.CollectionComboBoxModel
90 id: collectionComboBoxModel
91 onCurrentIndexChanged: calendarCombo.currentIndex = currentIndex
92 defaultCollectionId: incidenceWrapper.collectionId;
94 mimeTypeFilter:
if (incidenceWrapper.incidenceType === Cal.IncidenceWrapper.TypeEvent)
96 return [Cal.MimeTypes.calendar]
97 }
else if (incidenceWrapper.incidenceType === Cal.IncidenceWrapper.TypeTodo) {
98 return [Cal.MimeTypes.todo]
100 accessRightsFilter: Cal.Collection.CanCreateItem
104 onCurrentIndexChanged:
if (currentIndex !== -1) {
105 const collection = model.data(model.index(currentIndex, 0), Cal.Collection.CollectionRole);
107 incidenceWrapper.setCollection(collection)
121 label1.text:
i18n(
"All day")
122 enabled: !isNaN(incidenceWrapper.incidenceStart.getTime()) || !isNaN(incidenceWrapper.incidenceEnd.getTime())
127 checked: incidenceWrapper.allDay
132 incidenceWrapper.setIncidenceTimeToNearestQuarterHour();
134 incidenceWrapper.allDay = checked;
141 label1.text:
i18n(
"Start")
145 id: incidenceStartDateCombo
146 Layout.fillWidth:
true
147 displayText: incidenceWrapper.incidenceStartDateDisplay
148 selectedDate: incidenceWrapper.incidenceStart
151 console.log(
"DATE PCIKED", date.getDate(), date.getMonth(), date.getYear())
152 incidenceWrapper.setIncidenceStartDate(date.getDate(), date.getMonth(), date.getYear())
159 id: incidenceStartTimeCombo
160 Layout.fillWidth:
true
161 visible: !allDayCheckBox.checked
163 timeZoneOffset: incidenceWrapper.startTimeZoneUTCOffsetMins
164 displayText: incidenceWrapper.incidenceEndTimeDisplay
165 selectedTime: incidenceWrapper.incidenceStart
168 console.log(
"TIME PICKER", time.getHours(), time.getMinutes())
169 incidenceWrapper.setIncidenceStartTime(time.getHours(), time.getMinutes())
178 label1.text:
i18n(
"End")
182 id: incidenceEndDateCombo
183 Layout.fillWidth:
true
184 displayText: incidenceWrapper.incidenceStartDateDisplay
185 selectedDate: incidenceWrapper.incidenceStart
188 incidenceWrapper.setIncidenceEndDate(date.getDate(), date.getMonth(), date.getYear())
195 id: incidenceEndTimeCombo
196 Layout.fillWidth:
true
197 visible: !allDayCheckBox.checked
198 timeZoneOffset: incidenceWrapper.endTimeZoneUTCOffsetMins
199 displayText: incidenceWrapper.incidenceEndTimeDisplay
200 selectedTime: incidenceWrapper.incidenceEnd
203 incidenceWrapper.setIncidenceEndTime(hours, minutes)
212 label1.text:
i18n(
"TimeZone")
216 Layout.fillWidth:
true
217 model: Cal.TimeZoneListModel
224 currentIndex: model ? timeZonesModel.getTimeZoneRow(incidenceWrapper.timeZone) : -1
226 onActivated: incidenceWrapper.timeZone = currentValue
QString i18n(const char *text, const TYPE &arg...)