File indexing completed on 2024-04-28 15:34:24

0001 /*
0002     This file is part of the syndication library
0003     SPDX-FileCopyrightText: 2006 Frank Osterfeld <osterfeld@kde.org>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #include "image.h"
0009 #include "rssvocab.h"
0010 #include "statement.h"
0011 
0012 namespace Syndication
0013 {
0014 namespace RDF
0015 {
0016 Image::Image()
0017     : ResourceWrapper()
0018 {
0019 }
0020 
0021 Image::Image(ResourcePtr resource)
0022     : ResourceWrapper(resource)
0023 {
0024 }
0025 
0026 Image::~Image()
0027 {
0028 }
0029 
0030 QString Image::title() const
0031 {
0032     return resource()->property(RSSVocab::self()->title())->asString();
0033 }
0034 
0035 QString Image::link() const
0036 {
0037     return resource()->property(RSSVocab::self()->link())->asString();
0038 }
0039 
0040 QString Image::url() const
0041 {
0042     return resource()->property(RSSVocab::self()->url())->asString();
0043 }
0044 
0045 QString Image::debugInfo() const
0046 {
0047     QString info = QLatin1String("### Image: ###################\n");
0048     info += QLatin1String("url: #") + url() + QLatin1String("#\n");
0049     info += QLatin1String("title: #") + title() + QLatin1String("#\n");
0050     info += QLatin1String("link: #") + link() + QLatin1String("#\n");
0051     info += QLatin1String("### Image end ################\n");
0052     return info;
0053 }
0054 
0055 } // namespace RDF
0056 } // namespace Syndication