Build system changed to Cmake, ORM changed to QxORM, Qt6 compatibility.
This commit is contained in:
@@ -1,6 +1,26 @@
|
||||
#include "addressitem.h"
|
||||
#include <define.h>
|
||||
|
||||
QX_REGISTER_CPP_CAMP(AddressItem)
|
||||
|
||||
namespace qx {
|
||||
template<> void register_class(QxClass<AddressItem>& t) {
|
||||
t.setName("AddressItem");
|
||||
t.id(&AddressItem::m_id, "id");
|
||||
t.data(&AddressItem::m_firstName, "firstName");
|
||||
t.data(&AddressItem::m_lastName, "lastName");
|
||||
t.data(&AddressItem::m_address, "address");
|
||||
t.data(&AddressItem::m_price, "price");
|
||||
t.data(&AddressItem::m_owner, "owner");
|
||||
t.data(&AddressItem::m_sale, "sale");
|
||||
t.data(&AddressItem::m_totalPrice, "totalPrice");
|
||||
|
||||
t.relationManyToOne(&AddressItem::m_adbItem, "adbItem");
|
||||
t.relationManyToOne(&AddressItem::m_campData, "campData");
|
||||
t.relationManyToOne(&AddressItem::m_personPrice, "personPrice");
|
||||
}
|
||||
}
|
||||
|
||||
AddressItem::AddressItem(QObject *parent) : QObject(parent)
|
||||
{
|
||||
m_id = 0;
|
||||
@@ -10,12 +30,12 @@ AddressItem::AddressItem(QObject *parent) : QObject(parent)
|
||||
m_totalPrice = 0;
|
||||
}
|
||||
|
||||
int AddressItem::id() const
|
||||
long AddressItem::id() const
|
||||
{
|
||||
return m_id;
|
||||
}
|
||||
|
||||
void AddressItem::setId(int id)
|
||||
void AddressItem::setId(long id)
|
||||
{
|
||||
m_id = id;
|
||||
}
|
||||
@@ -60,12 +80,12 @@ void AddressItem::setPrice(QDecDouble price)
|
||||
m_price = FROM_DEC(price);
|
||||
}
|
||||
|
||||
QWeakPointer<CampData> AddressItem::campData() const
|
||||
QSharedPointer<CampData> AddressItem::campData() const
|
||||
{
|
||||
return m_campData;
|
||||
}
|
||||
|
||||
void AddressItem::setCampData(const QWeakPointer<CampData> &campData)
|
||||
void AddressItem::setCampData(const QSharedPointer<CampData> &campData)
|
||||
{
|
||||
m_campData = campData;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user