QML Calendar, issues with making a selection

Mark markg85 at gmail.com
Tue Jul 17 14:45:46 UTC 2012


On Tue, Jul 17, 2012 at 4:15 PM, Sebastian Kügler <sebas at kde.org> wrote:
> 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
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel at kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel

Hi Sebas,

I am in fact already doing that to calculate in which cell i currently
am pressing the mouse. That's working fine and probably has to stay no
matter which solution i end up using. The issue comes when i make
dynamic elements. If i do that i can't do any of the following
anymore:
- find it and drag it around (required an id)
- reparent (required an id)
- put it in a Column for multiple events starting at the same time
(required an id)
- ...

Cheers,
Mark


More information about the Plasma-devel mailing list