File indexing completed on 2024-09-08 03:43:38
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 #ifndef SYNDICATION_RDF_IMAGE_H 0009 #define SYNDICATION_RDF_IMAGE_H 0010 0011 #include <QString> 0012 #include <syndication/rdf/resourcewrapper.h> 0013 0014 namespace Syndication 0015 { 0016 namespace RDF 0017 { 0018 class Resource; 0019 //@cond PRIVATE 0020 typedef QSharedPointer<Resource> ResourcePtr; 0021 //@endcond 0022 0023 /** 0024 * An image to be associated with an HTML rendering of the channel. 0025 */ 0026 class Image : public ResourceWrapper 0027 { 0028 public: 0029 /** 0030 * creates a wrapper wrapping a null resource 0031 */ 0032 Image(); 0033 0034 /** 0035 * creates an image object by wrapping an image resource 0036 * 0037 * @param resource the image resource to wrap 0038 */ 0039 explicit Image(ResourcePtr resource); 0040 0041 /** 0042 * destructor 0043 */ 0044 ~Image() override; 0045 0046 /** 0047 * Describes the image, can be used in the ALT attribute of the 0048 * HTML @c <img> tag when the channel is rendered in HTML. 0049 * 0050 * @return TODO: specify format 0051 */ 0052 QString title() const; 0053 0054 /** 0055 * The URL of the site, when the channel is rendered, the image should 0056 * be a link to the site. 0057 */ 0058 QString link() const; 0059 0060 /** 0061 * the URL of the image file 0062 */ 0063 QString url() const; 0064 0065 /** 0066 * Returns a description of the image for debugging purposes. 0067 * 0068 * @return debug string 0069 */ 0070 QString debugInfo() const; 0071 }; 0072 0073 } // namespace RDF 0074 } // namespace Syndication 0075 0076 #endif // SYNDICATION_RDF_IMAGE_H