Syndication

rss2/image.h
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#ifndef SYNDICATION_RSS2_IMAGE_H
9#define SYNDICATION_RSS2_IMAGE_H
10
11#include <syndication/elementwrapper.h>
12
13class QDomElement;
14class QString;
15
16namespace Syndication
17{
18namespace RSS2
19{
20/**
21 * An RSS2 image, used to describe feed logos.
22 */
23class Image : public ElementWrapper
24{
25public:
26 /**
27 * Default constructor, creates a null object, for which isNull() is
28 * @c true.
29 */
30 Image();
31
32 /**
33 * Creates an Image object wrapping an @c &lt;image> XML element.
34 *
35 * @param element The @c &lt;image> element to wrap
36 */
37 explicit Image(const QDomElement &element);
38
39 /**
40 * the URL of a GIF, JPEG or PNG image
41 */
42 QString url() const;
43
44 /**
45 * Describes the image, can be used in the ALT attribute of the
46 * HTML @c &lt;img> tag when the channel is rendered in HTML.
47 *
48 * @return TODO: specify format
49 */
50 QString title() const;
51
52 /**
53 * The URL of the site, when the channel is rendered, the image should
54 * be a link to the site.
55 */
56 QString link() const;
57
58 /**
59 * The width of the image. If the feed itself doesn't specify a width,
60 * this method returns 88, the default value.
61 *
62 * @return image width in pixels.
63 */
64 uint width() const;
65
66 /**
67 * The height of the image. If the feed itself doesn't specify a height,
68 * this method returns 31, the default value.
69 *
70 * @return image height in pixels.
71 */
72 uint height() const;
73
74 /**
75 * optional text that can be included in the TITLE attribute of the link
76 * formed around the image in HTML rendering.
77 *
78 * @return TODO: specify format (HTML etc.)
79 */
80 QString description() const;
81
82 /**
83 * Returns a description of the object for debugging purposes.
84 *
85 * @return debug string
86 */
87 QString debugInfo() const;
88};
89
90} // namespace RSS2
91} // namespace Syndication
92
93#endif // SYNDICATION_RSS2_IMAGE_H
An RSS2 image, used to describe feed logos.
Definition rss2/image.h:24
QString description() const
optional text that can be included in the TITLE attribute of the link formed around the image in HTML...
QString link() const
The URL of the site, when the channel is rendered, the image should be a link to the site.
QString title() const
Describes the image, can be used in the ALT attribute of the HTML <img> tag when the channel is rende...
QString debugInfo() const
Returns a description of the object for debugging purposes.
uint width() const
The width of the image.
Image()
Default constructor, creates a null object, for which isNull() is true.
QString url() const
the URL of a GIF, JPEG or PNG image
uint height() const
The height of the image.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 14 2024 11:50:32 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.