• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • KDE Home
  • Contact Us
 

kabc

field.h

00001 /*
00002     This file is part of libkabc.
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 "addressee.h"
00025 #include <QtCore/QString>
00026 
00027 class KConfigGroup;
00028 
00029 namespace KABC {
00030 
00046 class KABC_EXPORT Field
00047 {
00048   public:
00052     typedef QList<Field *> List;
00053 
00057     enum FieldCategory {
00061       All = 0x0,
00065       Frequent = 0x01,
00069       Address = 0x02,
00074       Email = 0x04,
00078       Personal = 0x08,
00083       Organization = 0x10,
00087       CustomCategory = 0x20
00088     };
00089 
00093     virtual QString label();
00094 
00098     virtual int category();
00099 
00106     static QString categoryLabel( int category );
00107 
00115     virtual QString value( const KABC::Addressee & );
00116 
00123     virtual bool setValue( KABC::Addressee &, const QString & );
00124 
00128     QString sortKey( const KABC::Addressee & );
00129 
00135     virtual bool isCustom();
00136 
00143     virtual bool equals( Field *field );
00144 
00148     static Field::List allFields();
00149 
00153     static Field::List defaultFields();
00154 
00163     static Field *createCustomField( const QString &label, int category,
00164                                      const QString &key, const QString &app );
00165 
00169     static void deleteFields();
00170 
00178     static void saveFields( KConfigGroup &cfg, const QString &identifier,
00179                             const Field::List &fields );
00188     static void saveFields( const QString &identifier,
00189                             const Field::List &fields );
00190 
00197     static Field::List restoreFields( const KConfigGroup &cfg, const QString &identifier );
00198 
00206     static Field::List restoreFields( const QString &identifier );
00207 
00208   protected:
00217     static void createField( int id, int category = 0 );
00218 
00227     static void createDefaultField( int id, int category = 0 );
00228 
00229   private:
00230     class Private;
00231 
00232     Field( Private * );
00233     virtual ~Field();
00234 
00235     Private *const d;
00236 };
00237 
00238 }
00239 #endif

kabc

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • 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
Generated for KDE-PIM Libraries by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal