contactengine/contactsengine.h
changeset 19 e4b6ee329501
child 23 51fcdd1558d8
equal deleted inserted replaced
18:5707b75503d5 19:e4b6ee329501
       
     1 #ifndef CONTACTSENGINE_H
       
     2 #define CONTACTSENGINE_H
       
     3 
       
     4 #include <QAbstractListModel>
       
     5 
       
     6 #include <QContactManager>
       
     7 
       
     8 #include "contactsengine.h"
       
     9 
       
    10 using namespace QtMobility;
       
    11 
       
    12 class ContactsEngine : public QAbstractListModel
       
    13 {
       
    14     Q_OBJECT
       
    15 public:
       
    16     explicit ContactsEngine(QObject *parent = 0);
       
    17     ~ContactsEngine();
       
    18 
       
    19     // required by list model interface.
       
    20     int rowCount(const QModelIndex &parent = QModelIndex()) const;
       
    21     QVariant data(const QModelIndex &index, int role) const;
       
    22 
       
    23     QStringList dataSources();
       
    24     void setManager(QString aMgr);
       
    25 
       
    26 public:
       
    27     void populateAddresses();
       
    28 
       
    29 signals:
       
    30     void managerChanged(QStringList containNames);
       
    31 
       
    32 public slots:
       
    33 
       
    34 private:
       
    35     QContactManager *m_manager;
       
    36     QMap<QString, QString> m_availableManagers;
       
    37     QMap<QString, QContactManager*> m_initialisedManagers;
       
    38 };
       
    39 
       
    40 #endif // CONTACTSENGINE_H