KABC::AddresseeList Class Reference
a QValueList of Addressee, with sorting functionality More...
#include <addresseelist.h>
Inheritance diagram for KABC::AddresseeList:

Public Member Functions | |
AddresseeList (const AddresseeList &) | |
AddresseeList (const QValueList< Addressee > &) | |
void | dump () const |
Debug output. | |
void | setReverseSorting (bool r=true) |
Determines the direction of sorting. | |
bool | reverseSorting () const |
Returns the direction of sorting. | |
void | sortBy (SortingCriterion c) |
Sorts this list by a specific criterion. | |
void | sortByField (Field *field) |
void | sort () |
Sorts this list by its active sorting criterion. | |
template<class Trait> void | sortByTrait () |
Templated sort function. | |
SortingCriterion | sortingCriterion () const |
Returns the active sorting criterion, ie the sorting criterion that will be used by a sort call. |
Detailed Description
a QValueList of Addressee, with sorting functionalityThis class extends the functionality of QValueList with sorting methods specific to the Addressee class. It can be used just like any other QValueList but is no template class.
An AddresseeList does not automatically keep sorted when addressees are added or removed or the sorting order is changed, as this would slow down larger operations by sorting after every step. So after such operations you have to call sort or sortBy to create a defined order again.
Iterator usage is inherited by QValueList and extensively documented there. Please remember that the state of an iterator is undefined after any sorting operation.
For the enumeration Type SortingCriterion, which specifies the field by the collection will be sorted, the following values exist: Uid, Name, FormattedName, FamilyName, GivenName.
- Author:
- Jost Schenck jost@schenck.de
Definition at line 108 of file addresseelist.h.
Member Function Documentation
|
Debug output.
Definition at line 126 of file addresseelist.cpp. References QValueList< Addressee >::begin(), QValueList< Addressee >::const_iterator(), and QValueList< Addressee >::end(). |
|
Determines the direction of sorting. On change, the list will not automatically be resorted.
Definition at line 126 of file addresseelist.h. |
|
Returns the direction of sorting.
Definition at line 132 of file addresseelist.h. |
|
Sorts this list by a specific criterion.
Definition at line 155 of file addresseelist.cpp. Referenced by sort(). |
|
Sorts this list by its active sorting criterion.
This normally is the criterion of the last sortBy operation or Please note that the sorting trait of the last sortByTrait method call is not remembered and thus the action can not be repeated by this method. Definition at line 173 of file addresseelist.cpp. References sortBy(). |
|
Templated sort function. You normally will not want to use this but sortBy and sort instead as the existing sorting criteria completely suffice for most cases. However, if you do want to use some special sorting criterion, you can write a trait class that will be provided to this templated method. This trait class has to have a class declaration like the following:
|
|
Returns the active sorting criterion, ie the sorting criterion that will be used by a sort call.
Definition at line 186 of file addresseelist.h. |
The documentation for this class was generated from the following files: