1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
/*
SPDX-FileCopyrightText: 2012 Christian Mollekopf <mollekopf@kolabsys.com>
SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include "noinferiorsattribute.h"
#include <QByteArray>
NoInferiorsAttribute::NoInferiorsAttribute(bool noInferiors)
: mNoInferiors(noInferiors)
{
}
void NoInferiorsAttribute::setNoInferiors(bool noInferiors)
{
mNoInferiors = noInferiors;
}
bool NoInferiorsAttribute::noInferiors() const
{
return mNoInferiors;
}
QByteArray NoInferiorsAttribute::type() const
{
static const QByteArray sType("noinferiors");
return sType;
}
Akonadi::Attribute *NoInferiorsAttribute::clone() const
{
return new NoInferiorsAttribute(mNoInferiors);
}
QByteArray NoInferiorsAttribute::serialized() const
{
return mNoInferiors ? QByteArray::number(1) : QByteArray::number(0);
}
void NoInferiorsAttribute::deserialize(const QByteArray &data)
{
mNoInferiors = (data.toInt() == 0) ? false : true;
}
|