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

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 &caption, const QString &buttonYes, const QString &buttonNo, const QString &iconYes=QString(), const QString &iconNo=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 &caption, 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 slave requests it
    Since
    5.0

Definition at line 178 of file jobuidelegateextension.h.

Member Enumeration Documentation

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.

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.

Message box types.

Should be kept in sync with SlaveBase::MessageBoxType.

Since
4.11

Definition at line 264 of file jobuidelegateextension.h.

Constructor & Destructor Documentation

JobUiDelegateExtension::JobUiDelegateExtension ( )
protected

Constructor.

Definition at line 12 of file jobuidelegateextension.cpp.

JobUiDelegateExtension::~JobUiDelegateExtension ( )
protectedvirtual

Destructor.

Definition at line 17 of file jobuidelegateextension.cpp.

Member Function Documentation

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.

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.

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.

virtual int KIO::JobUiDelegateExtension::requestMessageBox ( MessageBoxType  type,
const QString text,
const QString caption,
const QString buttonYes,
const QString buttonNo,
const QString iconYes = QString(),
const QString iconNo = QString(),
const QString dontAskAgainName = QString(),
const KIO::MetaData sslMetaData = KIO::MetaData() 
)
pure virtual

This function allows for the delegation user prompts from the ioslaves.

Parameters
typethe desired type of message box.
textthe message shown to the user.
captionthe caption of the message dialog box.
buttonYesthe text for the YES button.
buttonNothe text for the NO button.
iconYesthe icon shown on the YES button.
iconNothe icon shown on the NO button.
dontAskAgainNamethe name used to store result from 'Do not ask again' checkbox.
sslMetaDataSSL information used by the SSLMessageBox.

Implemented in KIO::JobUiDelegate.

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.

Friends And Related Function Documentation

virtual KIO::RenameDialog_Result askFileRename ( KJob job,
const QString caption,
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() 
)
related

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.

Parameters
captionthe caption 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
Returns
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-2021 The KDE developers.
Generated on Tue Nov 30 2021 22:53:41 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.