Plasma/QMLCalendar

From KDE Community Wiki
Revision as of 15:56, 14 January 2014 by Mitchcurtis (talk | contribs) (→‎The TODO)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

The Goal

Have a QML Calendar Controls shared with Qt as much as possible.

The Design

Frontend done in styleable QtQuickControls, powered by C++/QAbstractItemModel backend, which different parties can extend, filling in their own events system.

The Code

Current code lives in QtQuickControls repo, branch wip/calendar


git clone git://anongit.kde.org/qt/qtquickcontrols.git -b wip/calendar

The TODO

Model properties

  • selectedDate - date selected in the view
  • first/lastVisibleDate - dates visible in the view
  • locale - for setting the locale

What roles we need in the model

  • DateRole - returns date for the grid index
  • EventsRole - returns list of Event objects
    • Event 1 (to be done in later version)
      • Properties: eventType, startDay, endDay, startTime, endTime, ....
    • Event 2

DateDelegate - needed properties

  • isCurrentDate
  • isCurrentMonth