new enums class in core
binding for combos
This commit is contained in:
@@ -60,6 +60,26 @@ void AccService::setAccServiceName(const QString &accServiceName)
|
||||
{
|
||||
m_accServiceName = accServiceName;
|
||||
}
|
||||
QString AccService::accServiceCode() const
|
||||
{
|
||||
return m_accServiceCode;
|
||||
}
|
||||
|
||||
void AccService::setAccServiceCode(const QString &accServiceCode)
|
||||
{
|
||||
m_accServiceCode = accServiceCode;
|
||||
}
|
||||
Enums::VatType AccService::vatType() const
|
||||
{
|
||||
return m_vatType;
|
||||
}
|
||||
|
||||
void AccService::setVatType(const Enums::VatType &VatType)
|
||||
{
|
||||
m_vatType = VatType;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,17 +6,21 @@
|
||||
|
||||
#include <odb/core.hxx>
|
||||
|
||||
#include <enums.h>
|
||||
|
||||
#pragma db object
|
||||
class AccService : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QString accServiceName READ accServiceName WRITE setAccServiceName)
|
||||
Q_PROPERTY(QString accServiceCode READ accServiceCode WRITE setAccServiceCode)
|
||||
Q_PROPERTY(int price READ price WRITE setPrice)
|
||||
Q_PROPERTY(bool active READ active WRITE setActive)
|
||||
Q_PROPERTY(bool salePossible READ salePossible WRITE setSalePossible)
|
||||
Q_PROPERTY(ServiceType serviceType READ serviceType WRITE setServiceType)
|
||||
Q_ENUMS(ServiceType)
|
||||
Q_PROPERTY(Enums::VatType vatType READ vatType WRITE setVatType)
|
||||
|
||||
public:
|
||||
AccService();
|
||||
@@ -43,6 +47,13 @@ public:
|
||||
QString accServiceName() const;
|
||||
void setAccServiceName(const QString &accServiceName);
|
||||
|
||||
|
||||
QString accServiceCode() const;
|
||||
void setAccServiceCode(const QString &accServiceCode);
|
||||
|
||||
Enums::VatType vatType() const;
|
||||
void setVatType(const Enums::VatType &vatType);
|
||||
|
||||
private:
|
||||
friend class odb::access;
|
||||
#pragma db id auto
|
||||
@@ -52,6 +63,8 @@ private:
|
||||
bool m_active;
|
||||
bool m_salePossible;
|
||||
ServiceType m_serviceType;
|
||||
QString m_accServiceCode;
|
||||
Enums::VatType m_vatType;
|
||||
|
||||
};
|
||||
#endif // ACCSERVICE_H
|
||||
|
||||
Reference in New Issue
Block a user