QML Calendar, issues with making a selection

Sebastian Kügler sebas at kde.org
Tue Jul 17 14:15:45 UTC 2012


On Tuesday, July 17, 2012 15:46:47 Mark wrote:
[...]
> Right now i only see one possible "kind of clean" way to do this.
> Maintain all the events in C++ (which i was already planning on
> doing), but also maintaining where every event should be placed in X
> and Y. I wasn't planning on doing that before.. So that means that the
> C++ side decides where a "event" is going to be placed and how big it
> is. The QML side will then simply be used to put an element on those
> coordinates. I'm not sure - at all - how this is going to work when i
> want to drag/drop an even to some later/earlier point or make the
> duration longer/shorter. Originally my plan was to only proved a start
> and end time from the C++ side and then use QML to put the elements at
> those time slots. That will work somewhat, but will become a real pain
> when you have overlapping events since every event is made dynamically
> thus i can't reparent or use anything that needs an id. The
> "advantage" of C++ here is that i can fairly easy figure out which
> components will overlap and apply whatever i want to apply.

You could try working with the mouse events, and then making sense of the 
coordinates compared to your dates and times (mouse.x and mouse.y in 
particular).
-- 
sebas

http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9


More information about the Plasma-devel mailing list