Home · All Classes · All Functions ·

QContactChangeSet Class Reference

The QContactChangeSet class provides a simple API to simplify the emission of state-change signals from QContactManagerEngine implementations. More...

    #include <QContactChangeSet>

Public Functions

QContactChangeSet ()
QContactChangeSet ( const QContactChangeSet & other )
~QContactChangeSet ()
QSet<QContactLocalId> & addedContacts ()
QSet<QContactLocalId> & addedRelationshipsContacts ()
QSet<QContactLocalId> & changedContacts ()
void clear ()
bool dataChanged ()
void emitSignals ( QContactManagerEngine * engine )
QPair<QContactLocalId, QContactLocalId> & oldAndNewSelfContactId ()
QSet<QContactLocalId> & removedContacts ()
QSet<QContactLocalId> & removedRelationshipsContacts ()
void setDataChanged ( bool dataChanged )
QContactChangeSet & operator= ( const QContactChangeSet & other )

Detailed Description

The QContactChangeSet class provides a simple API to simplify the emission of state-change signals from QContactManagerEngine implementations.

This class can be utilised by backend implementations to ensure correct emission of the QContactManagerEngine::dataChanged(), QContactManagerEngine::contactsAdded(), QContactManagerEngine::contactsChanged() and QContactManagerEngine::contactsRemoved().

See also QContactManagerEngine.


Member Function Documentation

QContactChangeSet::QContactChangeSet ()

Constructs a new change set

QContactChangeSet::QContactChangeSet ( const QContactChangeSet & other )

Constructs a copy of the other change set

QContactChangeSet::~QContactChangeSet ()

Frees the memory used by this change set

QSet<QContactLocalId> & QContactChangeSet::addedContacts ()

Returns a reference to the set of ids of contacts which have been added to the database.

QSet<QContactLocalId> & QContactChangeSet::addedRelationshipsContacts ()

Returns a reference to the set of ids of contacts which have been affected by the addition of relationships to the database.

QSet<QContactLocalId> & QContactChangeSet::changedContacts ()

Returns a reference to the set of ids of contacts which have been changed in the database.

void QContactChangeSet::clear ()

Clears all flags and sets of ids in this change set

bool QContactChangeSet::dataChanged ()

Returns the value of the data changed flag

See also setDataChanged().

void QContactChangeSet::emitSignals ( QContactManagerEngine * engine )

Emits the appropriate signals from the given engine given the state of the change set

QPair<QContactLocalId, QContactLocalId> & QContactChangeSet::oldAndNewSelfContactId ()

Returns a reference to the pair of ids which represents the old and new self contact ids. The first id in the pair is the old self contact id, while the second id in the pair is the new self contact id. If the new id is different to the old id at the point in time when emitSignals() is called, the QContactManagerEngine::selfContactIdChanged() signal will be emitted.

QSet<QContactLocalId> & QContactChangeSet::removedContacts ()

Returns a reference to the set of ids of contacts which have been removed from the database.

QSet<QContactLocalId> & QContactChangeSet::removedRelationshipsContacts ()

Returns a reference to the set of ids of contacts which have been affected by the removal of relationships from the database.

void QContactChangeSet::setDataChanged ( bool dataChanged )

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

See also dataChanged().

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

Assigns this change set to be equal to other


Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Mobility Project 1.0.0