Added favorite buttons to shop form.

closes #276
This commit is contained in:
2017-03-28 22:13:54 +02:00
parent 7aa00f1b1e
commit b0d67cf93a
19 changed files with 361 additions and 384 deletions
+10
View File
@@ -67,3 +67,13 @@ void FavoritItem::setFavButtonName(const QString &favButtonName)
{
m_favButtonName = favButtonName;
}
int FavoritItem::refId() const
{
return m_refId;
}
void FavoritItem::setRefId(int refId)
{
m_refId = refId;
}
+5
View File
@@ -17,6 +17,7 @@ class FavoritItem : public QObject, public IShopItem
Q_OBJECT
Q_PROPERTY(int id READ id WRITE setId)
Q_PROPERTY(int refId READ refId WRITE setRefId)
Q_PROPERTY(QString name READ name WRITE setName)
Q_PROPERTY(QDecDouble unitPrice READ unitPrice WRITE setUnitPrice)
Q_PROPERTY(Enums::VatType vatType READ vatType WRITE setVatType)
@@ -46,10 +47,14 @@ public:
QString favButtonName() const;
void setFavButtonName(const QString &favButtonName);
int refId() const;
void setRefId(int refId);
private:
friend class odb::access;
#pragma db id auto
int m_id;
int m_refId;
QString m_name;
int m_unitPrice;
Enums::VatType m_vatType;