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.

122 lines
1.9 KiB
C++

#include "addressitem.h"
#include <define.h>
AddressItem::AddressItem(QObject *parent) : QObject(parent)
{
m_id = 0;
m_price = 0;
m_owner = false;
m_sale = 0;
m_totalPrice = 0;
}
int AddressItem::id() const
{
return m_id;
}
void AddressItem::setId(int id)
{
m_id = id;
}
QString AddressItem::firstName() const
{
return m_firstName;
}
void AddressItem::setFirstName(const QString &firstName)
{
m_firstName = firstName;
}
QString AddressItem::lastName() const
{
return m_lastName;
}
void AddressItem::setLastName(const QString &lastName)
{
m_lastName = lastName;
}
QString AddressItem::address() const
{
return m_address;
}
void AddressItem::setAddress(const QString &address)
{
m_address = address;
}
QDecDouble AddressItem::price() const
{
return TO_DEC(m_price);
}
void AddressItem::setPrice(QDecDouble price)
{
m_price = FROM_DEC(price);
}
QWeakPointer<CampData> AddressItem::campData() const
{
return m_campData;
}
void AddressItem::setCampData(const QWeakPointer<CampData> &campData)
{
m_campData = campData;
}
PersonPricePtr AddressItem::personPrice() const
{
return m_personPrice;
}
void AddressItem::setPersonPrice(const PersonPricePtr &personPrice)
{
m_personPrice = personPrice;
}
AddressbookDataPtr AddressItem::adbItem() const
{
return m_adbItem;
}
void AddressItem::setAdbItem(const AddressbookDataPtr &adbItem)
{
m_adbItem = adbItem;
}
bool AddressItem::owner() const
{
return m_owner;
}
void AddressItem::setOwner(bool owner)
{
m_owner = owner;
}
QDecDouble AddressItem::totalPrice() const
{
return TO_DEC(m_totalPrice);
}
void AddressItem::setTotalPrice(QDecDouble totalPrice)
{
m_totalPrice = FROM_DEC(totalPrice);
}
QDecDouble AddressItem::sale() const
{
return TO_DEC(m_sale);
}
void AddressItem::setSale(QDecDouble sale)
{
m_sale = FROM_DEC(sale);
}