fort/src/ui/conf/addressgroup.cpp

40 lines
631 B
C++
Raw Normal View History

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)
{
QVariantMap map = v.toMap();
m_text = map["text"].toString();
}