PreviewJob Class Reference
from PyKDE4.kio import *
Inherits: KIO.Job → KCompositeJob → KJob → QObject
Namespace: KIO.PreviewJob
Detailed Description
Signals | |
failed (KFileItem item) | |
gotPreview (KFileItem item, QPixmap preview) | |
Methods | |
__init__ (self, KFileItemList items, int width, int height, int iconSize, int iconAlpha, bool scale, bool save, QStringList enabledPlugins) | |
__init__ (self) | |
QStringList | availablePlugins (self) |
failed (self, KFileItem item) | |
gotPreview (self, KFileItem item, QPixmap preview) | |
KIO.filesize_t | maximumFileSize (self) |
removeItem (self, KUrl url) | |
int | sequenceIndex (self) |
setIgnoreMaximumSize (self, bool ignoreSize=1) | |
setSequenceIndex (self, int index) | |
slotResult (self, KJob job) | |
QStringList | supportedMimeTypes (self) |
Method Documentation
__init__ | ( | self, | ||
KFileItemList | items, | |||
int | width, | |||
int | height, | |||
int | iconSize, | |||
int | iconAlpha, | |||
bool | scale, | |||
bool | save, | |||
QStringList | enabledPlugins | |||
) |
__init__ | ( | self ) |
QStringList availablePlugins | ( | self ) |
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 | ( | self, | ||
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.
- Parameters:
-
item the file that failed
- Signal syntax:
QObject.connect(source, SIGNAL("failed(const const KFileItem&)"), target_slot)
Emitted when a thumbnail picture for item has been successfully retrieved.
- Parameters:
-
item the file of the preview preview the preview image
- Signal syntax:
QObject.connect(source, SIGNAL("gotPreview(const const KFileItem&, const const QPixmap&)"), target_slot)
KIO.filesize_t maximumFileSize | ( | self ) |
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 | ( | self, | ||
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
int sequenceIndex | ( | self ) |
Returns the currently set sequence index
- Since:
- KDE 4.3
setIgnoreMaximumSize | ( | self, | ||
bool | ignoreSize=1 | |||
) |
If ignoreSize is true, then the preview is always generated regardless of the settings
setSequenceIndex | ( | self, | ||
int | index | |||
) |
Sets the sequence index given to the thumb creators. Use the sequence index, it is possible to create alternative icons for the same item. For example it may allow iterating through the items of a directory, or the frames of a video.
- Since:
- KDE 4.3
slotResult | ( | self, | ||
KJob | job | |||
) |
QStringList supportedMimeTypes | ( | self ) |
Returns a list of all supported MIME types. The list can contain entries like text/ * (without the space).
- Returns:
- the list of mime types