KIO::WidgetsAskUserActionHandler

Search for usage in LXR

KIO::WidgetsAskUserActionHandler Class Reference

#include <KIO/WidgetsAskUserActionHandler>

Inheritance diagram for KIO::WidgetsAskUserActionHandler:

Public Member Functions

 WidgetsAskUserActionHandler (QObject *parent=nullptr)
 
void askUserDelete (const QList< QUrl > &urls, DeletionType deletionType, ConfirmationType confirmationType, QWidget *parent=nullptr) override
 
void askUserRename (KJob *job, const QString &title, const QUrl &src, const QUrl &dest, KIO::RenameDialog_Options options, KIO::filesize_t sizeSrc=KIO::filesize_t(-1), KIO::filesize_t sizeDest=KIO::filesize_t(-1), const QDateTime &ctimeSrc={}, const QDateTime &ctimeDest={}, const QDateTime &mtimeSrc={}, const QDateTime &mtimeDest={}) override
 
void askUserSkip (KJob *job, KIO::SkipDialog_Options options, const QString &error_text) override
 
void requestUserMessageBox (MessageDialogType type, const QString &text, const QString &title, const QString &primaryActionText, const QString &secondaryActionText, const QString &primaryActionIconName={}, const QString &secondaryActionIconName={}, const QString &dontAskAgainName={}, const QString &details={}, const KIO::MetaData &metaData={}, QWidget *parent=nullptr) override
 
void setWindow (QWidget *window)
 
- Public Member Functions inherited from KIO::AskUserActionInterface
 ~AskUserActionInterface () override
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (const QObject *object)
 
