• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kabc
 

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 <tqvaluelist.h>
26 
27 #include "addressee.h"
28 
29 namespace KABC {
30 
31 class Field;
32 class SortField;
33 class SortMode;
34 
44 namespace SortingTraits
45 {
46 
47 class KABC_EXPORT Uid
48 {
49  public:
50  static bool eq( const Addressee &, const Addressee & );
51  static bool lt( const Addressee &, const Addressee & );
52 };
53 
54 class KABC_EXPORT Name
55 {
56  public:
57  static bool eq( const Addressee &, const Addressee & );
58  static bool lt( const Addressee &, const Addressee & );
59 };
60 
61 class KABC_EXPORT FormattedName
62 {
63  public:
64  static bool eq( const Addressee &, const Addressee & );
65  static bool lt( const Addressee &, const Addressee & );
66 };
67 
68 class KABC_EXPORT FamilyName // fallback to given name
69 {
70  public:
71  static bool eq( const Addressee &, const Addressee & );
72  static bool lt( const Addressee &, const Addressee & );
73 };
74 
75 class KABC_EXPORT GivenName // fallback to family name
76 {
77  public:
78  static bool eq( const Addressee &, const Addressee & );
79  static bool lt( const Addressee &, const Addressee & );
80 };
81 
82 }
83 
87 typedef enum { Uid, Name, FormattedName, FamilyName, GivenName } SortingCriterion;
88 
112 class KABC_EXPORT AddresseeList : public TQValueList<Addressee>
113 {
114  public:
115  AddresseeList();
116  ~AddresseeList();
117  AddresseeList( const AddresseeList & );
118  AddresseeList( const TQValueList<Addressee> & );
119 
123  void dump() const;
124 
130  void setReverseSorting( bool r = true ) { mReverseSorting = r; }
131 
136  bool reverseSorting() const { return mReverseSorting; }
137 
142  void sortBy( SortingCriterion c );
143 
149  void sortByField( Field *field = 0 );
150 
156  void sortByMode( SortMode *mode = 0 );
157 
167  void sort();
168 
196  template<class Trait> void sortByTrait();
197 
202  SortingCriterion sortingCriterion() const { return mActiveSortingCriterion; }
203 
211  Field* sortingField() const;
212 
213  private:
214  bool mReverseSorting;
215  SortingCriterion mActiveSortingCriterion;
216  //KDE 4.0 - add a d-pointer here!
217 };
218 
219 }
220 
221 #endif

kabc

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

kabc

Skip menu "kabc"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kabc by doxygen 1.8.3.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |