Build system changed to Cmake, ORM changed to QxORM, Qt6 compatibility.
This commit is contained in:
+16
-16
@@ -1,21 +1,21 @@
|
||||
#ifndef FAVORITITEM_H
|
||||
#define FAVORITITEM_H
|
||||
|
||||
#include "../ishopitem.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <QDecDouble.hh>
|
||||
//#include <QxOrm.h>
|
||||
#include <enums.h>
|
||||
#include <ishopitem.h>
|
||||
#include <odb/core.hxx>
|
||||
|
||||
class IShopItem;
|
||||
|
||||
#pragma db object
|
||||
class FavoritItem : public QObject, public IShopItem
|
||||
class FavoritItem : public IShopItem
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
QX_REGISTER_FRIEND_CLASS(FavoritItem)
|
||||
Q_PROPERTY(int id READ id WRITE setId)
|
||||
Q_PROPERTY(int refId READ refId WRITE setRefId)
|
||||
Q_PROPERTY(QString name READ name WRITE setName)
|
||||
@@ -26,12 +26,12 @@ class FavoritItem : public QObject, public IShopItem
|
||||
Q_PROPERTY(QString favButtonName READ favButtonName WRITE setFavButtonName)
|
||||
|
||||
public:
|
||||
FavoritItem();
|
||||
FavoritItem() = default;
|
||||
|
||||
// IShopItem interface
|
||||
public:
|
||||
int id() override;
|
||||
void setId(int id);
|
||||
long id() override;
|
||||
void setId(long id);
|
||||
|
||||
QString name() override;
|
||||
void setName(const QString &name);
|
||||
@@ -51,17 +51,15 @@ public:
|
||||
QString favButtonName() const;
|
||||
void setFavButtonName(const QString &favButtonName);
|
||||
|
||||
int refId() const;
|
||||
void setRefId(int refId);
|
||||
long refId() const;
|
||||
void setRefId(long refId);
|
||||
|
||||
private:
|
||||
friend class odb::access;
|
||||
#pragma db id auto
|
||||
int m_id;
|
||||
int m_refId;
|
||||
long m_id{0};
|
||||
long m_refId{0};
|
||||
QString m_name;
|
||||
int m_unitPrice;
|
||||
Enums::VatType m_vatType;
|
||||
int m_unitPrice{0};
|
||||
Enums::VatType m_vatType{Enums::NONE};
|
||||
QString m_pluginId;
|
||||
QString m_favButtonName;
|
||||
QString m_shortName;
|
||||
@@ -69,4 +67,6 @@ private:
|
||||
|
||||
typedef QSharedPointer<FavoritItem> FavoritItemPtr;
|
||||
|
||||
QX_REGISTER_HPP_SHOP(FavoritItem, QObject, 0)
|
||||
|
||||
#endif // FAVORITITEM_H
|
||||
|
||||
Reference in New Issue
Block a user