Syndication

rss2/source.cpp
1 /*
2  This file is part of the syndication library
3  SPDX-FileCopyrightText: 2005 Frank Osterfeld <[email protected]>
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 
13 namespace Syndication
14 {
15 namespace RSS2
16 {
18  : ElementWrapper()
19 {
20 }
21 
22 Source::Source(const QDomElement &element)
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
QString debugInfo() const
Returns a description of the object for debugging purposes.
Definition: rss2/source.cpp:37
QString url() const
Required attribute, links to the XMLization of the source.
Definition: rss2/source.cpp:32
QString source() const
The name of the RSS channel that the item came from, derived from its <title>.
Definition: rss2/source.cpp:27
Source()
Default constructor, creates a null object, for which isNull() is true.
Definition: rss2/source.cpp:17
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Jun 6 2023 03:56:27 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.