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

kabc

  • kabc
contactgroup.h
1/*
2 This file is part of libkabc.
3 Copyright (c) 2008 Tobias Koenig <tokoe@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_CONTACTGROUP_H
22#define KABC_CONTACTGROUP_H
23
24#include <QtCore/QList>
25#include <QtCore/QSharedDataPointer>
26#include <QtCore/QMetaType>
27
28#include "kabc_export.h"
29
30class QString;
31
32namespace KABC {
33
46class KABC_EXPORT ContactGroup
47{
48 public:
49
53 class KABC_EXPORT ContactReference
54 {
55 public:
59 typedef QList<ContactReference> List;
60
64 ContactReference();
65
69 ContactReference( const ContactReference &other );
70
74 ContactReference( const QString &uid );
75
79 ~ContactReference();
80
87 void setUid( const QString &uid );
88
95 QString uid() const;
96
102 void setGid( const QString &gid );
103
108 QString gid() const;
109
113 void setPreferredEmail( const QString &email );
114
119 QString preferredEmail() const;
120
129 void insertCustom( const QString &key, const QString &value );
130
134 void removeCustom( const QString &key );
135
140 QString custom( const QString &key ) const;
141
145 ContactReference &operator=( const ContactReference & );
146
150 bool operator==( const ContactReference & ) const;
151
152 private:
153 class ContactReferencePrivate;
154 QSharedDataPointer<ContactReferencePrivate> d;
155 };
156
160 class KABC_EXPORT ContactGroupReference
161 {
162 public:
166 typedef QList<ContactGroupReference> List;
167
171 ContactGroupReference();
172
176 ContactGroupReference( const ContactGroupReference &other );
177
181 ContactGroupReference( const QString &uid );
182
186 ~ContactGroupReference();
187
191 void setUid( const QString &uid );
192
196 QString uid() const;
197
206 void insertCustom( const QString &key, const QString &value );
207
211 void removeCustom( const QString &key );
212
217 QString custom( const QString &key ) const;
218
222 ContactGroupReference &operator=( const ContactGroupReference & );
223
227 bool operator==( const ContactGroupReference & ) const;
228
229 private:
230 class ContactGroupReferencePrivate;
231 QSharedDataPointer<ContactGroupReferencePrivate> d;
232 };
233
237 class KABC_EXPORT Data
238 {
239 public:
243 typedef QList<Data> List;
244
248 Data();
249
253 Data( const Data &other );
254
258 Data( const QString &name, const QString &email );
259
263 ~Data();
264
268 void setName( const QString &name );
269
273 QString name() const;
274
278 void setEmail( const QString &email );
279
283 QString email() const;
284
293 void insertCustom( const QString &key, const QString &value );
294
298 void removeCustom( const QString &key );
299
304 QString custom( const QString &key ) const;
305
309 Data &operator=( const Data & );
310
314 bool operator==( const Data & ) const;
315
316 private:
317 class DataPrivate;
318 QSharedDataPointer<DataPrivate> d;
319 };
320
324 typedef QList<ContactGroup> List;
325
329 ContactGroup();
330
334 ContactGroup( const ContactGroup &other );
335
339 ContactGroup( const QString &name );
340
344 ~ContactGroup();
345
349 void setId( const QString &id );
350
354 QString id() const;
355
359 void setName( const QString &name );
360
364 QString name() const;
365
370 unsigned int count() const;
371
375 unsigned int contactReferenceCount() const;
376
380 unsigned int contactGroupReferenceCount() const;
381
385 unsigned int dataCount() const;
386
390 ContactReference &contactReference( unsigned int index );
391
395 const ContactReference &contactReference( unsigned int index ) const;
396
400 ContactGroupReference &contactGroupReference( unsigned int index );
401
405 const ContactGroupReference &contactGroupReference( unsigned int index ) const;
406
410 Data &data( unsigned int index );
411
415 const Data &data( unsigned int index ) const;
416
420 void append( const ContactReference &reference );
421
425 void append( const ContactGroupReference &reference );
426
430 void append( const Data &data );
431
435 void remove( const ContactReference &reference );
436
440 void remove( const ContactGroupReference &reference );
441
445 void remove( const Data &data );
446
450 void removeAllContactReferences();
451
455 void removeAllContactGroupReferences();
456
460 void removeAllContactData();
461
465 ContactGroup &operator=( const ContactGroup & );
466
470 bool operator==( const ContactGroup & ) const;
471
475 static QString mimeType();
476
477 private:
478 class Private;
479 QSharedDataPointer<Private> d;
480};
481
482}
483
484#define KABC_CONTACTGROUP_METATYPE_DEFINED
485Q_DECLARE_METATYPE( KABC::ContactGroup )
486
487#endif
KABC::ContactGroup::ContactGroupReference
This class represents a contact group reference.
Definition contactgroup.h:161
KABC::ContactGroup::ContactGroupReference::List
QList< ContactGroupReference > List
A list of contact group references.
Definition contactgroup.h:166
KABC::ContactGroup::ContactReference
This class represents a contact reference.
Definition contactgroup.h:54
KABC::ContactGroup::ContactReference::List
QList< ContactReference > List
A list of contact references.
Definition contactgroup.h:59
KABC::ContactGroup::Data
This class represents a contact data object.
Definition contactgroup.h:238
KABC::ContactGroup::Data::List
QList< Data > List
A list of contact data.
Definition contactgroup.h:243
KABC::ContactGroup
This class represents a group of contacts.
Definition contactgroup.h:47
KABC::ContactGroup::List
QList< ContactGroup > List
A list of contact groups.
Definition contactgroup.h:324
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-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 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