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.
prodejna/shop/directsaleitem.h

47 lines
966 B
C++

#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;
Enums::VatType vatType() override;
int count() const;
void setCount(int count);
void setName(const QString &name);
void setUnitPrice(const QDecDouble &unitPrice);
void setVatType(Enums::VatType vatType);
private:
QString m_name;
QDecDouble m_unitPrice;
int m_count;
Enums::VatType m_vat;
};
#endif // DIRECTSALEITEM_H