kabc
24 #include <qstringlist.h>
28 class Impp::Private :
public QSharedData
35 Private(
const Private &other )
36 : QSharedData( other )
38 address = other.address;
39 imType = other.imType;
40 parameters = other.parameters;
42 QMap<QString, QStringList> parameters;
53 Impp::Impp(
const Impp &other)
58 Impp::Impp(
const QString &address)
69 bool Impp::isValid()
const
71 return !d->address.isEmpty() && !d->imType.isEmpty();
74 void Impp::setIMType(
const QString &type)
79 QString Impp::imType()
const
84 void Impp::setAddress(
const QString &address)
89 QString Impp::address()
const
94 void Impp::setParameters(
const QMap<QString, QStringList> ¶ms)
96 d->parameters = params;
99 QMap<QString, QStringList> Impp::parameters()
const
101 return d->parameters;
104 bool Impp::operator==(
const Impp &other)
const
106 return (d->parameters == other.parameters()) && (d->address == other.address()) && (d->imType == other.imType());
109 bool Impp::operator!=(
const Impp &other)
const
111 return !( other == *this );
114 Impp &Impp::operator=(
const Impp &other)
116 if (
this != &other ) {
123 QString Impp::toString()
const
126 str += QString::fromLatin1(
"Impp {\n" );
127 str += QString::fromLatin1(
" address: %1\n" ).arg( d->address );
128 str += QString::fromLatin1(
" type: %1\n" ).arg( d->imType );
129 if (!d->parameters.isEmpty()) {
130 QMapIterator<QString, QStringList> i(d->parameters);
132 while (i.hasNext()) {
134 param += QString::fromLatin1(
"%1 %2").arg(i.key()).arg(i.value().join(QLatin1String(
",")));
136 str += QString::fromLatin1(
" parameters: %1\n" ).arg( param );
138 str += QString::fromLatin1(
"}\n" );
145 return s << impp.d->parameters << impp.d->address << impp.d->imType;
150 s >> impp.d->parameters >> impp.d->address >> impp.d->imType;
Class that holds a Calendar Url (FBURL/CALADRURI/CALURI)
QDataStream & operator>>(QDataStream &stream, Address &address)
Initializes the address object from the stream.
QDataStream & operator<<(QDataStream &stream, const Address &address)
Serializes the address object into the stream.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Jan 29 2020 00:00:00 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.