2017-09-02 10:17:51 +00:00
|
|
|
#include "addressgroup.h"
|
|
|
|
|
|
|
|
AddressGroup::AddressGroup(QObject *parent) :
|
|
|
|
QObject(parent),
|
|
|
|
m_useAll(false)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void AddressGroup::setUseAll(bool useAll)
|
|
|
|
{
|
|
|
|
if (m_useAll != useAll) {
|
|
|
|
m_useAll = useAll;
|
|
|
|
emit useAllChanged();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void AddressGroup::setText(const QString &text)
|
|
|
|
{
|
|
|
|
if (m_text != text) {
|
|
|
|
m_text = text;
|
|
|
|
emit textChanged();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
QVariant AddressGroup::toVariant() const
|
|
|
|
{
|
|
|
|
QVariantMap map;
|
|
|
|
|
|
|
|
map["text"] = text();
|
|
|
|
|
|
|
|
return map;
|
|
|
|
}
|
|
|
|
|
|
|
|
void AddressGroup::fromVariant(const QVariant &v)
|
|
|
|
{
|
2017-09-09 00:07:38 +00:00
|
|
|
const QVariantMap map = v.toMap();
|
2017-09-02 10:17:51 +00:00
|
|
|
|
|
|
|
m_text = map["text"].toString();
|
|
|
|
}
|