2016-03-02 23:26:37 +01:00
|
|
|
#include "commoditytypedata.h"
|
|
|
|
|
|
|
|
|
|
CommodityTypeData::CommodityTypeData(QObject *parent)
|
|
|
|
|
:ComboItem(parent)
|
|
|
|
|
{
|
2016-05-03 22:09:05 +02:00
|
|
|
m_id = 0;
|
2016-03-02 23:26:37 +01:00
|
|
|
}
|
|
|
|
|
int CommodityTypeData::id() const
|
|
|
|
|
{
|
|
|
|
|
return m_id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CommodityTypeData::setId(int id)
|
|
|
|
|
{
|
|
|
|
|
m_id = id;
|
|
|
|
|
}
|
|
|
|
|
QString CommodityTypeData::name() const
|
|
|
|
|
{
|
|
|
|
|
return m_name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CommodityTypeData::setName(const QString &name)
|
|
|
|
|
{
|
|
|
|
|
m_name = name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool CommodityTypeData::eq(ComboItem *other)
|
|
|
|
|
{
|
|
|
|
|
CommodityTypeData* ct = qobject_cast<CommodityTypeData *> (other);
|
|
|
|
|
|
|
|
|
|
return ct != NULL && this->id() == ct->id() ;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString CommodityTypeData::toString()
|
|
|
|
|
{
|
|
|
|
|
return this->name();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|