• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

kabc

  • kabc
field.h
1/*
2 This file is part of libkabc.
3 Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20
21#ifndef KABC_FIELD_H
22#define KABC_FIELD_H
23
24#include "addressee.h"
25#include <QtCore/QString>
26
27class KConfigGroup;
28
29namespace KABC {
30
46class KABC_EXPORT Field
47{
48 public:
52 typedef QList<Field *> List;
53
57 enum FieldCategory {
61 All = 0x0,
65 Frequent = 0x01,
69 Address = 0x02,
74 Email = 0x04,
78 Personal = 0x08,
83 Organization = 0x10,
87 CustomCategory = 0x20
88 };
89
93 virtual QString label();
94
98 virtual int category();
99
106 static QString categoryLabel( int category );
107
115 virtual QString value( const KABC::Addressee & );
116
123 virtual bool setValue( KABC::Addressee &, const QString & );
124
128 QString sortKey( const KABC::Addressee & );
129
135 virtual bool isCustom();
136
143 virtual bool equals( Field *field );
144
148 static Field::List allFields();
149
153 static Field::List defaultFields();
154
163 static Field *createCustomField( const QString &label, int category,
164 const QString &key, const QString &app );
165
169 static void deleteFields();
170
178 static void saveFields( KConfigGroup &cfg, const QString &identifier,
179 const Field::List &fields );
188 static void saveFields( const QString &identifier,
189 const Field::List &fields );
190
197 static Field::List restoreFields( const KConfigGroup &cfg, const QString &identifier );
198
206 static Field::List restoreFields( const QString &identifier );
207
208 protected:
217 static void createField( int id, int category = 0 );
218
227 static void createDefaultField( int id, int category = 0 );
228
229 private:
230 class Private;
231
232 Field( Private * );
233 virtual ~Field();
234
235 Private *const d;
236};
237
238}
239#endif
KABC::Address
Postal address information.
Definition: address.h:38
KABC::Addressee
address book entry
Definition: addressee.h:79
KABC::Field
Represents a field in the Addressbook.
Definition: field.h:47
KABC::Field::List
QList< Field * > List
This type is used for a list of fields.
Definition: field.h:52
KABC::Field::FieldCategory
FieldCategory
Represents the category a field belongs to.
Definition: field.h:57
KABC
Class that holds a Calendar Url (FBURL/CALADRURI/CALURI)
Definition: address.h:29
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 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.14.10 API Reference

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