KIO::PreviewJob class Reference (kio Library)

| # kio Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# KIO::PreviewJob Class Reference

`#include <previewjob.h>`

Inheritance diagram for KIO::PreviewJob:

[legend]
Collaboration diagram for KIO::PreviewJob:

[legend]
List of all members.

## Signals
void | gotPreview (const KFileItem *item, const QPixmap &preview)
| Emitted when a thumbnail picture for `item` has been successfully retrieved.
void | failed (const KFileItem *item)
| Emitted when a thumbnail for `item` could not be created, either because a ThumbCreator for its MIME type does not exist, or because something went wrong.
## Public Member Functions
| PreviewJob (const KFileItemList &items, int width, int height, int iconSize, int iconAlpha, bool scale, bool save, const QStringList *enabledPlugins, bool deleteItems=false)
void | removeItem (const KFileItem *item)
| Removes an item from preview processing.
## Static Public Member Functions
QStringList | availablePlugins ()
QStringList | supportedMimeTypes ()
## Protected Slots
virtual void | slotResult (KIO::Job *job)
| Called whenever a subjob finishes.
## Protected Member Functions
void | getOrCreateThumbnail ()
bool | statResultThumbnail ()
void | createThumbnail (QString)
virtual void | virtual_hook (int id, void *data)

## Detailed Description

This class catches a preview (thumbnail) for files

Definition at line 36 of file previewjob.h.

## Member Function Documentation

void PreviewJob::removeItem | ( | const KFileItem * | item | ) |

  | Removes an item from preview processing. Use this if you passed an item to filePreview and want to delete it now. Parameters:
  item | the item that should be removed from the preview queue
Definition at line 209 of file previewjob.cpp. References QPtrList< Job >::first(), and QPtrList< Job >::removeFirst().

QStringList PreviewJob::availablePlugins | ( |  | ) | `[static]`

| Returns: a list of all available preview plugins. The list contains the basenames of the plugins' .desktop files (no path, no .desktop). Definition at line 475 of file previewjob.cpp. References QValueList::begin(), QValueList::end(), KTrader::OfferList, KTrader::query(), KIO::Job::result(), and KTrader::self().

QStringList PreviewJob::supportedMimeTypes | ( |  | ) | `[static]`

| Returns: a list of all supported MIME types. The list can contain entries like text/ * (without the space). Definition at line 485 of file previewjob.cpp. References QValueList::begin(), QValueList::end(), KTrader::OfferList, KTrader::query(), KIO::Job::result(), and KTrader::self(). Referenced by KFileIconView::showPreviews().

void KIO::PreviewJob::gotPreview | ( | const KFileItem * | item,
|  | const QPixmap & | preview
| ) | `[signal]`

| Emitted when a thumbnail picture for `item` has been successfully retrieved.

void KIO::PreviewJob::failed | ( | const KFileItem * | item | ) | `[signal]`

| Emitted when a thumbnail for `item` could not be created, either because a ThumbCreator for its MIME type does not exist, or because something went wrong.

void PreviewJob::slotResult | ( | KIO::Job * | job | ) | `[protected, virtual, slot]`

| Called whenever a subjob finishes. Default implementation checks for errors and propagates to parent job, then calls removeSubjob. Override if you don't want subjobs errors to be propagated. Reimplemented from KIO::Job. Definition at line 253 of file previewjob.cpp. References QValueList::begin(), QValueList::end(), KIO::Job::error(), QPtrList< Job >::isEmpty(), QFile::remove(), QPtrList< Job >::remove(), and KIO::UDSEntry.

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

- previewjob.h
- previewjob.cpp

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:26:01 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001