QOrganizerCollectionChangeSet Class

The QOrganizerCollectionChangeSet class provides a simple API to simplify the emission of state-change signals for collections from QOrganizerManagerEngine implementations. More...

Header: #include <QOrganizerCollectionChangeSet>

Public Functions

QOrganizerCollectionChangeSet()
QOrganizerCollectionChangeSet(const QOrganizerCollectionChangeSet &other)
~QOrganizerCollectionChangeSet()
QSet<QOrganizerCollectionId> addedCollections() const
QSet<QOrganizerCollectionId> changedCollections() const
void clearAddedCollections()
void clearAll()
void clearChangedCollections()
void clearModifiedCollections()
void clearRemovedCollections()
bool dataChanged() const
void emitSignals(QOrganizerManagerEngine *engine) const
void insertAddedCollection(const QOrganizerCollectionId &collectionId)
void insertAddedCollections(const QList<QOrganizerCollectionId> &collectionIds)
void insertChangedCollection(const QOrganizerCollectionId &collectionId)
void insertChangedCollections(const QList<QOrganizerCollectionId> &collectionIds)
void insertRemovedCollection(const QOrganizerCollectionId &collectionId)
void insertRemovedCollections(const QList<QOrganizerCollectionId> &collectionIds)
QList<QPair<QOrganizerCollectionId, QOrganizerManager::Operation> > modifiedCollections() const
QSet<QOrganizerCollectionId> removedCollections() const
void setDataChanged(bool dataChanged)
QOrganizerCollectionChangeSet &operator=(const QOrganizerCollectionChangeSet &other)

Detailed Description

The QOrganizerCollectionChangeSet class provides a simple API to simplify the emission of state-change signals for collections from QOrganizerManagerEngine implementations.

This class should only be used by backend developers.

Member Function Documentation

QOrganizerCollectionChangeSet::QOrganizerCollectionChangeSet()

Constructs a new change set.

QOrganizerCollectionChangeSet::QOrganizerCollectionChangeSet(const QOrganizerCollectionChangeSet &other)

Constructs a copy of the other change set.

QOrganizerCollectionChangeSet::~QOrganizerCollectionChangeSet()

Frees the memory used by this change set.

QSet<QOrganizerCollectionId> QOrganizerCollectionChangeSet::addedCollections() const

Returns the set of IDs of collections which have been added to the database.

QSet<QOrganizerCollectionId> QOrganizerCollectionChangeSet::changedCollections() const

Returns the set of IDs of collections which have been changed in the database.

void QOrganizerCollectionChangeSet::clearAddedCollections()

Clears the set of IDs of collections which have been added to the database.

void QOrganizerCollectionChangeSet::clearAll()

Clears all flags and sets of IDs in this change set.

void QOrganizerCollectionChangeSet::clearChangedCollections()

Clears the set of IDs of collections which have been changed in the database.

void QOrganizerCollectionChangeSet::clearModifiedCollections()

Clears the list of ids of organizer collections which have been added, changed or removed from the database

void QOrganizerCollectionChangeSet::clearRemovedCollections()

Clears the set of ids of collections which have been removed from the database.

bool QOrganizerCollectionChangeSet::dataChanged() const

Returns the value of the data changed flag.

See also setDataChanged().

void QOrganizerCollectionChangeSet::emitSignals(QOrganizerManagerEngine *engine) const

Emits the appropriate signals from the given engine given the state of the change set. Note that the flags and sets of IDs are not cleared after signals are emitted.

void QOrganizerCollectionChangeSet::insertAddedCollection(const QOrganizerCollectionId &collectionId)

Inserts the given collectionId into the set of IDs of collections which have been added to the database.

void QOrganizerCollectionChangeSet::insertAddedCollections(const QList<QOrganizerCollectionId> &collectionIds)

Inserts each of the given collectionIds into the set of IDs of collections which have been added to the database.

void QOrganizerCollectionChangeSet::insertChangedCollection(const QOrganizerCollectionId &collectionId)

Inserts the given collectionId into the set of IDs of collections which have been changed in the database.

void QOrganizerCollectionChangeSet::insertChangedCollections(const QList<QOrganizerCollectionId> &collectionIds)

Inserts each of the given collectionIds into the set of IDs of collections which have been changed in the database.

void QOrganizerCollectionChangeSet::insertRemovedCollection(const QOrganizerCollectionId &collectionId)

Inserts the given collectionId into the set of IDs of collections which have been removed from the database.

void QOrganizerCollectionChangeSet::insertRemovedCollections(const QList<QOrganizerCollectionId> &collectionIds)

Inserts each of the given collectionIds into the set of IDs of collections which have been removed from the database.

QList<QPair<QOrganizerCollectionId, QOrganizerManager::Operation> > QOrganizerCollectionChangeSet::modifiedCollections() const

Returns the list of ids of organizer collections which have been added, changed or removed from the database. The list includes information about which database operation was done. The ids and operations are ordered so that the first operation is first in the list.

QSet<QOrganizerCollectionId> QOrganizerCollectionChangeSet::removedCollections() const

Returns the set of IDs of collections which have been removed from the database.

void QOrganizerCollectionChangeSet::setDataChanged(bool dataChanged)

Sets the data changed flag to dataChanged.

If this is set to true prior to calling emitSignals(), only the QOrganizerManagerEngine::dataChanged() signal will be emitted; otherwise, the appropriate finer-grained signals will be emitted.

See also dataChanged().

QOrganizerCollectionChangeSet &QOrganizerCollectionChangeSet::operator=(const QOrganizerCollectionChangeSet &other)

Assigns this change set to be equal to other.