You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
855 B
C
43 lines
855 B
C
9 years ago
|
#ifndef DIRECTSALEITEM_H
|
||
|
#define DIRECTSALEITEM_H
|
||
|
|
||
|
#include <QObject>
|
||
|
#include <QString>
|
||
|
#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
|