• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KIO

KIO::PreviewJob

KIO::PreviewJob Class Reference

#include <previewjob.h>

Inheritance diagram for KIO::PreviewJob:

Inheritance graph
[legend]

List of all members.


Detailed Description

KIO Job to get a thumbnail picture.

This class catches a preview (thumbnail) for files.

Definition at line 38 of file previewjob.h.


Signals

void failed (const KFileItem &item)
void gotPreview (const KFileItem &item, const QPixmap &preview)

Public Member Functions

 PreviewJob (const KFileItemList &items, int width, int height, int iconSize, int iconAlpha, bool scale, bool save, const QStringList *enabledPlugins)
void removeItem (const KUrl &url)
void setIgnoreMaximumSize (bool ignoreSize=true)
virtual ~PreviewJob ()

Static Public Member Functions

static QStringList availablePlugins ()
static KIO::filesize_t maximumFileSize ()
static QStringList supportedMimeTypes ()

Protected Slots

virtual void slotResult (KJob *job)

Constructor & Destructor Documentation

PreviewJob::PreviewJob ( const KFileItemList &  items,
int  width,
int  height,
int  iconSize,
int  iconAlpha,
bool  scale,
bool  save,
const QStringList *  enabledPlugins 
)

Creates a new PreviewJob.

Parameters:
items a list of files to create previews for
width the desired width
height the desired height, 0 to use the width
iconSize the size of the mimetype icon to overlay over the preview or zero to not overlay an icon. This has no effect if the preview plugin that will be used doesn't use icon overlays.
iconAlpha transparency to use for the icon overlay
scale if the image is to be scaled to the requested size or returned in its original size
save if the image should be cached for later use
enabledPlugins if non-zero, this points to a list containing the names of the plugins that may be used.

Definition at line 132 of file previewjob.cpp.

PreviewJob::~PreviewJob (  )  [virtual]

Definition at line 159 of file previewjob.cpp.


Member Function Documentation

static QStringList KIO::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).

Returns:
the list of plugins

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.

Parameters:
item the file that failed

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

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

Parameters:
item the file of the preview
preview the preview image

static KIO::filesize_t KIO::PreviewJob::maximumFileSize (  )  [static]

Returns the default "maximum file size", in bytes, used by PreviewJob.

This is useful for applications providing a GUI for letting the user change the size.

Since:
4.1

void KIO::PreviewJob::removeItem ( const KUrl &  url  ) 

Removes an item from preview processing.

Use this if you passed an item to filePreview and want to delete it now.

Parameters:
url the url of the item that should be removed from the preview queue

void KIO::PreviewJob::setIgnoreMaximumSize ( bool  ignoreSize = true  ) 

If ignoreSize is true, then the preview is always generated regardless of the settings.

virtual void KIO::PreviewJob::slotResult ( KJob *  job  )  [protected, virtual, slot]

Reimplemented from KCompositeJob.

static QStringList KIO::PreviewJob::supportedMimeTypes (  )  [static]

Returns a list of all supported MIME types.

The list can contain entries like text/ * (without the space).

Returns:
the list of mime types


The documentation for this class was generated from the following files:
  • previewjob.h
  • previewjob.cpp

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal