syndication/atom
26#include <QtCore/QString>
28namespace Syndication {
35Link::Link(
const QDomElement& element) : ElementWrapper(element)
41 return completeURI(attribute(QLatin1String(
"href")));
47 return attribute(QLatin1String(
"rel"), QLatin1String(
"alternate"));
52 return attribute(QLatin1String(
"type"));
57 return attribute(QLatin1String(
"hreflang"));
62 return attribute(QLatin1String(
"title"));
67 QString lengthStr = attribute(QLatin1String(
"length"));
70 uint c = lengthStr.toUInt(&ok);
77 info += QLatin1String(
"### Link: ###################\n");
78 if (!
title().isEmpty())
79 info += QLatin1String(
"title: #") +
title() + QLatin1String(
"#\n");
80 if (!
href().isEmpty())
81 info += QLatin1String(
"href: #") +
href() + QLatin1String(
"#\n");
83 info += QLatin1String(
"rel: #") +
rel() + QLatin1String(
"#\n");
84 if (!
type().isEmpty())
85 info += QLatin1String(
"type: #") +
type() + QLatin1String(
"#\n");
87 info += QLatin1String(
"length: #") + QString::number(
length()) + QLatin1String(
"#\n");
89 info += QLatin1String(
"hrefLanguage: #") +
hrefLanguage() + QLatin1String(
"#\n");
90 info += QLatin1String(
"### Link end ################\n");
uint length() const
size of the linked resource in bytes.
QString debugInfo() const
description of the link object for debugging purposes
Link()
creates a null link object.
QString rel() const
the relation between the feed/entry and the linked resource.
QString type() const
MIME type of the linked resource.
QString title() const
human-readable information about the link.
QString href() const
URL of the referenced resource (required)
QString hrefLanguage() const
the language of the linked resource.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by
doxygen 1.9.5 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.