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.
86 lines
1.4 KiB
C++
86 lines
1.4 KiB
C++
#include "personprice.h"
|
|
#include <define.h>
|
|
|
|
QX_REGISTER_CPP_CAMP(PersonPrice)
|
|
|
|
namespace qx {
|
|
template<> void register_class(QxClass<PersonPrice>& t) {
|
|
t.setName("PersonPrice");
|
|
t.id(&PersonPrice::m_id, "id");
|
|
t.data(&PersonPrice::m_description, "description");
|
|
t.data(&PersonPrice::m_fromAge, "fromAge");
|
|
t.data(&PersonPrice::m_toAge, "toAge");
|
|
t.data(&PersonPrice::m_price, "price");
|
|
t.data(&PersonPrice::m_active, "active");
|
|
}
|
|
}
|
|
|
|
PersonPrice::PersonPrice(QObject *parent) : QObject(parent)
|
|
{
|
|
m_id = 0;
|
|
m_fromAge = 0;
|
|
m_toAge = 0;
|
|
m_price = 0;
|
|
m_active = true;
|
|
}
|
|
|
|
long PersonPrice::id() const
|
|
{
|
|
return m_id;
|
|
}
|
|
|
|
void PersonPrice::setId(long id)
|
|
{
|
|
m_id = id;
|
|
}
|
|
|
|
QString PersonPrice::description() const
|
|
{
|
|
return m_description;
|
|
}
|
|
|
|
void PersonPrice::setDescription(const QString &description)
|
|
{
|
|
m_description = description;
|
|
}
|
|
|
|
int PersonPrice::fromAge() const
|
|
{
|
|
return m_fromAge;
|
|
}
|
|
|
|
void PersonPrice::setFromAge(int fromAge)
|
|
{
|
|
m_fromAge = fromAge;
|
|
}
|
|
|
|
int PersonPrice::toAge() const
|
|
{
|
|
return m_toAge;
|
|
}
|
|
|
|
void PersonPrice::setToAge(int toAge)
|
|
{
|
|
m_toAge = toAge;
|
|
}
|
|
|
|
QDecDouble PersonPrice::price() const
|
|
{
|
|
return TO_DEC(m_price);
|
|
}
|
|
|
|
void PersonPrice::setPrice(QDecDouble price)
|
|
{
|
|
m_price = FROM_DEC(price);
|
|
}
|
|
|
|
bool PersonPrice::active() const
|
|
{
|
|
return m_active;
|
|
}
|
|
|
|
void PersonPrice::setActive(bool active)
|
|
{
|
|
m_active = active;
|
|
}
|