#ifndef DIRECTSALEITEM_H #define DIRECTSALEITEM_H #include #include #include "ishopitem.h" class DirectSaleItem : public QObject, public IShopItem { Q_OBJECT Q_PROPERTY(QString name READ name WRITE setName) Q_PROPERTY(QDecDouble unitPrice READ unitPrice WRITE setUnitPrice) Q_PROPERTY(int count READ count WRITE setCount) public: explicit DirectSaleItem(QObject *parent = 0); signals: public slots: // IShopItem interface public: int id() override; QString name() override; QDecDouble unitPrice() override; QString pluginId() override; int count() const; void setCount(int count); void setName(const QString &name); void setUnitPrice(const QDecDouble &unitPrice); private: QString m_name; QDecDouble m_unitPrice; int m_count; }; #endif // DIRECTSALEITEM_H