#ifndef ADDRESS_H #define ADDRESS_H #include #include #include #include #pragma db object class Address : public ComboItem { Q_OBJECT Q_PROPERTY(QString city READ city WRITE setCity) Q_PROPERTY(QString street READ street WRITE setStreet) Q_PROPERTY(QString houseNumber READ houseNumber WRITE setHouseNumber) public: explicit Address(QObject *parent = 0); ~Address(); QString city() const; void setCity(const QString &city); QString street() const; void setStreet(const QString &street); QString houseNumber() const; void setHouseNumber(const QString &houseNumber); int id() const; void setId(int id); private: friend class odb::access; #pragma db id auto int m_id; QString m_city; QString m_street; QString m_houseNumber; signals: public slots: // ComboItem interface public: virtual bool eq(ComboItem *other); virtual QString toString(); }; #endif // ADDRESS_H