• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

kabc

  • kabc
sortmode.h
1/*
2 This file is part of libkabc.
3 Copyright (c) 2004 Tobias Koenig <tokoe@kde.org>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20
21#ifndef KABC_SORTMODE_H
22#define KABC_SORTMODE_H
23
24#include "kabc_export.h"
25#include "addressee.h"
26
27namespace KABC {
28
29class Field;
30
37class KABC_EXPORT SortMode
38{
39 public:
40 virtual ~SortMode();
41
46 virtual bool lesser( const KABC::Addressee &first, const KABC::Addressee &second ) const = 0;
47};
48
54class KABC_EXPORT NameSortMode : public SortMode
55{
56 public:
60 enum NameType {
61 FormattedName,
62 FamilyName,
63 GivenName
64 };
65
71 NameSortMode();
72
83 explicit NameSortMode( NameType type, bool ascending = true );
84
85 virtual ~NameSortMode();
86
90 virtual bool lesser( const KABC::Addressee &first, const KABC::Addressee &second ) const;
91
92 private:
93 class Private;
94 Private *const d;
95
96 Q_DISABLE_COPY( NameSortMode )
97};
98
105class KABC_EXPORT FieldSortMode : public SortMode
106{
107 public:
118 explicit FieldSortMode( KABC::Field *field, bool ascending = true );
119
120 virtual ~FieldSortMode();
121
125 virtual bool lesser( const KABC::Addressee &first, const KABC::Addressee &second ) const;
126
127 private:
128 class Private;
129 Private *const d;
130
131 Q_DISABLE_COPY( FieldSortMode )
132};
133
134}
135
136#endif
KABC::Addressee
address book entry
Definition: addressee.h:79
KABC::FieldSortMode
Implements comparison by an arbitrary field.
Definition: sortmode.h:106
KABC::Field
Represents a field in the Addressbook.
Definition: field.h:47
KABC::NameSortMode
Implements comparison by name.
Definition: sortmode.h:55
KABC::NameSortMode::NameType
NameType
Specifies which parts of the name are used for comparison.
Definition: sortmode.h:60
KABC::NameSortMode::FormattedName
@ FormattedName
use the formatted name, e.g.
Definition: sortmode.h:61
KABC::NameSortMode::FamilyName
@ FamilyName
use the last name, e.g.
Definition: sortmode.h:62
KABC::SortMode
Sort method for sorting an addressee list.
Definition: sortmode.h:38
KABC::SortMode::lesser
virtual bool lesser(const KABC::Addressee &first, const KABC::Addressee &second) const =0
Reimplement this method and return whether the first contact is 'smaller' than the second.
KABC
Class that holds a Calendar Url (FBURL/CALADRURI/CALURI)
Definition: address.h:29
This file is part of the KDE documentation.
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.

kabc

Skip menu "kabc"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal