# class PreviewJob

###

Module | kio
Namespace | KIO
Class | PreviewJob
Inherits | KIO::Job

### methods

- PreviewJob (items, width, height, iconSize, iconAlpha, scale, save, enabledPlugins)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  items | KFileItemList |
  width | int |
  height | int |
  iconSize | int |
  iconAlpha | int |
  scale | bool |
  save | bool |
  enabledPlugins | QStringList |

  Creates a new PreviewJob.

  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.

- PreviewJob ( )

  returns ctor
  Not implemented
  before KDE 4.1.0 only

- availablePlugins ( )

  returns QStringList
  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

- failed (item)

  returns Nothing
  SIGNAL ("failed (const KFileItem&)")

  Argument | Type | Default
  --- | --- | ---
  item | KFileItem |

  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.

  item - the file that failed

- gotPreview (item, preview)

  returns Nothing
  SIGNAL ("gotPreview (const KFileItem&, const QPixmap&)")

  Argument | Type | Default
  --- | --- | ---
  item | KFileItem |
  preview | QPixmap |

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

  item - the file of the preview

  preview - the preview image

- maximumFileSize ( )

  returns KIO.filesize_t
  static
  KDE 4.1.0 and later only

  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

- removeItem (url)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  url | KUrl |

  Removes an item from preview processing. Use this if you passed an item to filePreview and want to delete it now.

  url - the url of the item that should be removed from the preview queue

- setIgnoreMaximumSize (ignoreSize)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  ignoreSize | bool | 1

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

- slotResult (job)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  job | KJob |

- supportedMimeTypes ( )

  returns QStringList
  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