Calendar API QML: Difference between revisions

From KDE Community Wiki
(Created page with "=DRAFT= This document just serves as draft for developing a QML Calendar API. =Calendar component= <syntaxhighlight lang="javascript"> Calendar { startDate: QDateTime e...")
 
Line 2: Line 2:
This document just serves as draft for developing a QML Calendar API.
This document just serves as draft for developing a QML Calendar API.


=Calendar component=
=CalendarData component=


<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
Calendar {
CalendarData {
   startDate: QDateTime  
   startDate: QDateTime  
   endDate: QDateTime  
   endDate: QDateTime  

Revision as of 22:11, 2 March 2013

DRAFT

This document just serves as draft for developing a QML Calendar API.

CalendarData component

CalendarData {
  startDate: QDateTime 
  endDate: QDateTime 
  types: Calendar.Event | Calendar.Todo | etc..
  errorMessage: QString
  loading: bool
  model: QAbstractItemModel
}

startDate

If start date is set the model will be populated with events that occur/reoccur from the date on.

endDate

If end date is set the model will be populated with events that occur/reoccur till the date on.

types

Types defines the kind of entries that will be populated by the model.

Calendar.Event

Items of type Calendar.Event provide the following roles: ... long list ..

Calendar.Todo

Items of type Calendar.Todo provide the following roles: ... long list ..

Calendar.Journal

Items of type Calendar.Journal provide the following roles: ... long list ..

errorMessage

If there is an error in the PIM backend, the errorMessage property will contain a user visible description.

loading

While the model is fetching data, this value will be true. False otherwise.

model

Containt a QAbstractItemModel that can used directly in a QtQuick ListView.