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

kabc

  • kabc
addresseelist.h
1/*
2 This file is part of libkabc.
3 Copyright (c) 2002 Jost Schenck <jost@schenck.de>
4 2003 Tobias Koenig <tokoe@kde.org>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
20*/
21
22#ifndef KABC_ADDRESSEELIST_H
23#define KABC_ADDRESSEELIST_H
24
25#include "kabc_export.h"
26#include <QtCore/QSharedDataPointer>
27#include <QtCore/QList>
28
29namespace KABC {
30
31class Field;
32class SortMode;
33class Addressee;
34
44namespace SortingTraits {
45
46class KABC_EXPORT Uid
47{
48 public:
52 Uid();
53
57 ~Uid();
58
68 static bool eq( const Addressee &, const Addressee & );
69
79 static bool lt( const Addressee &, const Addressee & );
80
81 private:
82 class Private;
83 Private *const d;
84};
85
86class KABC_EXPORT Name
87{
88 public:
92 Name();
93
97 ~Name();
98
108 static bool eq( const Addressee &, const Addressee & );
109
119 static bool lt( const Addressee &, const Addressee & );
120
121 private:
122 class Private;
123 Private *const d;
124};
125
126class KABC_EXPORT FormattedName
127{
128 public:
132 FormattedName();
133
137 ~FormattedName();
138
148 static bool eq( const Addressee &, const Addressee & );
149
159 static bool lt( const Addressee &, const Addressee & );
160
161 private:
162 class Private;
163 Private *const d;
164};
165
166class KABC_EXPORT FamilyName // fallback to given name
167{
168 public:
172 FamilyName();
173
177 ~FamilyName();
178
189 static bool eq( const Addressee &, const Addressee & );
190
202 static bool lt( const Addressee &, const Addressee & );
203
204 private:
205 class Private;
206 Private *const d;
207};
208
209class KABC_EXPORT GivenName // fallback to family name
210{
211 public:
215 GivenName();
216
220 ~GivenName();
221
232 static bool eq( const Addressee &, const Addressee & );
233
245 static bool lt( const Addressee &, const Addressee & );
246
247 private:
248 class Private;
249 Private *const d;
250};
251
252}
253
257typedef enum {
258 Uid,
259 Name,
260 FormattedName,
261 FamilyName,
262 GivenName
263} SortingCriterion;
264
288class KABC_EXPORT AddresseeList : public QList<Addressee>
289{
290 public:
294 AddresseeList();
295
299 AddresseeList( const AddresseeList & );
300
304 AddresseeList( const QList<Addressee> & );
305
309 ~AddresseeList();
310
317 AddresseeList &operator=( const AddresseeList &other );
318
325 void setReverseSorting( bool reverseSorting = true );
326
331 bool reverseSorting() const;
332
337 void sortBy( SortingCriterion c );
338
344 void sortByField( Field *field = 0 );
345
350 void sortByMode( SortMode *mode = 0 );
351
361 void sort();
362
390 template<class Trait> void sortByTrait();
391
396 SortingCriterion sortingCriterion() const;
397
405 Field *sortingField() const;
406
410 QString toString() const;
411
412 private:
413 class Private;
414 QSharedDataPointer<Private> d;
415};
416
417}
418
419#endif
KABC::AddresseeList
a QValueList of Addressee, with sorting functionality
Definition: addresseelist.h:289
KABC::Addressee
address book entry
Definition: addressee.h:79
KABC::Field
Represents a field in the Addressbook.
Definition: field.h:47
KABC::SortMode
Sort method for sorting an addressee list.
Definition: sortmode.h:38
KABC
Class that holds a Calendar Url (FBURL/CALADRURI/CALURI)
Definition: address.h:29
KABC::SortingCriterion
SortingCriterion
Addressee attribute used for sorting.
Definition: addresseelist.h:257
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