kabc
23 #include <klocalizedstring.h>
25 #include <QtCore/QDataStream>
26 #include <QtCore/QSharedData>
34 : mType( Secrecy::Invalid )
38 PrivateData(
const PrivateData &other )
47 Secrecy::Secrecy( Type type )
48 : d( new PrivateData )
53 Secrecy::Secrecy(
const Secrecy &other )
62 Secrecy &Secrecy::operator=(
const Secrecy &other )
64 if (
this != &other ) {
71 bool Secrecy::operator==(
const Secrecy &other )
const
73 return d->mType == other.d->mType;
76 bool Secrecy::operator!=(
const Secrecy &other )
const
78 return !( *
this == other );
81 bool Secrecy::isValid()
const
83 return d->mType != Invalid;
86 void Secrecy::setType( Type type )
91 Secrecy::Type Secrecy::type()
const
100 if ( list.isEmpty() ) {
101 list << Public << Private << Confidential;
107 QString Secrecy::typeLabel( Type type )
111 return i18nc(
"access is for everyone",
"Public" );
114 return i18nc(
"access is by owner only",
"Private" );
117 return i18nc(
"access is by owner and a controlled group",
"Confidential" );
120 return i18nc(
"unknown secrecy type",
"Unknown type" );
125 QString Secrecy::toString()
const
138 return s << (uint)secrecy.d->mType;
148 secrecy.d->mType = Secrecy::Public;
151 secrecy.d->mType = Secrecy::Private;
154 secrecy.d->mType = Secrecy::Confidential;
157 secrecy.d->mType = Secrecy::Invalid;
QDataStream & operator<<(QDataStream &stream, const Address &address)
Serializes the address object into the stream.
QDataStream & operator>>(QDataStream &stream, Address &address)
Initializes the address object from the stream.
QString fromLatin1(const char *str, int size)
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:39 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.