21 #ifndef KABC_ADDRESSBOOK_H
22 #define KABC_ADDRESSBOOK_H
24 #include "kabc_export.h"
26 #include "addressee.h"
29 #include "kresources/manager.h"
31 #include <QtCore/QObject>
32 #include <QtCore/QList>
36 class DistributionList;
50 friend KABC_EXPORT QDataStream &
operator<<( QDataStream &lhs,
52 friend KABC_EXPORT QDataStream &
operator>>( QDataStream &lhs,
148 bool operator==(
const Iterator &it )
const;
157 bool operator!=(
const Iterator &it )
const;
161 IteratorData *
const d;
183 #ifndef QT_STRICT_ITERATORS
267 struct ConstIteratorData;
268 ConstIteratorData *
const d;
319 void releaseSaveTicket(
Ticket *ticket );
344 bool save(
Ticket *ticket );
353 bool asyncSave(
Ticket *ticket );
372 ConstIterator end()
const;
373 ConstIterator constEnd()
const {
return end(); }
393 void insertAddressee(
const Addressee &addr );
400 void removeAddressee(
const Addressee &addr );
408 void removeAddressee(
const Iterator &it );
416 Iterator find(
const Addressee &addr );
424 ConstIterator find(
const Addressee &addr )
const;
433 Addressee findByUid(
const QString &uid )
const;
477 DistributionList *createDistributionList(
const QString &name, Resource *resource = 0 );
484 void removeDistributionList( DistributionList *list );
491 DistributionList *findDistributionListByIdentifier(
const QString &identifier );
500 DistributionList *findDistributionListByName(
502 Qt::CaseSensitivity caseSensitivity = Qt::CaseSensitive );
508 QList<DistributionList*> allDistributionLists();
517 QStringList allDistributionListNames()
const;
523 virtual QString identifier()
const;
540 bool addCustomField(
const QString &label,
int category =
Field::All,
541 const QString &key = QString(),
542 const QString &app = QString() )
const;
550 bool addResource( Resource *resource );
558 bool removeResource( Resource *resource );
563 QList<Resource*> resources()
const;
571 void setErrorHandler( ErrorHandler *errorHandler );
578 void error(
const QString &msg );
603 bool loadingHasFinished()
const;
660 void resourceLoadingFinished(
Resource *resource );
669 void resourceSavingFinished(
Resource *resource );
681 void resourceLoadingError(
Resource *resource,
const QString &errMsg );
691 void resourceSavingError(
Resource *resource,
const QString &errMsg );
703 void setStandardResource(
Resource *resource );
Address Book Const Iterator.
void savingFinished(Resource *resource)
Emitted when the asynchronous saving of one resource has finished after calling asyncSave().
void addressBookLocked(AddressBook *addressBook)
Emitted when one of the resources has been locked for writing.
void emitAddressBookChanged()
Emits the signal addressBookChanged() using this as the parameter.
void addressBookUnlocked(AddressBook *addressBook)
Emitted when one of the resources has been unlocked.
void addressBookChanged(AddressBook *addressBook)
Emitted when one of the resources discovered a change in its backend or the asynchronous loading of a...
void emitAddressBookUnlocked()
Emits the signal addressBookUnlocked() using this as the parameter.
void loadingFinished(Resource *resource)
Emitted when the asynchronous loading of one resource has finished after calling asyncLoad().
void emitAddressBookLocked()
Emits the signal addressBookLocked() using this as the parameter.
AddresseeList List
A list of addressee objects.
QList< Field * > List
This type is used for a list of fields.
Standard KDE address book.
Helper class for handling coordinated save of address books.
Class that holds a Calendar Url (FBURL/CALADRURI/CALURI)
QDataStream & operator<<(QDataStream &stream, const Address &address)
Serializes the address object into the stream.
QDataStream & operator>>(QDataStream &stream, Address &address)
Initializes the address object from the stream.