Plasma/QMLCalendar: Difference between revisions
Appearance
< Plasma
Start QML Calendar page |
Mitchcurtis (talk | contribs) |
||
(9 intermediate revisions by 2 users not shown) | |||
Line 5: | Line 5: | ||
== The Design == | == The Design == | ||
Frontend done in styleable QtQuickControls, powered by C++/ | 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 == | == The TODO == | ||
* Calendar QML Controls - WIP | * Calendar QML Controls - WIP by Mitch | ||
** weeknumber Control | ** weeknumber Control - tbd | ||
* QQuickCalendarModel (default Qt) - https://codereview.qt-project.org/#change,75431 | |||
* QQuickCalendarModel (default Qt) - | * Figure out Plasma style for QQC - tbd by KDE | ||
* Allow assignment of QML Locale object to C++ QLocale property - https://bugreports.qt-project.org/browse/QTBUG-36125 | |||
* Figure out Plasma style for QQC - tbd | |||
Model properties | == Model properties == | ||
* selectedDate - date selected in the view | * selectedDate - date selected in the view | ||
* first/lastVisibleDate - dates visible in the view | * first/lastVisibleDate - dates visible in the view | ||
* locale - for setting the locale | * locale - for setting the locale | ||
What roles we need in the model | == What roles we need in the model == | ||
* DateRole - returns date for the grid index | * DateRole - returns date for the grid index | ||
* EventsRole - returns list of Event objects | * EventsRole - returns list of Event objects | ||
Line 28: | Line 34: | ||
** Event 2 | ** Event 2 | ||
DateDelegate - needed properties | == DateDelegate - needed properties == | ||
* isCurrentDate | * isCurrentDate | ||
* isCurrentMonth | * isCurrentMonth |
Latest revision as of 15:56, 14 January 2014
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
- Calendar QML Controls - WIP by Mitch
- weeknumber Control - tbd
- QQuickCalendarModel (default Qt) - https://codereview.qt-project.org/#change,75431
- Figure out Plasma style for QQC - tbd by KDE
- Allow assignment of QML Locale object to C++ QLocale property - https://bugreports.qt-project.org/browse/QTBUG-36125
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
- Event 1 (to be done in later version)
DateDelegate - needed properties
- isCurrentDate
- isCurrentMonth