KIO::JobUiDelegateExtension
#include <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
- Since
- 5.0
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
- 4.11
Enumerator | |
---|---|
QuestionTwoActions |
|
WarningTwoActions |
|
WarningTwoActionsCancel |
|
QuestionYesNo |
|
WarningYesNo |
|
WarningYesNoCancel |
|
Definition at line 264 of file jobuidelegateextension.h.
Constructor & Destructor Documentation
◆ JobUiDelegateExtension()
|
protected |
Constructor.
Definition at line 12 of file jobuidelegateextension.cpp.
◆ ~JobUiDelegateExtension()
|
protectedvirtual |
Destructor.
Definition at line 17 of file jobuidelegateextension.cpp.
Member Function Documentation
◆ askDeleteConfirmation()
|
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
-
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
Implemented in KIO::JobUiDelegate.
◆ askSkip()
|
pure virtual |
See skipdialog.h
Implemented in KIO::JobUiDelegate.
◆ createClipboardUpdater()
|
virtual |
Creates a clipboard updater as a child of the given job.
Reimplemented in KIO::JobUiDelegate.
Definition at line 21 of file jobuidelegateextension.cpp.
◆ requestMessageBox()
|
pure virtual |
This function allows for the delegation user prompts from the KIO workers.
- Parameters
-
type the desired type of message box. text the message shown to the user. title the title of the message dialog box. primaryActionText the text for the primary action. secondaryActionText the text for the secondary action. primaryActionIconName the icon shown on the primary action. secondaryActionIconName the icon shown on the secondary action. dontAskAgainName the name used to store result from 'Do not ask again' checkbox. sslMetaData SSL information used by the SSLMessageBox.
Implemented in KIO::JobUiDelegate.
◆ updateUrlInClipboard()
|
virtual |
Update URL in clipboard, if present.
Reimplemented in KIO::JobUiDelegate.
Definition at line 26 of file jobuidelegateextension.cpp.
Friends And Related Function Documentation
◆ askFileRename()
|
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
-
title the title for the dialog box src the URL of the file/dir we're trying to copy, as it's part of the text message dest the URL of the destination file/dir, i.e. the one that already exists options parameters for the dialog (which buttons to show...) newDest the new destination path, valid if R_RENAME was returned. sizeSrc size of source file sizeDest size of destination file ctimeSrc creation time of source file ctimeDest creation time of destination file mtimeSrc modification time of source file mtimeDest modification time of destination file
- Returns
- the result
Implemented in KIO::JobUiDelegate.
The documentation for this class was generated from the following files:
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.