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.
prodejna/commodity/data/commoditytypedata.cpp

39 lines
609 B
C++

#include "commoditytypedata.h"
CommodityTypeData::CommodityTypeData(QObject *parent)
:ComboItem(parent)
{
}
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();
}