an Extendable KDE Blogging Client Logo

Blokkal::ImageFetcher Class Reference

A utility class to fetch images via HTTP. More...

#include <blokkalimagefetcher.h>

Inheritance diagram for Blokkal::ImageFetcher:

List of all members.


void imageReceived (QImage image, const QString &url)

Public Member Functions

 ImageFetcher (const QString &imageUrl, QObject *parent=0)
bool isAutoDelete (void)
void setAutoDelete (bool enable)
 ~ImageFetcher (void)

Detailed Description

A utility class to fetch images via HTTP.

A utility class to fetch images via HTTP. Example usage:

 ImageFetcher * fetcher = new ImageFetcher( "" );
 connect( fetcher, SIGNAL( imageReceived( QImage, const QString & ) ), this, SLOT( processImage( QImage, const QString & ) ) );
Martin Müller <>

Definition at line 46 of file blokkalimagefetcher.h.

Constructor & Destructor Documentation

Blokkal::ImageFetcher::ImageFetcher ( const QString &  imageUrl,
QObject *  parent = 0 

Creates a new image fetcher instance. You must connect to imageReceived() imidiately. ImageFetchers are set up to destroy themself after emitting the imageReceived() signal. You can disable this with setAutoDelete().

imageUrl url of the image to fetch
parent the parent object

Definition at line 42 of file blokkalimagefetcher.cpp.

Blokkal::ImageFetcher::~ImageFetcher ( void   ) 


Definition at line 56 of file blokkalimagefetcher.cpp.

Member Function Documentation

void Blokkal::ImageFetcher::imageReceived ( QImage  image,
const QString &  url 
) [signal]

This signal is emitted when the reqested image becomes availabe. If image is a null image, an error occured.

image the image
url the url supplied to the fetcher

bool Blokkal::ImageFetcher::isAutoDelete ( void   ) 

Returns whether this fetcher is set up to destroy itself after fetching the image.

TRUE if the fetcher will destruct itself automatically

Definition at line 86 of file blokkalimagefetcher.cpp.

void Blokkal::ImageFetcher::setAutoDelete ( bool  enable  ) 

Sets the auto delete property. When enabled, the ImageFetcher will destroy itself after emitting imageReceived. This is enabled by default.

enable TRUE to enable auto desruction.

Definition at line 91 of file blokkalimagefetcher.cpp.

The documentation for this class was generated from the following files: