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 }
enum  MessageBoxType {
  QuestionTwoActions = 1, WarningTwoActions = 2, WarningContinueCancel = 3, WarningTwoActionsCancel = 4,
  Information = 5, SSLMessageBox = 6, WarningContinueCancelDetailed = 10, QuestionYesNo = QuestionTwoActions,
  WarningYesNo = WarningTwoActions, WarningYesNoCancel = WarningTwoActionsCancel

Public Member Functions

virtual bool askDeleteConfirmation (const QList< QUrl > &urls, DeletionType deletionType, ConfirmationType confirmationType)=0
virtual KIO::SkipDialog_Result askSkip (KJob *job, KIO::SkipDialog_Options options, const QString &error_text)=0
virtual ClipboardUpdater * createClipboardUpdater (Job *job, ClipboardUpdaterMode mode)
virtual int requestMessageBox (MessageBoxType type, const QString &text, const QString &title, const QString &primaryActionText, const QString &secondaryActionText, const QString &primaryActionIconName=QString(), const QString &secondaryActionIconName=QString(), const QString &dontAskAgainName=QString(), const KIO::MetaData &sslMetaData=KIO::MetaData())=0
virtual void updateUrlInClipboard (const QUrl &src, const QUrl &dest)

Protected Member Functions

 JobUiDelegateExtension ()
virtual ~JobUiDelegateExtension ()

Related Functions

(Note that these are not member functions.)

virtual KIO::RenameDialog_Result askFileRename (KJob *job, const QString &title, const QUrl &src, const QUrl &dest, KIO::RenameDialog_Options options, QString &newDest, KIO::filesize_t sizeSrc=KIO::filesize_t(-1), KIO::filesize_t sizeDest=KIO::filesize_t(-1), const QDateTime &ctimeSrc=QDateTime(), const QDateTime &ctimeDest=QDateTime(), const QDateTime &mtimeSrc=QDateTime(), const QDateTime &mtimeDest=QDateTime())=0

Detailed Description

An abstract class defining interaction with users from KIO jobs:

  • asking what to do in case of a conflict while copying/moving files or directories
  • asking what to do in case of an error while copying/moving files or directories
  • asking for confirmation before deleting files or directories
  • popping up message boxes when the worker requests it

Definition at line 178 of file jobuidelegateextension.h.

Member Enumeration Documentation

◆ 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 242 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 235 of file jobuidelegateextension.h.

◆ MessageBoxType

Message box types.

Should be kept in sync with WorkerBase::MessageBoxType.

Since 5.100, use QuestionTwoActions.
Since 5.100, use WarningTwoActions.
Since 5.100, use WarningTwoActionsCancel.

Definition at line 264 of file jobuidelegateextension.h.

Constructor & Destructor Documentation

◆ JobUiDelegateExtension()

JobUiDelegateExtension::JobUiDelegateExtension ( )


Definition at line 12 of file jobuidelegateextension.cpp.

◆ ~JobUiDelegateExtension()

JobUiDelegateExtension::~JobUiDelegateExtension ( )


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

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.
true if confirmed

Implemented in KIO::JobUiDelegate.

◆ askSkip()

virtual KIO::SkipDialog_Result KIO::JobUiDelegateExtension::askSkip ( KJob job,
KIO::SkipDialog_Options  options,
const QString error_text 
pure virtual

See skipdialog.h

Implemented in KIO::JobUiDelegate.

◆ createClipboardUpdater()

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

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

Reimplemented in KIO::JobUiDelegate.

Definition at line 21 of file jobuidelegateextension.cpp.

◆ requestMessageBox()

virtual int KIO::JobUiDelegateExtension::requestMessageBox ( MessageBoxType  type,
const QString text,
const QString title,
const QString primaryActionText,
const QString secondaryActionText,
const QString primaryActionIconName = QString(),
const QString secondaryActionIconName = QString(),
const QString dontAskAgainName = QString(),
const KIO::MetaData sslMetaData = KIO::MetaData() 
pure virtual

This function allows for the delegation user prompts from the KIO workers.

typethe desired type of message box.
textthe message shown to the user.
titlethe title of the message dialog box.
primaryActionTextthe text for the primary action.
secondaryActionTextthe text for the secondary action.
primaryActionIconNamethe icon shown on the primary action.
secondaryActionIconNamethe icon shown on the secondary action.
dontAskAgainNamethe name used to store result from 'Do not ask again' checkbox.
sslMetaDataSSL information used by the SSLMessageBox.

Implemented in KIO::JobUiDelegate.

◆ updateUrlInClipboard()

void KIO::JobUiDelegateExtension::updateUrlInClipboard ( const QUrl src,
const QUrl dest 

Update URL in clipboard, if present.

Reimplemented in KIO::JobUiDelegate.

Definition at line 26 of file jobuidelegateextension.cpp.

Friends And Related Function Documentation

◆ askFileRename()

virtual KIO::RenameDialog_Result askFileRename ( KJob job,
const QString title,
const QUrl src,
const QUrl dest,
KIO::RenameDialog_Options  options,
QString newDest,
KIO::filesize_t  sizeSrc = KIO::filesize_t(-1),
KIO::filesize_t  sizeDest = KIO::filesize_t(-1),
const QDateTime ctimeSrc = QDateTime(),
const QDateTime ctimeDest = QDateTime(),
const QDateTime mtimeSrc = QDateTime(),
const QDateTime mtimeDest = QDateTime() 

Construct a modal, parent-less "rename" dialog, and return a result code, as well as the new dest. Much easier to use than the class RenameDialog directly.

titlethe title for the dialog box
srcthe URL of the file/dir we're trying to copy, as it's part of the text message
destthe URL of the destination file/dir, i.e. the one that already exists
optionsparameters for the dialog (which buttons to show...)
newDestthe new destination path, valid if R_RENAME was returned.
sizeSrcsize of source file
sizeDestsize of destination file
ctimeSrccreation time of source file
ctimeDestcreation time of destination file
mtimeSrcmodification time of source file
mtimeDestmodification time of destination file
the result

Implemented in KIO::JobUiDelegate.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Sep 30 2023 03:50:10 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.