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

tdeabc

  • tdeabc
addresseelist.h
1 /*
2  This file is part of libtdeabc.
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 TDEABC {
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
TDEABC::SortMode
Sort method for sorting an addressee list.
Definition: sortmode.h:36
TDEABC::AddresseeList::setReverseSorting
void setReverseSorting(bool r=true)
Determines the direction of sorting.
Definition: addresseelist.h:130
TDEABC::AddresseeList::reverseSorting
bool reverseSorting() const
Returns the direction of sorting.
Definition: addresseelist.h:136
TDEABC
static data, shared by ALL addressee objects
Definition: address.h:48
TDEABC::AddresseeList
a TQValueList of Addressee, with sorting functionality
Definition: addresseelist.h:112
TDEABC::SortingCriterion
SortingCriterion
Addressee attribute used for sorting.
Definition: addresseelist.h:87
TDEABC::AddresseeList::sortingCriterion
SortingCriterion sortingCriterion() const
Returns the active sorting criterion, ie the sorting criterion that will be used by a sort call...
Definition: addresseelist.h:202
TDEABC::Addressee
address book entry
Definition: addressee.src.h:74

tdeabc

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

tdeabc

Skip menu "tdeabc"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeabc by doxygen 1.8.8
This website is maintained by Timothy Pearson.