Qt IVI Generator Addressbook Example
#ifndef ADDRESSBOOK_CONTACT_H_
#define ADDRESSBOOK_CONTACT_H_
#include "addressbookmodule.h"
#include <QObject>
#include <QDataStream>
#include <QDebug>
#include <QIviStandardItem>
class ContactPrivate;
class Q_EXAMPLE_IVI_ADDRESSBOOK_EXPORT Contact : public QIviStandardItem
{
Q_GADGET
Q_PROPERTY(QString forename READ forename WRITE setForename)
Q_PROPERTY(QString name READ name WRITE setName)
Q_PROPERTY(int phone READ phone WRITE setPhone)
Q_CLASSINFO("IviPropertyDomains" , "{\"iviVersion\":\"5.12.8\"}" )
public :
Contact();
Contact(const Contact & rhs);
Contact & operator = (const Contact & );
Contact(const QString & forename, const QString & name, int phone);
~ Contact();
QString type() const override;
QString forename() const ;
void setForename(const QString & forename);
QString name() const override;
void setName(const QString & name);
int phone() const ;
void setPhone(int phone);
protected :
Q_INVOKABLE void fromJSON(const QVariant & variant);
private :
QSharedDataPointer < ContactPrivate> d;
friend Q_EXAMPLE_IVI_ADDRESSBOOK_EXPORT bool operator = = (const Contact & left, const Contact & right) Q_DECL_NOTHROW;
friend Q_EXAMPLE_IVI_ADDRESSBOOK_EXPORT QDataStream & operator > > (QDataStream & stream, Contact & obj);
};
Q_DECLARE_TYPEINFO(Contact, Q_MOVABLE_TYPE);
Q_EXAMPLE_IVI_ADDRESSBOOK_EXPORT bool operator = = (const Contact & left, const Contact & right) Q_DECL_NOTHROW;
Q_EXAMPLE_IVI_ADDRESSBOOK_EXPORT bool operator ! = (const Contact & left, const Contact & right) Q_DECL_NOTHROW;
Q_EXAMPLE_IVI_ADDRESSBOOK_EXPORT QDataStream & operator < < (QDataStream & stream, const Contact & obj);
Q_EXAMPLE_IVI_ADDRESSBOOK_EXPORT QDataStream & operator > > (QDataStream & stream, Contact & obj);
Q_EXAMPLE_IVI_ADDRESSBOOK_EXPORT QDebug & operator < < (QDebug & dbg, const Contact & obj);
Q_DECLARE_METATYPE(Contact)
#endif // ADDRESSBOOK_CONTACT_H_