KImageFilePreview Class

Image preview widget for the file dialog. More...

Header: #include <KImageFilePreview>
CMake: find_package(KF6 REQUIRED COMPONENTS KIO)
target_link_libraries(mytarget PRIVATE KF6::KIOFileWidgets)
Inherits: KPreviewWidgetBase

Public Functions

KImageFilePreview(QWidget *parent = nullptr)

Public Slots

virtual void clearPreview() override
virtual void showPreview(const QUrl &url) override

Protected Functions

virtual KIO::PreviewJob *createJob(const QUrl &url, int width, int height)

Protected Slots

virtual void gotPreview(const KFileItem &, const QPixmap &)
void showPreview()
void showPreview(const QUrl &url, bool force)

Detailed Description

Member Function Documentation

[explicit] KImageFilePreview::KImageFilePreview(QWidget *parent = nullptr)

Creates a new image file preview.

parent The parent widget.

[override virtual slot] void KImageFilePreview::clearPreview()

Reimplements: KPreviewWidgetBase::clearPreview().

Clears the preview.

[virtual protected] KIO::PreviewJob *KImageFilePreview::createJob(const QUrl &url, int width, int height)

[virtual protected slot] void KImageFilePreview::gotPreview(const KFileItem &, const QPixmap &)

[protected slot] void KImageFilePreview::showPreview()

[override virtual slot] void KImageFilePreview::showPreview(const QUrl &url)

Reimplements: KPreviewWidgetBase::showPreview(const QUrl &url).

Shows a preview for the given url.

[protected slot] void KImageFilePreview::showPreview(const QUrl &url, bool force)