File indexing completed on 2023-10-03 03:26:52

0001 /*
0002     This file is part of the syndication library
0003     SPDX-FileCopyrightText: 2005 Frank Osterfeld <osterfeld@kde.org>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #include "textinput.h"
0009 #include "tools.h"
0010 
0011 #include <QString>
0012 
0013 namespace Syndication
0014 {
0015 namespace RSS2
0016 {
0017 TextInput::TextInput()
0018     : ElementWrapper()
0019 {
0020 }
0021 
0022 TextInput::TextInput(const QDomElement &element)
0023     : ElementWrapper(element)
0024 {
0025 }
0026 
0027 QString TextInput::title() const
0028 {
0029     return extractElementTextNS(QString(), QStringLiteral("title"));
0030 }
0031 
0032 QString TextInput::name() const
0033 {
0034     return extractElementTextNS(QString(), QStringLiteral("name"));
0035 }
0036 
0037 QString TextInput::description() const
0038 {
0039     return extractElementTextNS(QString(), QStringLiteral("description"));
0040 }
0041 
0042 QString TextInput::link() const
0043 {
0044     return extractElementTextNS(QString(), QStringLiteral("link"));
0045 }
0046 
0047 QString TextInput::debugInfo() const
0048 {
0049     QString info = QLatin1String("### TextInput: ###################\n");
0050     if (!title().isNull()) {
0051         info += QLatin1String("title: #") + title() + QLatin1String("#\n");
0052     }
0053     if (!link().isNull()) {
0054         info += QLatin1String("link: #") + link() + QLatin1String("#\n");
0055     }
0056     if (!description().isNull()) {
0057         info += QLatin1String("description: #") + description() + QLatin1String("#\n");
0058     }
0059     if (!name().isNull()) {
0060         info += QLatin1String("name: #") + name() + QLatin1String("#\n");
0061     }
0062     info += QLatin1String("### TextInput end ################\n");
0063     return info;
0064 }
0065 
0066 } // namespace RSS2
0067 } // namespace Syndication