Syndication

rdf/image.cpp
1 /*
2  This file is part of the syndication library
3  SPDX-FileCopyrightText: 2006 Frank Osterfeld <[email protected]>
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 {
17  : ResourceWrapper()
18 {
19 }
20 
22  : ResourceWrapper(resource)
23 {
24 }
25 
27 {
28 }
29 
31 {
32  return resource()->property(RSSVocab::self()->title())->asString();
33 }
34 
36 {
37  return resource()->property(RSSVocab::self()->link())->asString();
38 }
39 
41 {
42  return resource()->property(RSSVocab::self()->url())->asString();
43 }
44 
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
QString debugInfo() const
Returns a description of the image for debugging purposes.
Definition: rdf/image.cpp:45
QString title() const
Describes the image, can be used in the ALT attribute of the HTML <img> tag when the channel is rende...
Definition: rdf/image.cpp:30
static RSSVocab * self()
returns the singleton instance
Definition: rssvocab.cpp:67
QString url() const
the URL of the image file
Definition: rdf/image.cpp:40
Image()
creates a wrapper wrapping a null resource
Definition: rdf/image.cpp:16
ResourcePtr resource() const
returns the wrapped resource.
~Image() override
destructor
Definition: rdf/image.cpp:26
QString link() const
The URL of the site, when the channel is rendered, the image should be a link to the site...
Definition: rdf/image.cpp:35
A wrapper for RDF resources.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Tue Jan 25 2022 22:55:02 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.