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! *****************************************************************************/
#include "addressbookplugin.h" #include "addressbookbackend.h" #include <QStringList> #include <QtIviCore/QIviSimulationEngine> /*! \class AddressBookPlugin \inmodule Example.IVI.AddressBook */ /*! \internal */ AddressBookPlugin::AddressBookPlugin(QObject *parent) : QObject(parent) , m_simulationEngine(new QIviSimulationEngine(QStringLiteral("example.ivi.addressbook"), this)) { auto AddressBookInstance = new AddressBookBackend(m_simulationEngine, this); //Register the types for the SimulationEngine AddressBookModule::registerQmlTypes(QStringLiteral("example.ivi.addressbook.simulation"), 1, 0); m_simulationEngine->registerSimulationInstance(AddressBookInstance, "example.ivi.addressbook.simulation", 1, 0, "AddressBookBackend"); m_interfaces << AddressBookInstance; m_simulationEngine->loadSimulationData(QStringLiteral(":/simulation/addressbook_simulation_data.json")); m_simulationEngine->loadSimulation(QUrl(QStringLiteral("qrc:/plugin_resource/simulation.qml"))); } /*! \internal */ QStringList AddressBookPlugin::interfaces() const { QStringList list; list << AddressBook_AddressBook_iid; return list; } /*! \internal */ QIviFeatureInterface *AddressBookPlugin::interfaceInstance(const QString &interface) const { int index = interfaces().indexOf(interface); return index < 0 ? nullptr : m_interfaces.at(index); }