akregator/src/librss
RSS::Image Class Reference
#include <image.h>
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()
Definition at line 34 of file image.h.
Signals | |
void | gotPixmap (const QPixmap &pixmap) |
Public Member Functions | |
Image () | |
Image (const Image &other) | |
Image (const QDomNode &node) | |
Image & | operator= (const Image &other) |
bool | operator== (const Image &other) const |
bool | operator!= (const Image &other) const |
virtual | ~Image () |
QString | title () const |
const KURL & | url () const |
const KURL & | link () const |
QString | description () const |
unsigned int | height () const |
unsigned int | width () const |
void | getPixmap () |
void | abort () |
Constructor & Destructor Documentation
Image::Image | ( | const Image & | other | ) |
Image::Image | ( | const QDomNode & | node | ) |
Member Function Documentation
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.
bool RSS::Image::operator!= | ( | const Image & | other | ) | const [inline] |
QString 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.
const KURL & Image::link | ( | ) | const |
QString Image::description | ( | ) | const |
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 QPixmap as returned by gotPixmap() reports.
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 QPixmap as returned by gotPixmap() reports.
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 QPixmap & | 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().
The documentation for this class was generated from the following files: