1 | /* |
---|---|
2 | This file is part of the syndication library |
3 | SPDX-FileCopyrightText: 2006 Frank Osterfeld <osterfeld@kde.org> |
4 | |
5 | SPDX-License-Identifier: LGPL-2.0-or-later |
6 | */ |
7 | |
8 | #include "image.h" |
9 | #include "rssvocab.h" |
10 | #include "statement.h" |
11 | |
12 | namespace Syndication |
13 | { |
14 | namespace RDF |
15 | { |
16 | Image::Image() |
17 | : ResourceWrapper() |
18 | { |
19 | } |
20 | |
21 | Image::Image(ResourcePtr resource) |
22 | : ResourceWrapper(resource) |
23 | { |
24 | } |
25 | |
26 | Image::~Image() |
27 | { |
28 | } |
29 | |
30 | QString Image::title() const |
31 | { |
32 | return resource()->property(property: RSSVocab::self()->title())->asString(); |
33 | } |
34 | |
35 | QString Image::link() const |
36 | { |
37 | return resource()->property(property: RSSVocab::self()->link())->asString(); |
38 | } |
39 | |
40 | QString Image::url() const |
41 | { |
42 | return resource()->property(property: RSSVocab::self()->url())->asString(); |
43 | } |
44 | |
45 | QString Image::debugInfo() const |
46 | { |
47 | QString info = QLatin1String("### Image: ###################\n"); |
48 | info += QLatin1String("url: #") + url() + QLatin1String( "#\n"); |
49 | info += QLatin1String("title: #") + title() + QLatin1String( "#\n"); |
50 | info += QLatin1String("link: #") + link() + QLatin1String( "#\n"); |
51 | info += QLatin1String("### Image end ################\n"); |
52 | return info; |
53 | } |
54 | |
55 | } // namespace RDF |
56 | } // namespace Syndication |
57 |