KPreviewWidgetBase Class Reference
from PyKDE4.kio import *
Inherits: QWidget → QObject
Subclasses: KImageFilePreview
Detailed Description
- Abstract class:
- This class can be used as a base class for new classes, but can not be instantiated directly.
Abstract baseclass for all preview widgets which shall be used via KFileDialog.setPreviewWidget(const KPreviewWidgetBase *). Ownership will be transferred to KFileDialog, so you have to create the preview with "new" and let KFileDialog delete it.
Just derive your custom preview widget from KPreviewWidgetBase and implement all the pure virtual methods. The slot showPreview(const KUrl &) is called every time the file selection changes.
Abstract baseclass for all preview widgets.
Methods | |
__init__ (self, QWidget parent) | |
__init__ (self, KPreviewWidgetBase a0) | |
clearPreview (self) | |
setSupportedMimeTypes (self, QStringList mimeTypes) | |
showPreview (self, KUrl url) | |
QStringList | supportedMimeTypes (self) |
Method Documentation
__init__ | ( | self, | ||
QWidget | parent | |||
) |
Constructor. Construct the user interface of your preview widget here and pass the KFileDialog this preview widget is going to be used in as the parent.
- Parameters:
-
parent The KFileDialog this preview widget is going to be used in
__init__ | ( | self, | ||
KPreviewWidgetBase | a0 | |||
) |
clearPreview | ( | self ) |
- Abstract method:
- This method is abstract and can be overridden but not called directly.
Reimplement this to clear the preview. This is called when e.g. the selection is cleared or when multiple selections exist, or the directory is changed.
setSupportedMimeTypes | ( | self, | ||
QStringList | mimeTypes | |||
) |
showPreview | ( | self, | ||
KUrl | url | |||
) |
- Abstract method:
- This method is abstract and can be overridden but not called directly.
This slot is called every time the user selects another file in the file dialog. Implement the stuff necessary to reflect the change here.
- Parameters:
-
url The URL of the currently selected file.
QStringList supportedMimeTypes | ( | self ) |