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

tdeabc

field.h

00001 /*
00002     This file is part of libtdeabc.
00003     Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public License
00016     along with this library; see the file COPYING.LIB.  If not, write to
00017     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018     Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef KABC_FIELD_H
00022 #define KABC_FIELD_H
00023 
00024 #include <tqstring.h>
00025 #include <tqvaluelist.h>
00026 
00027 #include "addressee.h"
00028 
00029 class TDEConfig;
00030 
00031 namespace TDEABC {
00032 
00033 class KABC_EXPORT Field
00034 {
00035   class FieldImpl;
00036   friend class FieldImpl;
00037 
00038 public:
00039   typedef TQValueList<Field *> List;
00040 
00050   enum FieldCategory
00051   {
00052     All = 0x0,
00053     Frequent = 0x01,
00054     Address = 0x02,
00055     Email = 0x04,
00056     Personal = 0x08,
00057     Organization = 0x10,
00058     CustomCategory = 0x20
00059   };
00060 
00064   virtual TQString label();
00065 
00069   virtual int category();
00070 
00074   static TQString categoryLabel( int category );
00075 
00081   virtual TQString value( const TDEABC::Addressee & );
00082 
00087   virtual bool setValue( TDEABC::Addressee &, const TQString & );
00088 
00092   TQString sortKey( const TDEABC::Addressee & );
00093 
00097   virtual bool isCustom();
00098 
00102   virtual bool equals( Field *field );
00103 
00107   static Field::List allFields();
00108 
00112   static Field::List defaultFields();
00113 
00122   static Field *createCustomField( const TQString &label, int category,
00123                                    const TQString &key, const TQString &app );
00124 
00128   static void deleteFields();
00129 
00137   static void saveFields( TDEConfig *cfg, const TQString &identifier,
00138                           const Field::List &fields );
00143   static void saveFields( const TQString &identifier,
00144                           const Field::List &fields );
00145 
00152   static Field::List restoreFields( TDEConfig *cfg, const TQString &identifier );
00153 
00158   static Field::List restoreFields( const TQString &identifier );
00159 
00160 protected:
00161   static void createField( int id, int category = 0 );
00162   static void createDefaultField( int id, int category = 0 );
00163 
00164 private:
00165   Field( FieldImpl * );
00166   virtual ~Field();
00167 
00168   FieldImpl *mImpl;
00169 
00170   static Field::List mAllFields;
00171   static Field::List mDefaultFields;
00172   static Field::List mCustomFields;
00173 };
00174 
00175 }
00176 #endif

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
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeabc by doxygen 1.6.3
This website is maintained by Timothy Pearson.