kabc
23#include <klocalizedstring.h>
25#include <QtCore/QDataStream>
26#include <QtCore/QSharedData>
30class Secrecy::PrivateData :
public QSharedData
34 : mType( Secrecy::Invalid )
38 PrivateData(
const PrivateData &other )
39 : QSharedData( other )
47Secrecy::Secrecy( Type type )
48 : d( new PrivateData )
53Secrecy::Secrecy(
const Secrecy &other )
62Secrecy &Secrecy::operator=(
const Secrecy &other )
64 if (
this != &other ) {
71bool Secrecy::operator==(
const Secrecy &other )
const
73 return d->mType == other.d->mType;
76bool Secrecy::operator!=(
const Secrecy &other )
const
78 return !( *
this == other );
81bool Secrecy::isValid()
const
83 return d->mType != Invalid;
86void Secrecy::setType( Type type )
91Secrecy::Type Secrecy::type()
const
96Secrecy::TypeList Secrecy::typeList()
100 if ( list.isEmpty() ) {
101 list << Public << Private << Confidential;
107QString 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" );
125QString Secrecy::toString()
const
129 str += QString::fromLatin1(
"Secrecy {\n" );
130 str += QString::fromLatin1(
" Type: %1\n" ).arg( typeLabel( d->mType ) );
131 str += QString::fromLatin1(
"}\n" );
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;
Class that holds a Calendar Url (FBURL/CALADRURI/CALURI)
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.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by
doxygen 1.10.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.