Qt IVI Generator Addressbook Example

/**************************************************************************** ** Generated from 'Example.IVI.AddressBook.qface' ** ** Created by: The QFace generator (QtAS 5.12.8) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/
#ifndef ADDRESSBOOK_ADDRESSBOOKBACKEND_H_ #define ADDRESSBOOK_ADDRESSBOOKBACKEND_H_ #include <QObject> #include <QQmlPropertyMap> #include "addressbookbackendinterface.h" #include <QIviPagingModelInterface> #include "contact.h" class ContactsModelBackend : public QIviPagingModelInterface { Q_OBJECT public: explicit ContactsModelBackend(QObject *parent = nullptr); ~ContactsModelBackend(); Q_INVOKABLE void initialize() override; Q_INVOKABLE void registerInstance(const QUuid &identifier) override; Q_INVOKABLE void unregisterInstance(const QUuid &identifier) override; Q_INVOKABLE void fetchData(const QUuid &identifier, int start, int count) override; public Q_SLOTS: void insert(int index, const Contact &item); void remove(int index); void move(int currentIndex, int newIndex); void reset(); void update(int index, const Contact &item); const Contact &at(int index) const; private: QList<Contact> m_list; }; class QIviSimulationEngine; class AddressBookBackend : public AddressBookBackendInterface { Q_OBJECT Q_PROPERTY(QIviPagingModelInterface * contacts READ contacts WRITE setContacts NOTIFY contactsChanged FINAL) public: explicit AddressBookBackend(QObject *parent = nullptr); explicit AddressBookBackend(QIviSimulationEngine *engine, QObject *parent = nullptr); ~AddressBookBackend(); Q_INVOKABLE void initialize() override; QIviPagingModelInterface * contacts() const; public Q_SLOTS: void setContacts(QIviPagingModelInterface *contacts); virtual QIviPendingReply<void> insertContact(int index, const Contact &contact) override; protected: QIviPagingModelInterface *m_contacts; }; #endif // ADDRESSBOOK_ADDRESSBOOKBACKEND_H_