Syndication

rss2/source.cpp
1/*
2 This file is part of the syndication library
3 SPDX-FileCopyrightText: 2005 Frank Osterfeld <osterfeld@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#include "source.h"
9#include "tools.h"
10
11#include <QString>
12
13namespace Syndication
14{
15namespace RSS2
16{
18 : ElementWrapper()
19{
20}
21
23 : ElementWrapper(element)
24{
25}
26
28{
29 return text();
30}
31
33{
34 return attribute(QStringLiteral("url"));
35}
36
38{
39 QString info = QLatin1String("### Source: ###################\n");
40 if (!source().isNull()) {
41 info += QLatin1String("source: #") + source() + QLatin1String("#\n");
42 }
43 if (!url().isNull()) {
44 info += QLatin1String("url: #") + url() + QLatin1String("#\n");
45 }
46 info += QLatin1String("### Source end ################\n");
47 return info;
48}
49
50} // namespace RSS2
51} // namespace Syndication
Source()
Default constructor, creates a null object, for which isNull() is true.
QString source() const
The name of the RSS channel that the item came from, derived from its <title>.
QString debugInfo() const
Returns a description of the object for debugging purposes.
QString url() const
Required attribute, links to the XMLization of the source.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sun Feb 25 2024 18:39:48 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.