Syndication
20class SYNDICATION_NO_EXPORT Content::ContentPrivate
25 , formatIdentified(false)
28 mutable Format format;
29 mutable bool formatIdentified;
34 , d(new ContentPrivate)
39 : ElementWrapper(element)
40 , d(new ContentPrivate)
44Content::Content(
const Content &other)
45 : ElementWrapper(other)
54Content &Content::operator=(
const Content &other)
56 ElementWrapper::operator=(other);
63 return attribute(QStringLiteral(
"type"));
68 return completeURI(attribute(QStringLiteral(
"src")));
79Content::Format Content::mapTypeToFormat(
const QString &typep,
const QString &src)
86 type = QStringLiteral(
"text");
103 xmltypes.
append(QStringLiteral(
"xhtml"));
104 xmltypes.
append(QStringLiteral(
"application/xhtml+xml"));
106 xmltypes.
append(QStringLiteral(
"text/xml"));
107 xmltypes.
append(QStringLiteral(
"application/xml"));
108 xmltypes.
append(QStringLiteral(
"text/xml-external-parsed-entity"));
109 xmltypes.
append(QStringLiteral(
"application/xml-external-parsed-entity"));
110 xmltypes.
append(QStringLiteral(
"application/xml-dtd"));
111 xmltypes.
append(QStringLiteral(
"text/x-dtd"));
124Content::Format Content::format()
const
126 if (d->formatIdentified ==
false) {
127 d->format = mapTypeToFormat(
type(), src());
128 d->formatIdentified =
true;
133bool Content::isBinary()
const
135 return format() ==
Binary;
138bool Content::isContained()
const
143bool Content::isPlainText()
const
148bool Content::isEscapedHTML()
const
150 return format() == EscapedHTML;
153bool Content::isXML()
const
155 return format() == XML;
158QString Content::asString()
const
162 if (f == PlainText) {
163 return plainTextToHtml(text()).
trimmed();
164 }
else if (f == EscapedHTML) {
166 }
else if (f == XML) {
167 return childNodesAsXML().
trimmed();
173QString Content::debugInfo()
const
177 if (!src().isNull()) {
Type type(const QSqlDatabase &db)
QByteArray fromBase64(const QByteArray &base64, Base64Options options)
void append(QList< T > &&value)
bool isEmpty() const const
void reserve(qsizetype size)
bool isEmpty() const const
QString number(double n, char format, int precision)
QString trimmed() const const
bool contains(QLatin1StringView str, Qt::CaseSensitivity cs) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:15 by
doxygen 1.10.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.