Build system changed to Cmake, ORM changed to QxORM, Qt6 compatibility.
This commit is contained in:
@@ -3,12 +3,14 @@
|
||||
|
||||
#include <QObject>
|
||||
#include <QDecDouble.hh>
|
||||
#include <odb/core.hxx>
|
||||
|
||||
#pragma db object
|
||||
#include "../camp_global.h"
|
||||
|
||||
class PersonPrice : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
QX_REGISTER_FRIEND_CLASS(PersonPrice)
|
||||
Q_PROPERTY(QString description READ description WRITE setDescription)
|
||||
Q_PROPERTY(int fromAge READ fromAge WRITE setFromAge)
|
||||
Q_PROPERTY(int toAge READ toAge WRITE setToAge)
|
||||
@@ -18,8 +20,8 @@ class PersonPrice : public QObject
|
||||
public:
|
||||
explicit PersonPrice(QObject *parent = 0);
|
||||
|
||||
int id() const;
|
||||
void setId(int id);
|
||||
long id() const;
|
||||
void setId(long id);
|
||||
|
||||
QString description() const;
|
||||
void setDescription(const QString &description);
|
||||
@@ -37,9 +39,7 @@ public:
|
||||
void setActive(bool active);
|
||||
|
||||
private:
|
||||
friend class odb::access;
|
||||
#pragma db id auto
|
||||
int m_id;
|
||||
long m_id;
|
||||
QString m_description;
|
||||
int m_fromAge;
|
||||
int m_toAge;
|
||||
@@ -47,4 +47,6 @@ private:
|
||||
bool m_active;
|
||||
};
|
||||
|
||||
QX_REGISTER_HPP_CAMP(PersonPrice, QObject, 0)
|
||||
|
||||
#endif // PERSONPRICE_H
|
||||
|
||||
Reference in New Issue
Block a user