[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-pim
Subject:    Re: [Kde-pim] Sorting of events in 'Month to View', KOrganiser
From:       Reinhold Kainhofer <reinhold () kainhofer ! com>
Date:       2004-09-30 19:59:31
Message-ID: 1096574371.415c65a3631c1 () finanz ! math ! tu-graz ! ac ! at
[Download RAW message or body]

Zitiere Philip Scott <pgs31@cam.ac.uk>:
> I have no idea about the korganizer code, so this is probably complete
> nonesence, but I would try subclassing the ListViewItem, giving it a
> 'time' integer field, or some-such. Then the subclassed ListView could 
> sort based on that, rather than the string?

The problem is that it's not a list VIEW, but a list BOX. And QListBox 
supports sorting only by the text of the list box item. Subclassing the items 
doesn't work either... You'd have to reimplement QListBox::sort().

Changing everything to a list view would of course solve the sorting problem, 
but I think list views carry much more overhead (memorywise), so I don't think 
it's a good idea to have 42 list views...

> If you like, I could drag up the sources and see if I can make a
> patch?

As I said in item 4), when inserting new items to the list box (somewhere in 
KOMonthViewCell, I think. I looked at that code a few days ago because of that 
problem, but was too lazy to actually try to come up with a proper solution.) 
we could just go through the existing items in the list box and insert the new 
one as soon as we have found an item that happens later than the newly 
inserted. Of course, one has to make sure to correctly treat multi-day items 
(which need to be interpreted as starting at midnight for this purpose), and 
recurring items (where one needs to take the date/time of the recurrence, not 
of the original event).

Feel free to poke at the code and come up with a patch. I'll try to help you 
as much as possible...

Reinhold
_______________________________________________
kde-pim mailing list
kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic