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

List:       kde-pim
Subject:    Re: [Kde-pim] sorting in kaddressbook printout etc.
From:       Tobias Koenig <tokoe () kde ! org>
Date:       2002-09-02 10:53:42
[Download RAW message or body]

On Mon, Sep 02, 2002 at 08:16:12AM +0200, Jost Schenck wrote:
> Hi,
Hi Jost,

> Looking into it, I found that query-functions in KABC::AddressBook (like 
> findByEmail etc.) return Addressee::List, which is basically a 
> QValueList<Addressee>. This obviously does not offer any sorting facilities 
> as QValueList can not now about Addressee-specific sorting criteria. So, how 
> does a program that needs a sorted collection of addressees cope with this 
> situation? 
You can sort a QValueList with the qHeapSort() method. For using this method
KABC::Addressee would have to provide an
	operator>(const Addressee&)
and
	operator<(const Addressee&)

> One certainly could write helper functions that sort an Addressee::List by 
> certain criteria. But probably it would be nicer to encapsulate this 
> functionality in a class AddresseeCollection or similar. This would basically 
> encapsulate a list but would also offer different sorting criteria and an 
> iterator with a defined order.
I think that's the best idea. My above mentioned has the disadvantage that
you can sort for only one specific part of addressee.

> And yes, I'd volunteer
Fine

> I just need time to get to know your code and get a start :)
If you have questions feel free to ask me.

Ciao,
Tobias
-- 
In a world without walls and fences who
needs Windows and Gates???
_______________________________________________
kde-pim mailing list
kde-pim@mail.kde.org
http://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