qobject_cast (QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 

Additional Inherited Members

- Public Types inherited from KIO::AskUserActionInterface
enum  ConfirmationType { DefaultConfirmation, ForceConfirmation }
 
enum  DeletionType { Delete, Trash, EmptyTrash, DeleteInsteadOfTrash }
 
enum  MessageDialogType {
  QuestionTwoActions = 1, QuestionTwoActionsCancel = 2, WarningTwoActions = 3, WarningTwoActionsCancel = 4,
  WarningContinueCancel = 5, SSLMessageBox = 6, Information = 7, Sorry = 8,
  Error = 9, QuestionYesNo = QuestionTwoActions, QuestionYesNoCancel = QuestionTwoActionsCancel, WarningYesNo = WarningTwoActions,
  WarningYesNoCancel = WarningTwoActionsCancel
}
 
- Properties inherited from QObject
 objectName
 
- Signals inherited from KIO::AskUserActionInterface
void askUserDeleteResult (bool allowDelete, const QList< QUrl > &urls, KIO::AskUserActionInterface::DeletionType deletionType, QWidget *parent)
 
void askUserRenameResult (KIO::RenameDialog_Result result, const QUrl &newUrl, KJob *parentJob)
 
void askUserSkipResult (KIO::SkipDialog_Result result, KJob *parentJob)
 
void messageBoxResult (int result)
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- Protected Member Functions inherited from KIO::AskUserActionInterface
 AskUserActionInterface (QObject *parent=nullptr)
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

Detailed Description

This implements KIO::AskUserActionInterface.

See also
KIO::AskUserActionInterface()
KIO::JobUiDelegateExtension()
Since
5.78
Note
This header wasn't installed until 5.98

Definition at line 36 of file widgetsaskuseractionhandler.h.

Member Function Documentation

◆ askUserDelete()

void KIO::WidgetsAskUserActionHandler::askUserDelete ( const QList< QUrl > &  urls,
DeletionType  deletionType,
ConfirmationType  confirmationType,
QWidget parent = nullptr 
)
overridevirtual

Ask for confirmation before moving urls (files/directories) to the Trash, emptying the Trash, or directly deleting files (i.e.

without moving to Trash).

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

You need to connect to the askUserDeleteResult signal to get the dialog's result (exit code).

Parameters
urlsthe urls about to be moved to the Trash or deleted directly
deletionTypethe type of deletion (Delete for real deletion, Trash otherwise), see the DeletionType enum
confirmationTypeThe type of deletion confirmation, see the ConfirmationType enum. Normally set to DefaultConfirmation
parentthe parent widget of the message box

Implements KIO::AskUserActionInterface.

Definition at line 288 of file widgetsaskuseractionhandler.cpp.

◆ askUserRename()

void KIO::WidgetsAskUserActionHandler::askUserRename ( KJob job,
const QString title,
const QUrl src,
const QUrl dest,
KIO::RenameDialog_Options  options,
KIO::filesize_t  sizeSrc = KIO::filesize_t(-1),
KIO::filesize_t  sizeDest = KIO::filesize_t(-1),
const QDateTime ctimeSrc = {},
const QDateTime ctimeDest = {},
const QDateTime mtimeSrc = {},
const QDateTime mtimeDest = {} 
)
overridevirtual

Constructs a modal, parent-less "rename" dialog, to prompt the user for a decision in case of conflicts, while copying/moving files. The dialog is shown using open(), rather than exec() (the latter creates a nested eventloop which could lead to crashes). You will need to connect to the askUserRenameResult() signal to get the dialog's result (exit code). The exit code is one of KIO::RenameDialog_Result.

See also
KIO::RenameDialog_Result enum.
Parameters
jobthe job that called this method
titlethe title for the dialog box
srcthe URL of the file/dir being copied/moved
destthe URL of the destination file/dir, i.e. the one that already exists
optionsparameters for the dialog (which buttons to show... etc), OR'ed values from the KIO::RenameDialog_Options enum
sizeSrcsize of the source file
sizeDestsize of the destination file
ctimeSrccreation time of the source file
ctimeDestcreation time of the destination file
mtimeSrcmodification time of the source file
mtimeDestmodification time of the destination file

Implements KIO::AskUserActionInterface.

Definition at line 119 of file widgetsaskuseractionhandler.cpp.

◆ askUserSkip()

void KIO::WidgetsAskUserActionHandler::askUserSkip ( KJob job,
KIO::SkipDialog_Options  options,
const QString error_text 
)
overridevirtual

You need to connect to the askUserSkipResult signal to get the dialog's result.

Parameters
jobthe job that called this method
optionsparameters for the dialog (which buttons to show... etc), OR'ed values from the KIO::SkipDialog_Options enum
error_textthe error text to show to the user (usually the string returned by KJob::errorText())

Implements KIO::AskUserActionInterface.

Definition at line 160 of file widgetsaskuseractionhandler.cpp.

◆ requestUserMessageBox()

void KIO::WidgetsAskUserActionHandler::requestUserMessageBox ( MessageDialogType  type,
const QString text,
const QString title,
const QString primaryActionText,
const QString secondaryActionText,
const QString primaryActionIconName = {},
const QString secondaryActionIconName = {},
const QString dontAskAgainName = {},
const QString details = {},
const KIO::MetaData metaData = {},
QWidget parent = nullptr 
)
overridevirtual

This function allows for the delegation of user prompts from the KIO worker.

Parameters
typethe desired type of message box, see the MessageDialogType enum
textthe message to show to the user
titlethe title of the message dialog box
primaryActionTextthe text for the primary action
secondatyActionTextthe text for the secondary action
primaryActionIconNamethe icon to show on the primary action
secondatyActionIconNamethe icon to show on the secondary action
dontAskAgainNamethe config key name used to store the result from 'Do not ask again' checkbox
detailsmore details about the message shown to the user
sslMetaDataSSL information primarily used by the SSLMessageBox dialog
parentthe parent widget of the dialog

Implements KIO::AskUserActionInterface.

Definition at line 352 of file widgetsaskuseractionhandler.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Tue Dec 6 2022 03:56:08 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.