#include <image.h>
Inherits TQObject.
Represents an image as stored in a RSS file.
You don't have to instantiate one of these yourself, the common way to access instances is via Document::image().
- See also
- Document::image()
Definition at line 34 of file image.h.
◆ Image() [1/3]
Default constructor.
Definition at line 38 of file image.cpp.
◆ Image() [2/3]
Image::Image |
( |
const Image & |
other | ) |
|
Copy constructor.
- Parameters
-
other | The Image object to copy. |
Definition at line 42 of file image.cpp.
◆ Image() [3/3]
Image::Image |
( |
const TQDomNode & |
node | ) |
|
Constructs an Image from a piece of RSS markup.
- Parameters
-
node | A TQDomNode which references the DOM leaf to be used for constructing the Image. |
Definition at line 47 of file image.cpp.
◆ ~Image()
◆ description()
TQString Image::description |
( |
| ) |
const |
RSS 0.91 and upwards.
- Returns
- A description of what this picture shows, or TQString() if no description is available. Useful for people who deactivated images but want or need to know what is shown.
Definition at line 90 of file image.cpp.
◆ getPixmap()
void Image::getPixmap |
( |
| ) |
|
Makes the image download the image data as referenced by the URL returned by url().
You have to connect to the signal gotPixmap() first and then call getPixmap().
Definition at line 105 of file image.cpp.
◆ gotPixmap
void RSS::Image::gotPixmap |
( |
const TQPixmap & |
pixmap | ) |
|
|
signal |
Emitted when this Image is done downloading the actual graphics data as referenced by the URL returned by url().
You can trigger this download by calling getPixmap().
- Parameters
-
pixmap | The pixmap as constructed from the data referenced by the URL returned by link(). |
◆ height()
unsigned int Image::height |
( |
| ) |
const |
RSS 0.91 and upwards.
- Returns
- The height in pixels as reported by the news site, the default value is 31 pixels. The RSS 0.91 Specification requires this value to be between 1 and 400. '0' if this information isn't available. This is merely provided for completeness, you should not rely on this value but rather check what height the TQPixmap as returned by gotPixmap() reports.
Definition at line 95 of file image.cpp.
◆ link()
const KURL & Image::link |
( |
| ) |
const |
RSS 0.90 and upwards.
- Returns
- A link to some resource, or an empty KURL of no link is available. Clicking on the image should lead the user to the resource referenced by this URL. Note that the RSS 0.91 Specification dictates that URLs not starting with "http://" or "ftp://" are considered invalid.
Definition at line 85 of file image.cpp.
◆ operator!=()
bool RSS::Image::operator!= |
( |
const Image & |
other | ) |
const |
|
inline |
Convenience method.
Simply calls !operator==().
- Parameters
-
other | The image to compared with. |
- Returns
- Whether the two images are unequal.
Definition at line 78 of file image.h.
◆ operator=()
Assignment operator.
- Parameters
-
other | The Image object to clone. |
- Returns
- A reference to the cloned Image object.
Definition at line 145 of file image.cpp.
◆ operator==()
bool Image::operator== |
( |
const Image & |
other | ) |
const |
Compares two images.
Two images are considered identical if their properties (title, description, link etc.) are identical. Note that this does not include the actual pixmap data!
- Parameters
-
other | The image to compare with. |
- Returns
- Whether the two images are equal.
Definition at line 156 of file image.cpp.
◆ title()
TQString Image::title |
( |
| ) |
const |
RSS 0.90 and upwards.
- Returns
- The 'caption' of this image, or TQString() if no caption is available.
Definition at line 75 of file image.cpp.
◆ url()
const KURL & Image::url |
( |
| ) |
const |
RSS 0.90 and upwards.
- Returns
- The URL pointing to the file containing the graphic data (GIF, JPEG or PNG format), or an empty KURL if no URL is available. You can use getPixmap() and gotPixmap() to have the Image download the pixmap data itself. Note that the RSS 0.91 Specification dictates that URLs not starting with "http://" or "ftp://" are considered invalid.
Definition at line 80 of file image.cpp.
◆ width()
unsigned int Image::width |
( |
| ) |
const |
RSS 0.91 and upwards.
- Returns
- The width in pixels as reported by the news site, the default value is 88 pixels. The RSS 0.91 Specification requires this value to be between 1 and 144. This is merely provided for completeness, you should not rely on this value but rather check what width the TQPixmap as returned by gotPixmap() reports.
Definition at line 100 of file image.cpp.
The documentation for this class was generated from the following files: