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.
59 lines
845 B
C++
59 lines
845 B
C++
9 years ago
|
#include "address.h"
|
||
|
|
||
|
Address::Address(QObject *parent) : ComboItem(parent)
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
Address::~Address()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
QString Address::city() const
|
||
|
{
|
||
|
return m_city;
|
||
|
}
|
||
|
|
||
|
void Address::setCity(const QString &city)
|
||
|
{
|
||
|
m_city = city;
|
||
|
}
|
||
|
QString Address::street() const
|
||
|
{
|
||
|
return m_street;
|
||
|
}
|
||
|
|
||
|
void Address::setStreet(const QString &street)
|
||
|
{
|
||
|
m_street = street;
|
||
|
}
|
||
|
QString Address::houseNumber() const
|
||
|
{
|
||
|
return m_houseNumber;
|
||
|
}
|
||
|
|
||
|
void Address::setHouseNumber(const QString &houseNumber)
|
||
|
{
|
||
|
m_houseNumber = houseNumber;
|
||
|
}
|
||
|
int Address::id() const
|
||
|
{
|
||
|
return m_id;
|
||
|
}
|
||
|
|
||
|
void Address::setId(int id)
|
||
|
{
|
||
|
m_id = id;
|
||
|
}
|
||
|
|
||
|
bool Address::eq(ComboItem *other)
|
||
|
{
|
||
|
Address *addr = qobject_cast<Address*>(other);
|
||
|
return addr != NULL && m_id == addr->id();
|
||
|
}
|
||
|
|
||
|
QString Address::toString()
|
||
|
{
|
||
|
return m_street + ", " + m_houseNumber + ", " + m_city;
|
||
|
}
|