KIO::JobUiDelegate Class

Header: #include <KIO/JobUiDelegate>
CMake: find_package(KF6 REQUIRED COMPONENTS KIO)
target_link_libraries(mytarget PRIVATE KF6::KIOWidgets)
Inherits: KIO::JobUiDelegateExtension and

Reimplemented Public Functions

virtual bool askDeleteConfirmation(const QList<QUrl> &urls, KIO::JobUiDelegateExtension::DeletionType deletionType, KIO::JobUiDelegateExtension::ConfirmationType confirmationType) override
virtual KIO::ClipboardUpdater *createClipboardUpdater(KIO::Job *job, KIO::JobUiDelegateExtension::ClipboardUpdaterMode mode) override
virtual void setWindow(QWidget *window) override
virtual void updateUrlInClipboard(const QUrl &src, const QUrl &dest) override

Static Public Members

(since 5.2) void unregisterWindow(QWidget *window)

Protected Functions

(since 5.98) JobUiDelegate(KJobUiDelegate::Flags flags = AutoHandlingDisabled, QWidget *window = nullptr, const QList<QObject *> &ifaces = {})

Detailed Description

A UI delegate tuned to be used with KIO Jobs.

Member Function Documentation

[explicit protected, since 5.98] JobUiDelegate::JobUiDelegate(KJobUiDelegate::Flags flags = AutoHandlingDisabled, QWidget *window = nullptr, const QList<QObject *> &ifaces = {})

Constructs a new KIO Job UI delegate.

flags allows to enable automatic error/warning handling

window the window associated with this delegate, see setWindow.

ifaces Interface instances such as OpenWithHandlerInterface to replace the default interfaces

This function was introduced in 5.98.

[override virtual] bool JobUiDelegate::askDeleteConfirmation(const QList<QUrl> &urls, KIO::JobUiDelegateExtension::DeletionType deletionType, KIO::JobUiDelegateExtension::ConfirmationType confirmationType)

Reimplements: JobUiDelegateExtension::askDeleteConfirmation(const QList<QUrl> &urls, KIO::JobUiDelegateExtension::DeletionType deletionType, KIO::JobUiDelegateExtension::ConfirmationType confirmationType).

Ask for confirmation before deleting/trashing urls.

Note that this method is not called automatically by KIO jobs. It's the application's responsibility to ask the user for confirmation before calling KIO::del() or KIO::trash().

urls the urls about to be deleted/trashed

deletionType the type of deletion (Delete for real deletion, Trash otherwise)

confirmation see ConfirmationType. Normally set to DefaultConfirmation.

Note: The window passed to setWindow is used as the parent for the message box.

Returns true if confirmed

[override virtual] KIO::ClipboardUpdater *JobUiDelegate::createClipboardUpdater(KIO::Job *job, KIO::JobUiDelegateExtension::ClipboardUpdaterMode mode)

Reimplements: JobUiDelegateExtension::createClipboardUpdater(KIO::Job *job, KIO::JobUiDelegateExtension::ClipboardUpdaterMode mode).

Creates a clipboard updater

[override virtual] void JobUiDelegate::setWindow(QWidget *window)

Associate this job with a window given by window.

window the window to associate to

See also window().

[static, since 5.2] void JobUiDelegate::unregisterWindow(QWidget *window)

Unregister the given window from kded. This is normally done automatically when the window is destroyed.

This method is useful for instance when keeping a hidden window around to make it faster to reuse later.

This function was introduced in 5.2.

[override virtual] void JobUiDelegate::updateUrlInClipboard(const QUrl &src, const QUrl &dest)

Reimplements: JobUiDelegateExtension::updateUrlInClipboard(const QUrl &src, const QUrl &dest).

Update URL in clipboard, if present