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

49 lines
1.0 KiB
C++

#ifndef DIRECTSALEITEM_H
#define DIRECTSALEITEM_H
#include <QObject>
#include <QString>
#include "ishopitem.h"
class DirectSaleItem : 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)
Q_PROPERTY(Enums::VatType vatType READ vatType WRITE setVatType)
public:
explicit DirectSaleItem(QObject *parent = 0);
signals:
public slots:
// IShopItem interface
public:
long id() const override;
QString name() override;
QString shortName() override;
QDecDouble unitPrice() override;
QString pluginId() const 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