Build system changed to Cmake, ORM changed to QxORM, Qt6 compatibility.
This commit is contained in:
+12
-12
@@ -6,16 +6,17 @@
|
||||
#include <QSharedPointer>
|
||||
#include <QWeakPointer>
|
||||
#include <QDecDouble.hh>
|
||||
#include <odb/core.hxx>
|
||||
#include <data/addressbookdata.h>
|
||||
|
||||
#include <addressbookdata.h>
|
||||
#include "../camp_global.h"
|
||||
|
||||
class CampData;
|
||||
|
||||
#pragma db object
|
||||
class AddressItem : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
QX_REGISTER_FRIEND_CLASS(AddressItem)
|
||||
Q_PROPERTY(QString firstName READ firstName WRITE setFirstName)
|
||||
Q_PROPERTY(QString lastName READ lastName WRITE setLastName)
|
||||
Q_PROPERTY(QString address READ address WRITE setAddress)
|
||||
@@ -27,8 +28,8 @@ class AddressItem : public QObject
|
||||
public:
|
||||
explicit AddressItem(QObject *parent = 0);
|
||||
|
||||
int id() const;
|
||||
void setId(int id);
|
||||
long id() const;
|
||||
void setId(long id);
|
||||
|
||||
QString firstName() const;
|
||||
void setFirstName(const QString &firstName);
|
||||
@@ -42,8 +43,8 @@ public:
|
||||
QDecDouble price() const;
|
||||
void setPrice(QDecDouble price);
|
||||
|
||||
QWeakPointer<CampData> campData() const;
|
||||
void setCampData(const QWeakPointer<CampData> &campData);
|
||||
QSharedPointer<CampData> campData() const;
|
||||
void setCampData(const QSharedPointer<CampData> &campData);
|
||||
|
||||
PersonPricePtr personPrice() const;
|
||||
void setPersonPrice(const PersonPricePtr &personPrice);
|
||||
@@ -61,9 +62,7 @@ public:
|
||||
void setSale(QDecDouble sale);
|
||||
|
||||
private:
|
||||
friend class odb::access;
|
||||
#pragma db id auto
|
||||
int m_id;
|
||||
long m_id;
|
||||
QString m_firstName;
|
||||
QString m_lastName;
|
||||
QString m_address;
|
||||
@@ -71,10 +70,11 @@ private:
|
||||
int m_price;
|
||||
int m_totalPrice;
|
||||
int m_sale;
|
||||
#pragma db not_null
|
||||
QWeakPointer<CampData> m_campData;
|
||||
CampDataPtr m_campData;
|
||||
PersonPricePtr m_personPrice;
|
||||
bool m_owner;
|
||||
};
|
||||
|
||||
QX_REGISTER_HPP_CAMP(AddressItem, QObject, 0)
|
||||
|
||||
#endif // ADDRESSITEM_H
|
||||
|
||||
Reference in New Issue
Block a user