Pages
API Documentation
On this page

KIO::JobUiDelegateExtension Class

Network transparent access to files and data. More...

  • Header: #include <KIO/JobUiDelegateExtension>
  • CMake: find_package(KF6 REQUIRED COMPONENTS KIO)
    target_link_libraries(mytarget PRIVATE KF6::KIOCore)

List of all members, including inherited members

Public Types

Public Functions

Protected Functions

Detailed Description

An abstract class defining interaction with users from KIO jobs:

  • asking for confirmation before deleting files or directories

Member Type Documentation

enum JobUiDelegateExtension::ClipboardUpdaterMode

Constant
KIO::JobUiDelegateExtension::UpdateContent 0
KIO::JobUiDelegateExtension::OverwriteContent 1
KIO::JobUiDelegateExtension::RemoveContent 2

enum JobUiDelegateExtension::ConfirmationType

ForceConfirmation: always ask the user for confirmation DefaultConfirmation: don't ask the user if he/she said "don't ask again".

Used by askDeleteConfirmation.

Constant
KIO::JobUiDelegateExtension::DefaultConfirmation 0
KIO::JobUiDelegateExtension::ForceConfirmation 1

enum JobUiDelegateExtension::DeletionType

The type of deletion: real deletion, moving the files to the trash or emptying the trash Used by askDeleteConfirmation.

Constant
KIO::JobUiDelegateExtension::Delete 0
KIO::JobUiDelegateExtension::Trash 1
KIO::JobUiDelegateExtension::EmptyTrash 2

Member Function Documentation

[protected] JobUiDelegateExtension::JobUiDelegateExtension()

Constructor

[pure virtual] bool 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)

confirmationType 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

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

Creates a clipboard updater as a child of the given job.

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

Update URL in clipboard, if present

KIO::JobUiDelegateExtension *defaultJobUiDelegateExtension()

Returns the default job UI delegate extension to be used by all KIO jobs (in which HideProgressInfo is not set) Can return nullptr, if no kio GUI library is loaded.

See also setDefaultJobUiDelegateExtension()

void setDefaultJobUiDelegateExtension(KIO::JobUiDelegateExtension *extension)

Internal. Allows the KIO widgets library to register its widget-based job UI delegate extension automatically.

See also defaultJobUiDelegateExtension()

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.