Added country combo to addressbook. Addressbook plugin depends on Countryregister which must be loaded first.

This commit is contained in:
2017-05-08 14:03:51 +02:00
parent 4c00364698
commit d5ead1b187
11 changed files with 112 additions and 10 deletions
+13
View File
@@ -106,6 +106,19 @@ void AddressbookData::setId(int id)
m_id = id;
}
QSharedPointer<QObject> AddressbookData::country() const
{
return m_country;
}
void AddressbookData::setCountry(const QSharedPointer<QObject> &country)
{
if (qobject_cast<CountryData*>(country.data()) != NULL)
{
m_country = qSharedPointerDynamicCast<CountryData, QObject>(country);
}
}
bool AddressbookData::eq(ComboItem *other)
{
AddressbookData *adb = qobject_cast<AddressbookData*>(other);