[Kde-pim] QML Calendar UI, have got it

Mark Gaiser markg85 at gmail.com
Mon Mar 24 12:06:37 GMT 2014


On Sun, Mar 23, 2014 at 9:26 AM, 齐迨晢 <qidaizhe11 at gmail.com> wrote:
> Hi,
>
> (Sorry for my poor Engligh)
Don't worry about that, you seem to be doing just fine.
>
> In here[1], I found that Mark is going to custom a whole new C++ component
> for the calender UI. But maybe it's  unnecessary?

Hehe, could very well be unnecessary. The big issue that i have with
QML and the views is specifically the week view. I haven't been able
to make an event that spawns multiple days and is aligned properly. So
for example an event from Wednesday 19th till Friday 21th.

The exact thing i can't get working properly is alignment where there
are multiple events in a week view and one of those spawning multiple
days within the week. I know it is possible to do such a thing by
making a lot of javascript glue code and manually aligning rectangles
at the correct positions. You even seem to be doing that [1] if i read
your code correctly.

It was my intention to make a C++ QML component for the week view
where i do the bookkeeping of events and placement of them within a
week view. I find it easier to manage those kind of specifics from C++
rather then QML.

In all fairness, i think the currently shipped QtQuick library
including all it's plugins just isn't fit for this task without making
a lot of glue code in either C++ or javascript. Also, while this item
is still on the wiki page, i plan to only work on Akonadi and search.
Just to get myself familiar and perhaps try to optimize some areas for
faster indexing and less memory consumption. I doubt i will be
touching any QML this time around :)

>
> Here[2] is my trying, until today, I have make out the month view nearly
> 100% and the week view about 70%. Nearly all of them are impleted just by
> qml.

It is impressive!

The thing i am slightly worried about is the amount of javascript code
within the QML files. It's a lot! Just structure wise it might be
interesting for you to split the javascript out in a few javascript
files and keep functions in there then include those files in QML.

I also wonder what all that javascript is doing performance wise.

>
> Since my English is really poor, I am going to add comments in Chinese,
> sorry about that. By the way, sorry to say that the codes are all in a mess
> now...
>
> Anyway, may it help.

I'm certainly going to sniff around that code and see how you managed
to get it working this far.

From a first glance it looks like you've done a lot already! You
should try and join the PIM sprint if possible :)
It starts friday this week in Barcelona [2].

[1] https://github.com/qidaizhe11/QingfengCalendar/blob/master/qml/QingfengCalendar/WeekView.qml
[2] https://sprints.kde.org/sprint/206

>
> Cheers,
> Feng Qi
> ---------------------------
> [1]: http://community.kde.org/KDE_PIM/Meetings/PIM_Spring_2014_meeting
> [2]: https://github.com/qidaizhe11/QingfengCalendar
> _______________________________________________
> KDE PIM mailing list kde-pim at kde.org
> https://mail.kde.org/mailman/listinfo/kde-pim
> KDE PIM home page at http://pim.kde.org/
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list