#include <image.h>
Inherits TQObject.
Signals | |
void | gotPixmap (const TQPixmap &pixmap) |
Public Member Functions | |
Image () | |
Image (const Image &other) | |
Image (const TQDomNode &node) | |
Image & | operator= (const Image &other) |
bool | operator== (const Image &other) const |
bool | operator!= (const Image &other) const |
virtual | ~Image () |
TQString | title () const |
const KURL & | url () const |
const KURL & | link () const |
TQString | description () const |
unsigned int | height () const |
unsigned int | width () const |
void | getPixmap () |
void | abort () |
Detailed Description
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()
Constructor & Destructor Documentation
Image::Image | ( | ) |
Image::Image | ( | const Image & | other | ) |
Image::Image | ( | const TQDomNode & | node | ) |
Image::~Image | ( | ) | [virtual] |
Member Function Documentation
TQString Image::description | ( | ) | const |
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().
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().
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.
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.
bool RSS::Image::operator!= | ( | const Image & | other | ) | const [inline] |
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.
TQString Image::title | ( | ) | const |
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.
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.
The documentation for this class was generated from the following files: