• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kio/kio
 

kio/kio

  • KIO
  • PreviewJob
Signals | Public Member Functions | Static Public Member Functions | Protected Slots | Protected Member Functions
KIO::PreviewJob Class Reference

#include <previewjob.h>

Inheritance diagram for KIO::PreviewJob:
KIO::Job

List of all members.

Signals

void gotPreview (const KFileItem *item, const TQPixmap &preview)
void failed (const KFileItem *item)

Public Member Functions

 PreviewJob (const KFileItemList &items, int width, int height, int iconSize, int iconAlpha, bool scale, bool save, const TQStringList *enabledPlugins, bool deleteItems=false)
void removeItem (const KFileItem *item)
void setIgnoreMaximumSize (bool ignoreSize=true)
virtual void kill (bool quietly=true)

Static Public Member Functions

static TQStringList availablePlugins ()
static TQStringList supportedMimeTypes ()

Protected Slots

virtual void slotResult (KIO::Job *job)

Protected Member Functions

void getOrCreateThumbnail ()
bool statResultThumbnail ()
void createThumbnail (TQString)
virtual void virtual_hook (int id, void *data)

Detailed Description

KIO Job to get a thumbnail picture.

This class catches a preview (thumbnail) for files.

Definition at line 37 of file previewjob.h.


Constructor & Destructor Documentation

PreviewJob::PreviewJob ( const KFileItemList &  items,
int  width,
int  height,
int  iconSize,
int  iconAlpha,
bool  scale,
bool  save,
const TQStringList *  enabledPlugins,
bool  deleteItems = false 
)

Creates a new PreviewJob.

Parameters:
itemsa list of files to create previews for
widththe desired width
heightthe desired height, 0 to use the width
iconSizethe 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.
iconAlphatransparency to use for the icon overlay
scaleif the image is to be scaled to the requested size or returned in its original size
saveif the image should be cached for later use
enabledPluginsif non-zero, this points to a list containing the names of the plugins that may be used.
deleteItemstrue to delete the items when done

Definition at line 118 of file previewjob.cpp.


Member Function Documentation

TQStringList 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

Definition at line 551 of file previewjob.cpp.

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:
itemthe file that failed
void KIO::PreviewJob::gotPreview ( const KFileItem *  item,
const TQPixmap &  preview 
) [signal]

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

Parameters:
itemthe file of the preview
previewthe preview image
void PreviewJob::kill ( bool  quietly = true) [virtual]

Reimplemented for internal reasons.

Reimplemented from KIO::Job.

Definition at line 570 of file previewjob.cpp.

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:
itemthe item that should be removed from the preview queue

Definition at line 263 of file previewjob.cpp.

void PreviewJob::setIgnoreMaximumSize ( bool  ignoreSize = true)

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

Since:
KDE 3.4

Definition at line 280 of file previewjob.cpp.

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.

Parameters:
jobthe subjob
See also:
result()

Reimplemented from KIO::Job.

Definition at line 315 of file previewjob.cpp.

TQStringList 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

Definition at line 561 of file previewjob.cpp.


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

kio/kio

Skip menu "kio/kio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kio/kio

Skip menu "kio/kio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kio/kio by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |