KIO::JobUiDelegateExtension

Search for usage in LXR

KIO::JobUiDelegateExtension Class Referenceabstract

#include <KIO/JobUiDelegateExtension>

Inheritance diagram for KIO::JobUiDelegateExtension:

Public Types

enum  ClipboardUpdaterMode { UpdateContent , OverwriteContent , RemoveContent }
 
enum  ConfirmationType { DefaultConfirmation , ForceConfirmation }
 
enum  DeletionType { Delete , Trash , EmptyTrash }
 

Public Member Functions

virtual bool askDeleteConfirmation (const QList< QUrl > &urls, DeletionType deletionType, ConfirmationType confirmationType)=0
 
virtual ClipboardUpdater * createClipboardUpdater (Job *job, ClipboardUpdaterMode mode)
 
virtual void updateUrlInClipboard (const QUrl &src, const QUrl &dest)
 

Protected Member Functions

 JobUiDelegateExtension ()
 
virtual ~JobUiDelegateExtension ()
 

Detailed Description

An abstract class defining interaction with users from KIO jobs:

  • asking for confirmation before deleting files or directories
    Since
    5.0

Definition at line 131 of file jobuidelegateextension.h.

Member Enumeration Documentation

◆ ClipboardUpdaterMode

enum KIO::JobUiDelegateExtension::ClipboardUpdaterMode

Definition at line 172 of file jobuidelegateextension.h.

◆ 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.

Definition at line 157 of file jobuidelegateextension.h.

◆ DeletionType

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

Definition at line 150 of file jobuidelegateextension.h.

Constructor & Destructor Documentation

◆ JobUiDelegateExtension()

JobUiDelegateExtension::JobUiDelegateExtension ( )
protected

Constructor.

Definition at line 12 of file jobuidelegateextension.cpp.

◆ ~JobUiDelegateExtension()

JobUiDelegateExtension::~JobUiDelegateExtension ( )
protectedvirtual

Destructor.

Definition at line 17 of file jobuidelegateextension.cpp.

Member Function Documentation

◆ askDeleteConfirmation()

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

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().

Parameters
urlsthe urls about to be deleted/trashed
deletionTypethe type of deletion (Delete for real deletion, Trash otherwise)
confirmationTypesee ConfirmationType. Normally set to DefaultConfirmation. Note: the window passed to setWindow is used as the parent for the message box.
Returns
true if confirmed

Implemented in KIO::JobUiDelegate.

◆ createClipboardUpdater()

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

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

Reimplemented in KIO::JobUiDelegate.

Definition at line 21 of file jobuidelegateextension.cpp.

◆ updateUrlInClipboard()

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

Update URL in clipboard, if present.

Reimplemented in KIO::JobUiDelegate.

Definition at line 26 of file jobuidelegateextension.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:52 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.