kabc
24 #include <qstringlist.h>
28 class Email::Private :
public QSharedData
35 Private(
const Private &other )
36 : QSharedData( other )
38 parameters = other.parameters;
41 QMap<QString, QStringList> parameters;
51 Email::Email(
const QString &mail)
57 Email::Email(
const Email &other )
67 QMap<QString, QStringList> Email::parameters()
const
72 bool Email::operator==(
const Email &other)
const
74 return (d->parameters == other.parameters()) && (d->mail == other.mail());
77 bool Email::operator!=(
const Email &other)
const
79 return !( other == *this );
82 Email &Email::operator=(
const Email &other)
84 if (
this != &other ) {
91 QString Email::toString()
const
94 str += QString::fromLatin1(
"Email {\n" );
95 str += QString::fromLatin1(
" mail: %1\n" ).arg( d->mail );
96 if (!d->parameters.isEmpty()) {
97 QMapIterator<QString, QStringList> i(d->parameters);
101 param += QString::fromLatin1(
"%1 %2").arg(i.key()).arg(i.value().join(QLatin1String(
",")));
103 str += QString::fromLatin1(
" parameters: %1\n" ).arg( param );
105 str += QString::fromLatin1(
"}\n" );
109 void Email::setParameters(
const QMap<QString, QStringList> ¶ms)
111 d->parameters = params;
114 void Email::setEmail(
const QString &mail)
119 QString Email::mail()
const
124 bool Email::isValid()
const
126 return !d->mail.isEmpty();
131 return s << email.d->parameters << email.d->mail;
136 s >> email.d->parameters >> email.d->mail;
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.