syndication/atom
24 #include "constants.h" 26 #include <QtCore/QString> 28 namespace Syndication {
35 Link::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");
QString type() const
MIME type of the linked resource.
uint length() const
size of the linked resource in bytes.
QString rel() const
the relation between the feed/entry and the linked resource.
QString hrefLanguage() const
the language of the linked resource.
QString href() const
URL of the referenced resource (required)
QString debugInfo() const
description of the link object for debugging purposes
Link()
creates a null link object.
QString title() const
human-readable information about the link.
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Thu Jul 25 2019 00:00:00 by
doxygen 1.8.15 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.