Build system changed to Cmake, ORM changed to QxORM, Qt6 compatibility.

This commit is contained in:
2023-04-28 22:25:29 +02:00
parent 30e6180c82
commit d699ce79f7
481 changed files with 2310 additions and 130206 deletions
+27 -4
View File
@@ -1,8 +1,31 @@
#include "voucher.h"
#include "voucheritem.h"
#include <define.h>
QX_REGISTER_CPP_SHOP(VoucherItem)
namespace qx {
template<> void register_class(QxClass<VoucherItem> &t) {
t.setName("VoucherItem");
t.id(&VoucherItem::m_id, "id");
t.data(&VoucherItem::m_name, "name");
t.data(&VoucherItem::m_count, "count");
t.data(&VoucherItem::m_unitPrice, "unitPrice");
t.data(&VoucherItem::m_vatRate, "vatRate");
t.data(&VoucherItem::m_priceWitouthVat, "priceWitouthVat");
t.data(&VoucherItem::m_price, "price");
t.data(&VoucherItem::m_refId, "refId");
t.data(&VoucherItem::m_itemPlugin, "itemPlugin");
t.data(&VoucherItem::m_vatType, "vatType");
t.data(&VoucherItem::m_insertDate, "insertDate");
t.relationManyToOne(&VoucherItem::m_voucher, "voucher");
}
}
VoucherItem::VoucherItem(QObject *parent) : QObject(parent)
{
m_id = 0;
m_price = 0;
m_unitPrice = 0;
m_count = 0;
@@ -12,12 +35,12 @@ VoucherItem::VoucherItem(QObject *parent) : QObject(parent)
m_priceWitouthVat = 0;
}
int VoucherItem::id() const
long VoucherItem::id() const
{
return m_id;
}
void VoucherItem::setId(int id)
void VoucherItem::setId(long id)
{
m_id = id;
}
@@ -117,12 +140,12 @@ QDecDouble VoucherItem::vatAmount() const
return TO_DEC(m_price) - TO_DEC(m_priceWitouthVat);
}
QWeakPointer<Voucher> VoucherItem::voucher() const
QSharedPointer<Voucher> VoucherItem::voucher() const
{
return m_voucher;
}
void VoucherItem::setVoucher(const QWeakPointer<Voucher> &voucher)
void VoucherItem::setVoucher(const QSharedPointer<Voucher> &voucher)
{
m_voucher = voucher;
}