Build system changed to Cmake, ORM changed to QxORM, Qt6 compatibility.
This commit is contained in:
+12
-10
@@ -2,23 +2,25 @@
|
||||
#define SALE_H
|
||||
|
||||
#include <QObject>
|
||||
#include <odb/core.hxx>
|
||||
#include <QDecDouble.hh>
|
||||
#include <combodata.h>
|
||||
|
||||
#pragma db object
|
||||
#include "../camp_global.h"
|
||||
|
||||
class Sale : public ComboItem
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
QX_REGISTER_FRIEND_CLASS(Sale)
|
||||
Q_PROPERTY(QString description READ description WRITE setDescription)
|
||||
Q_PROPERTY(QDecDouble sale READ sale WRITE setSale)
|
||||
Q_PROPERTY(bool fixed READ fixed WRITE setFixed)
|
||||
|
||||
public:
|
||||
explicit Sale(QObject *parent = 0);
|
||||
explicit Sale(QObject *parent = nullptr);
|
||||
|
||||
int id() const;
|
||||
void setId(int id);
|
||||
long id() const;
|
||||
void setId(long id);
|
||||
|
||||
QDecDouble sale() const;
|
||||
void setSale(QDecDouble sale);
|
||||
@@ -30,17 +32,17 @@ public:
|
||||
void setDescription(const QString &description);
|
||||
|
||||
private:
|
||||
friend class odb::access;
|
||||
#pragma db id auto
|
||||
int m_id;
|
||||
long m_id;
|
||||
QString m_description;
|
||||
int m_sale;
|
||||
bool m_fixed;
|
||||
|
||||
// ComboItem interface
|
||||
public:
|
||||
bool eq(ComboItem *other);
|
||||
QString toString();
|
||||
bool eq(ComboItem *other) override;
|
||||
QString toString() override;
|
||||
};
|
||||
|
||||
QX_REGISTER_HPP_CAMP(Sale, ComboItem, 0)
|
||||
|
||||
#endif // SALE_H
|
||||
|
||||
Reference in New Issue
Block a user