| 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 | |
| 13 | namespace Syndication |
| 14 | { |
| 15 | namespace RSS2 |
| 16 | { |
| 17 | TextInput::() |
| 18 | : ElementWrapper() |
| 19 | { |
| 20 | } |
| 21 | |
| 22 | TextInput::(const QDomElement &element) |
| 23 | : ElementWrapper(element) |
| 24 | { |
| 25 | } |
| 26 | |
| 27 | QString TextInput::() const |
| 28 | { |
| 29 | return extractElementTextNS(namespaceURI: QString(), QStringLiteral("title" )); |
| 30 | } |
| 31 | |
| 32 | QString TextInput::() const |
| 33 | { |
| 34 | return extractElementTextNS(namespaceURI: QString(), QStringLiteral("name" )); |
| 35 | } |
| 36 | |
| 37 | QString TextInput::() const |
| 38 | { |
| 39 | return extractElementTextNS(namespaceURI: QString(), QStringLiteral("description" )); |
| 40 | } |
| 41 | |
| 42 | QString TextInput::() const |
| 43 | { |
| 44 | return extractElementTextNS(namespaceURI: QString(), QStringLiteral("link" )); |
| 45 | } |
| 46 | |
| 47 | QString TextInput::() const |
| 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 |
| 68 | |