You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
1.2 KiB
C++
81 lines
1.2 KiB
C++
#include "serviceitem.h"
|
|
#include <define.h>
|
|
|
|
ServiceItem::ServiceItem(QObject *parent) : QObject(parent)
|
|
{
|
|
m_id = 0;
|
|
m_salePossible = false;
|
|
m_price = 0;
|
|
m_type = AccService::OTHER;
|
|
}
|
|
|
|
int ServiceItem::id() const
|
|
{
|
|
return m_id;
|
|
}
|
|
|
|
void ServiceItem::setId(int id)
|
|
{
|
|
m_id = id;
|
|
}
|
|
|
|
QString ServiceItem::name() const
|
|
{
|
|
return m_name;
|
|
}
|
|
|
|
void ServiceItem::setName(const QString &name)
|
|
{
|
|
m_name = name;
|
|
}
|
|
|
|
QString ServiceItem::code() const
|
|
{
|
|
return m_code;
|
|
}
|
|
|
|
void ServiceItem::setCode(const QString &code)
|
|
{
|
|
m_code = code;
|
|
}
|
|
|
|
QDecDouble ServiceItem::price() const
|
|
{
|
|
return TO_DEC(m_price);
|
|
}
|
|
|
|
void ServiceItem::setPrice(QDecDouble price)
|
|
{
|
|
m_price = FROM_DEC(price);
|
|
}
|
|
|
|
bool ServiceItem::salePossible() const
|
|
{
|
|
return m_salePossible;
|
|
}
|
|
|
|
void ServiceItem::setSalePossible(bool salePossible)
|
|
{
|
|
m_salePossible = salePossible;
|
|
}
|
|
|
|
AccService::ServiceType ServiceItem::type() const
|
|
{
|
|
return m_type;
|
|
}
|
|
|
|
void ServiceItem::setType(const AccService::ServiceType &type)
|
|
{
|
|
m_type = type;
|
|
}
|
|
|
|
QWeakPointer<CampData> ServiceItem::campData() const
|
|
{
|
|
return m_campData;
|
|
}
|
|
|
|
void ServiceItem::setCampData(const QWeakPointer<CampData> &campData)
|
|
{
|
|
m_campData = campData;
|
|
}
|