• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.9.1 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 
29 namespace KABC {
30 
31 class Field;
32 class SortMode;
33 class Addressee;
34 
44 namespace SortingTraits
45 {
46 
47 class KABC_EXPORT Uid
48 {
49  public:
53  Uid();
54 
58  ~Uid();
59 
69  static bool eq( const Addressee &, const Addressee & );
70 
80  static bool lt( const Addressee &, const Addressee & );
81 
82  private:
83  class Private;
84  Private *const d;
85 };
86 
87 class KABC_EXPORT Name
88 {
89  public:
93  Name();
94 
98  ~Name();
99 
109  static bool eq( const Addressee &, const Addressee & );
110 
120  static bool lt( const Addressee &, const Addressee & );
121 
122  private:
123  class Private;
124  Private *const d;
125 };
126 
127 class KABC_EXPORT FormattedName
128 {
129  public:
133  FormattedName();
134 
138  ~FormattedName();
139 
149  static bool eq( const Addressee &, const Addressee & );
150 
160  static bool lt( const Addressee &, const Addressee & );
161 
162  private:
163  class Private;
164  Private *const d;
165 };
166 
167 class KABC_EXPORT FamilyName // fallback to given name
168 {
169  public:
173  FamilyName();
174 
178  ~FamilyName();
179 
190  static bool eq( const Addressee &, const Addressee & );
191 
203  static bool lt( const Addressee &, const Addressee & );
204 
205  private:
206  class Private;
207  Private *const d;
208 };
209 
210 class KABC_EXPORT GivenName // fallback to family name
211 {
212  public:
216  GivenName();
217 
221  ~GivenName();
222 
233  static bool eq( const Addressee &, const Addressee & );
234 
246  static bool lt( const Addressee &, const Addressee & );
247 
248  private:
249  class Private;
250  Private *const d;
251 };
252 
253 }
254 
258 typedef enum {
259  Uid,
260  Name,
261  FormattedName,
262  FamilyName,
263  GivenName
264 } SortingCriterion;
265 
289 class KABC_EXPORT AddresseeList : public QList<Addressee>
290 {
291  public:
295  AddresseeList();
296 
300  AddresseeList( const AddresseeList & );
301 
305  AddresseeList( const QList<Addressee> & );
306 
310  ~AddresseeList();
311 
318  AddresseeList &operator=( const AddresseeList &other );
319 
326  void setReverseSorting( bool reverseSorting = true );
327 
332  bool reverseSorting() const;
333 
338  void sortBy( SortingCriterion c );
339 
345  void sortByField( Field *field = 0 );
346 
351  void sortByMode( SortMode *mode = 0 );
352 
362  void sort();
363 
391  template<class Trait> void sortByTrait();
392 
397  SortingCriterion sortingCriterion() const;
398 
406  Field *sortingField() const;
407 
411  QString toString() const;
412 
413  private:
414  class Private;
415  QSharedDataPointer<Private> d;
416 };
417 
418 }
419 
420 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Sep 24 2012 09:09:50 by doxygen 1.8.1.1 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.9.1 API Reference

Skip menu "kdepimlibs-4.9.1 API Reference"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • 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