closes #4: Favorite buttons has been extended with category buttons.
This commit is contained in:
@@ -24,11 +24,12 @@ class CommodityData : public IShopItem
|
||||
Q_PROPERTY(QDecDouble price READ price WRITE setPrice)
|
||||
Q_PROPERTY(Enums::VatType vat READ vat WRITE setVat)
|
||||
Q_PROPERTY(int count READ count WRITE setCount)
|
||||
Q_PROPERTY(bool favorite READ favorite WRITE setFavorite)
|
||||
|
||||
public:
|
||||
explicit CommodityData(QObject *parent = nullptr);
|
||||
|
||||
long id() override;
|
||||
long id() const override;
|
||||
void setId(long id);
|
||||
|
||||
QString name() override;
|
||||
@@ -52,6 +53,9 @@ public:
|
||||
int count() const;
|
||||
void setCount(int count);
|
||||
|
||||
bool favorite() override;
|
||||
void setFavorite(bool favorite);
|
||||
|
||||
Q_INVOKABLE QStringList eagerLoad();
|
||||
|
||||
private:
|
||||
@@ -63,13 +67,15 @@ private:
|
||||
int m_price;
|
||||
Enums::VatType m_vat;
|
||||
int m_count;
|
||||
bool m_favorite;
|
||||
|
||||
// IShopItem interface
|
||||
public:
|
||||
QDecDouble unitPrice() override;
|
||||
Enums::VatType vatType() override;
|
||||
QString pluginId() override;
|
||||
|
||||
QString pluginId() const override;
|
||||
QString color() override;
|
||||
QString category() override;
|
||||
};
|
||||
|
||||
typedef QSharedPointer<CommodityData> CommodityDataPtr;
|
||||
|
||||
Reference in New Issue
Block a user