Calendar API QML

From KDE Community Wiki
Revision as of 14:09, 2 March 2013 by Markg85 (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

DRAFT

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

Calendar component

Calendar {
  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.