fort/src/ui/conf/addressgroup.cpp

63 lines
1.2 KiB
C++
Raw Normal View History

2017-09-02 10:17:51 +00:00
#include "addressgroup.h"
AddressGroup::AddressGroup(QObject *parent) :
QObject(parent),
2019-10-23 12:03:59 +00:00
m_edited(false),
m_includeAll(true),
2020-01-01 11:28:59 +00:00
m_excludeAll(false)
2017-09-02 10:17:51 +00:00
{
}
void AddressGroup::setIncludeAll(bool includeAll)
2017-09-02 10:17:51 +00:00
{
if (m_includeAll != includeAll) {
m_includeAll = includeAll;
emit includeAllChanged();
2019-10-23 12:03:59 +00:00
setEdited(true);
2017-09-02 10:17:51 +00:00
}
}
void AddressGroup::setExcludeAll(bool excludeAll)
2017-09-02 10:17:51 +00:00
{
if (m_excludeAll != excludeAll) {
m_excludeAll = excludeAll;
emit excludeAllChanged();
2019-10-23 12:03:59 +00:00
setEdited(true);
}
}
void AddressGroup::setIncludeText(const QString &includeText)
{
if (m_includeText != includeText) {
m_includeText = includeText;
emit includeTextChanged();
2019-10-23 12:03:59 +00:00
setEdited(true);
}
}
void AddressGroup::setExcludeText(const QString &excludeText)
{
if (m_excludeText != excludeText) {
m_excludeText = excludeText;
emit excludeTextChanged();
2019-10-23 12:03:59 +00:00
setEdited(true);
2017-09-02 10:17:51 +00:00
}
}
2019-10-23 12:03:59 +00:00
void AddressGroup::copy(const AddressGroup &o)
{
2019-12-08 09:50:41 +00:00
m_edited = o.edited();
2019-10-23 12:03:59 +00:00
m_includeAll = o.includeAll();
m_excludeAll = o.excludeAll();
2019-10-27 15:12:59 +00:00
m_id = o.id();
2019-10-23 12:03:59 +00:00
m_includeText = o.includeText();
m_excludeText = o.excludeText();
}