#include "serviceitem.h" #include ServiceItem::ServiceItem(QObject *parent) : QObject(parent) { m_id = 0; m_salePossible = false; m_sale = 0; m_price = 0; m_totalPrice = 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 ServiceItem::campData() const { return m_campData; } void ServiceItem::setCampData(const QWeakPointer &campData) { m_campData = campData; } QString ServiceItem::description() const { return m_description; } void ServiceItem::setDescription(const QString &description) { m_description = description; } QDecDouble ServiceItem::sale() const { return TO_DEC(m_sale); } void ServiceItem::setSale(QDecDouble sale) { m_sale = FROM_DEC(sale); } QDecDouble ServiceItem::totalPrice() const { return TO_DEC(m_totalPrice); } void ServiceItem::setTotalPrice(QDecDouble totalPrice) { m_totalPrice = FROM_DEC(totalPrice); } QDecDouble ServiceItem::fullPrice() const { return TO_DEC(m_fullPrice); } void ServiceItem::setFullPrice(QDecDouble fullPrice) { m_fullPrice = FROM_DEC(fullPrice); }