service plugin and qdecimal library has been added
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
#include "accservice.h"
|
||||
|
||||
AccService::AccService()
|
||||
{
|
||||
m_price = 0;
|
||||
m_active = 1;
|
||||
}
|
||||
int AccService::id() const
|
||||
{
|
||||
return m_id;
|
||||
}
|
||||
|
||||
void AccService::setId(int id)
|
||||
{
|
||||
m_id = id;
|
||||
}
|
||||
int AccService::price() const
|
||||
{
|
||||
return m_price;
|
||||
}
|
||||
|
||||
void AccService::setPrice(int price)
|
||||
{
|
||||
m_price = price;
|
||||
}
|
||||
bool AccService::active() const
|
||||
{
|
||||
return m_active;
|
||||
}
|
||||
|
||||
void AccService::setActive(bool active)
|
||||
{
|
||||
m_active = active;
|
||||
}
|
||||
bool AccService::salePossible() const
|
||||
{
|
||||
return m_salePossible;
|
||||
}
|
||||
|
||||
void AccService::setSalePossible(bool salePossible)
|
||||
{
|
||||
m_salePossible = salePossible;
|
||||
}
|
||||
AccService::ServiceType AccService::serviceType() const
|
||||
{
|
||||
return m_serviceType;
|
||||
}
|
||||
|
||||
void AccService::setServiceType(const AccService::ServiceType &serviceType)
|
||||
{
|
||||
m_serviceType = serviceType;
|
||||
}
|
||||
|
||||
QString AccService::accServiceName() const
|
||||
{
|
||||
return m_accServiceName;
|
||||
}
|
||||
|
||||
void AccService::setAccServiceName(const QString &accServiceName)
|
||||
{
|
||||
m_accServiceName = accServiceName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
#ifndef ACCSERVICE_H
|
||||
#define ACCSERVICE_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
#include <odb/core.hxx>
|
||||
|
||||
#pragma db object
|
||||
class AccService : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QString accServiceName READ accServiceName WRITE setAccServiceName)
|
||||
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)
|
||||
|
||||
public:
|
||||
AccService();
|
||||
|
||||
|
||||
|
||||
enum ServiceType { CAR,TENT,OTHER };
|
||||
|
||||
int id() const;
|
||||
void setId(int id);
|
||||
|
||||
int price() const;
|
||||
void setPrice(int price);
|
||||
|
||||
bool active() const;
|
||||
void setActive(bool active);
|
||||
|
||||
bool salePossible() const;
|
||||
void setSalePossible(bool salePossible);
|
||||
|
||||
ServiceType serviceType() const;
|
||||
void setServiceType(const ServiceType &serviceType);
|
||||
|
||||
QString accServiceName() const;
|
||||
void setAccServiceName(const QString &accServiceName);
|
||||
|
||||
private:
|
||||
friend class odb::access;
|
||||
#pragma db id auto
|
||||
int m_id;
|
||||
QString m_accServiceName;
|
||||
int m_price;
|
||||
bool m_active;
|
||||
bool m_salePossible;
|
||||
ServiceType m_serviceType;
|
||||
|
||||
};
|
||||
#endif // ACCSERVICE_H
|
||||
Reference in New Issue
Block a user