Build system changed to Cmake, ORM changed to QxORM, Qt6 compatibility.
This commit is contained in:
+11
-11
@@ -6,16 +6,17 @@
|
||||
#include <QSharedPointer>
|
||||
#include <QWeakPointer>
|
||||
#include <QDecDouble.hh>
|
||||
#include <data/accservice.h>
|
||||
|
||||
#include <odb/core.hxx>
|
||||
#include <accservice.h>
|
||||
#include "../camp_global.h"
|
||||
|
||||
class CampData;
|
||||
|
||||
#pragma db object
|
||||
class ServiceItem : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
QX_REGISTER_FRIEND_CLASS(ServiceItem)
|
||||
Q_PROPERTY(QString name READ name WRITE setName)
|
||||
Q_PROPERTY(QString code READ code WRITE setCode)
|
||||
Q_PROPERTY(QString description READ description WRITE setDescription)
|
||||
@@ -27,10 +28,10 @@ class ServiceItem : public QObject
|
||||
Q_ENUMS(AccService::ServiceType)
|
||||
|
||||
public:
|
||||
explicit ServiceItem(QObject *parent = 0);
|
||||
explicit ServiceItem(QObject *parent = nullptr);
|
||||
|
||||
int id() const;
|
||||
void setId(int id);
|
||||
long id() const;
|
||||
void setId(long id);
|
||||
|
||||
QString name() const;
|
||||
void setName(const QString &name);
|
||||
@@ -63,9 +64,7 @@ public:
|
||||
void setFullPrice(QDecDouble fullPrice);
|
||||
|
||||
private:
|
||||
friend class odb::access;
|
||||
#pragma db id auto
|
||||
int m_id;
|
||||
long m_id;
|
||||
QString m_name;
|
||||
QString m_code;
|
||||
QString m_description;
|
||||
@@ -75,8 +74,9 @@ private:
|
||||
int m_sale;
|
||||
bool m_salePossible;
|
||||
AccService::ServiceType m_type;
|
||||
#pragma db not_null
|
||||
QWeakPointer<CampData> m_campData;
|
||||
CampDataPtr m_campData;
|
||||
};
|
||||
|
||||
QX_REGISTER_HPP_CAMP(ServiceItem, QObject, 0)
|
||||
|
||||
#endif // SREVICEITEM_H
|
||||
|
||||
Reference in New Issue
Block a user