kabc
#include <sortmode.h>

Public Types | |
enum | NameType { FormattedName , FamilyName , GivenName } |
Public Member Functions | |
NameSortMode () | |
NameSortMode (NameType type, bool ascending=true) | |
virtual bool | lesser (const KABC::Addressee &first, const KABC::Addressee &second) const |
virtual bool | lesser (const KABC::Addressee &first, const KABC::Addressee &second) const =0 |
Detailed Description
Implements comparison by name.
This class implements a comparison of two Addressee objects by name.
Definition at line 54 of file sortmode.h.
Member Enumeration Documentation
◆ NameType
Specifies which parts of the name are used for comparison.
Enumerator | |
---|---|
FormattedName | use the formatted name, e.g. "John Doe" |
FamilyName | use the last name, e.g. "Doe" |
GivenName | use the first name, e.g. "John" |
Definition at line 60 of file sortmode.h.
Constructor & Destructor Documentation
◆ NameSortMode() [1/2]
NameSortMode::NameSortMode | ( | ) |
Constructor.
Creates a NameSortMethod with FormattedName as name type set.
Definition at line 37 of file sortmode.cpp.
◆ NameSortMode() [2/2]
|
explicit |
Constructor.
Creates a NameSortMethod with the specified name type.
- Parameters
-
type The name type. ascending if true
, Addressee object are sorted in ascending order; iffalse
, objects are sorted in descending order
Definition at line 44 of file sortmode.cpp.
◆ ~NameSortMode()
|
virtual |
Definition at line 51 of file sortmode.cpp.
Member Function Documentation
◆ lesser()
|
virtual |
Returns whether the first contact is 'smaller' then the second.
Implements KABC::SortMode.
Definition at line 56 of file sortmode.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.