ContactsChangeNotifier.h
#ifndef CONTACTSCHANGENOTIFIER_H
#define CONTACTSCHANGENOTIFIER_H
#include <QObject>
#include <QContactManager>
#include <QList>
#include <QLoggingCategory>
#include <QContactId>
using namespace QtContacts;
class ContactsChangeNotifier : public QObject
{
Q_OBJECT
public:
ContactsChangeNotifier();
~ContactsChangeNotifier();
void enable();
void disable();
Q_SIGNALS:
void change();
private Q_SLOTS:
void onContactsAdded(const QList<QContactId>& ids);
void onContactsRemoved(const QList<QContactId>& ids);
void onContactsChanged(const QList<QContactId>& ids);
private:
QContactManager* iManager;
bool iDisabled;
};
Q_DECLARE_LOGGING_CATEGORY(lcSyncMLContactChange)
Q_DECLARE_LOGGING_CATEGORY(lcSyncMLContactChangeTrace)
#endif
ContactsChangeNotifier::~ContactsChangeNotifier
~ContactsChangeNotifier()
constructor
ContactsChangeNotifier::disable
void disable()
stop listening to changes from QContactManager
ContactsChangeNotifier::change
void change()
ContactsChangeNotifier::enable
void enable()
start listening to changes from QContactManager
ContactsChangeNotifier::ContactsChangeNotifier
ContactsChangeNotifier()
constructor