Syndication

rss2/textinput.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 "textinput.h"
9#include "tools.h"
10
11#include <QString>
12
13namespace Syndication
14{
15namespace RSS2
16{
21
23 : ElementWrapper(element)
24{
25}
26
28{
29 return extractElementTextNS(QString(), QStringLiteral("title"));
30}
31
33{
34 return extractElementTextNS(QString(), QStringLiteral("name"));
35}
36
38{
39 return extractElementTextNS(QString(), QStringLiteral("description"));
40}
41
43{
44 return extractElementTextNS(QString(), QStringLiteral("link"));
45}
46
48{
49 QString info = QLatin1String("### TextInput: ###################\n");
50 if (!title().isNull()) {
51 info += QLatin1String("title: #") + title() + QLatin1String("#\n");
52 }
53 if (!link().isNull()) {
54 info += QLatin1String("link: #") + link() + QLatin1String("#\n");
55 }
56 if (!description().isNull()) {
57 info += QLatin1String("description: #") + description() + QLatin1String("#\n");
58 }
59 if (!name().isNull()) {
60 info += QLatin1String("name: #") + name() + QLatin1String("#\n");
61 }
62 info += QLatin1String("### TextInput end ################\n");
63 return info;
64}
65
66} // namespace RSS2
67} // namespace Syndication
A wrapper for XML elements.
bool isNull() const
returns whether the wrapped element is a null element
QString extractElementTextNS(const QString &namespaceURI, const QString &localName) const
extracts the text from a child element, respecting namespaces.
TextInput()
Default constructor, creates a null object, for which isNull() is true.
QString description() const
Explains the text input area.
QString debugInfo() const
Returns a description of the object for debugging purposes.
QString name() const
The name of the text object in the text input area.
QString link() const
The URL of the CGI script that processes text input requests.
QString title() const
The label of the Submit button in the text input area.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:03:18 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.