|
Krita Source Code Documentation
|
The KisFileIconCreator class creates a thumbnail from a file on disk. More...
#include <KisFileIconCreator.h>
Inheritance diagram for KisFileIconCreator:Public Member Functions | |
| bool | createFileIcon (QString path, QIcon &icon, qreal devicePixelRatioF, QSize iconSize) override |
| createFileIcon creates an icon from the file on disk | |
Public Member Functions inherited from KisAbstractFileIconCreator | |
| KisAbstractFileIconCreator () | |
| virtual | ~KisAbstractFileIconCreator () |
The KisFileIconCreator class creates a thumbnail from a file on disk.
On Welcome Page and possibly other places there might be a need to show the user a thumbnail of a file. This class tries to open a file and create a thumbnail out of it.
In theory creating the object is not needed, so if you, dear future reader, want to convert the function inside to a static one, go ahead.
Definition at line 25 of file KisFileIconCreator.h.
|
overridevirtual |
createFileIcon creates an icon from the file on disk
| path | path to the file |
| icon | created icon |
| devicePixelRatioF | a result from devicePixelRatioF() called in a widget |
| iconSize | size of the icon |
Implements KisAbstractFileIconCreator.
Definition at line 86 of file KisFileIconCreator.cpp.
References bounds, KoStore::createStore(), KisPaintDevice::createThumbnail(), KisDocument::DontAddToRecent, KisPaintDevice::exactBounds(), iconSize(), KisPart::instance(), KisMimeDatabase::mimeTypeForFile(), KisDocument::nativeFormatMimeType(), and KoStore::Read.