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 | #ifndef SYNDICATION_RDF_IMAGE_H |
9 | #define SYNDICATION_RDF_IMAGE_H |
10 | |
11 | #include <QString> |
12 | #include <syndication/rdf/resourcewrapper.h> |
13 | |
14 | namespace Syndication |
15 | { |
16 | namespace RDF |
17 | { |
18 | class Resource; |
19 | //@cond PRIVATE |
20 | typedef QSharedPointer<Resource> ResourcePtr; |
21 | //@endcond |
22 | |
23 | /** |
24 | * An image to be associated with an HTML rendering of the channel. |
25 | */ |
26 | class Image : public ResourceWrapper |
27 | { |
28 | public: |
29 | /** |
30 | * creates a wrapper wrapping a null resource |
31 | */ |
32 | Image(); |
33 | |
34 | /** |
35 | * creates an image object by wrapping an image resource |
36 | * |
37 | * @param resource the image resource to wrap |
38 | */ |
39 | explicit Image(ResourcePtr resource); |
40 | |
41 | /** |
42 | * destructor |
43 | */ |
44 | ~Image() override; |
45 | |
46 | /** |
47 | * Describes the image, can be used in the ALT attribute of the |
48 | * HTML @c <img> tag when the channel is rendered in HTML. |
49 | * |
50 | * @return TODO: specify format |
51 | */ |
52 | QString title() const; |
53 | |
54 | /** |
55 | * The URL of the site, when the channel is rendered, the image should |
56 | * be a link to the site. |
57 | */ |
58 | QString link() const; |
59 | |
60 | /** |
61 | * the URL of the image file |
62 | */ |
63 | QString url() const; |
64 | |
65 | /** |
66 | * Returns a description of the image for debugging purposes. |
67 | * |
68 | * @return debug string |
69 | */ |
70 | QString debugInfo() const; |
71 | }; |
72 | |
73 | } // namespace RDF |
74 | } // namespace Syndication |
75 | |
76 | #endif // SYNDICATION_RDF_IMAGE_H |
77 | |