• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KIO

  • KIO
  • JobUiDelegate
Public Types | Public Member Functions | Related Functions | List of all members
KIO::JobUiDelegate Class Reference

#include <jobuidelegate.h>

Inheritance diagram for KIO::JobUiDelegate:
Inheritance graph
[legend]

Public Types

enum  ConfirmationType { DefaultConfirmation, ForceConfirmation }
 
enum  DeletionType { Delete, Trash, EmptyTrash }
 
enum  MessageBoxType {
  QuestionYesNo = 1, WarningYesNo = 2, WarningContinueCancel = 3, WarningYesNoCancel = 4,
  Information = 5, SSLMessageBox = 6
}
 

Public Member Functions

 JobUiDelegate ()
 
virtual ~JobUiDelegate ()
 
bool askDeleteConfirmation (const KUrl::List &urls, DeletionType deletionType, ConfirmationType confirmationType)
 
virtual SkipDialog_Result askSkip (KJob *job, bool multi, const QString &error_text)
 
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())
 
virtual void setWindow (QWidget *window)
 
- Public Member Functions inherited from KDialogJobUiDelegate
 KDialogJobUiDelegate ()
 
virtual ~KDialogJobUiDelegate ()
 
virtual void showErrorMessage ()
 
void updateUserTimestamp (unsigned long time)
 
unsigned long userTimestamp () const
 
QWidget * window () const
 
- Public Member Functions inherited from KJobUiDelegate
 KJobUiDelegate ()
 
virtual ~KJobUiDelegate ()
 
bool isAutoErrorHandlingEnabled () const
 
bool isAutoWarningHandlingEnabled () const
 
void setAutoErrorHandlingEnabled (bool enable)
 
void setAutoWarningHandlingEnabled (bool enable)
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
 QObject (QObject *parent, const char *name)
 
virtual  ~QObject ()
 
bool blockSignals (bool block)
 
QObject * child (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
const char * className () const
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const QObject *receiver, const char *method)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArray > dynamicPropertyNames () const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
T findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QList< T > findChildren (const QString &name) const
 
bool inherits (const char *className) const
 
void insertChild (QObject *object)
 
void installEventFilter (QObject *filterObj)
 
bool isA (const char *className) const
 
bool isWidgetType () const
 
void killTimer (int id)
 
virtual const QMetaObject * metaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObject * parent () const
 
QVariant property (const char *name) const
 
void removeChild (QObject *object)
 
void removeEventFilter (QObject *obj)
 
void setName (const char *name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval)
 
QThread * thread () const
 

Related Functions

(Note that these are not member functions.)

virtual RenameDialog_Result askFileRename (KJob *job, const QString &caption, const QString &src, const QString &dest, KIO::RenameDialog_Mode mode, QString &newDest, KIO::filesize_t sizeSrc=KIO::filesize_t(-1), KIO::filesize_t sizeDest=KIO::filesize_t(-1), time_t ctimeSrc=time_t(-1), time_t ctimeDest=time_t(-1), time_t mtimeSrc=time_t(-1), time_t mtimeDest=time_t(-1))
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
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)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Protected Slots inherited from KDialogJobUiDelegate
virtual void slotWarning (KJob *job, const QString &plain, const QString &rich)
 
- Protected Slots inherited from KJobUiDelegate
virtual void slotWarning (KJob *job, const QString &plain, const QString &rich)
 
- Protected Member Functions inherited from KJobUiDelegate
KJob * job ()
 
- Protected Member Functions inherited from QObject
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const char *signal)
 
int receivers (const char *signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Properties inherited from QObject
 objectName
 

Detailed Description

A UI delegate tuned to be used with KIO Jobs.

Definition at line 39 of file jobuidelegate.h.

Member Enumeration Documentation

enum KIO::JobUiDelegate::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.

Enumerator
DefaultConfirmation 
ForceConfirmation 

Definition at line 116 of file jobuidelegate.h.

enum KIO::JobUiDelegate::DeletionType

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

Enumerator
Delete 
Trash 
EmptyTrash 

Definition at line 109 of file jobuidelegate.h.

enum KIO::JobUiDelegate::MessageBoxType

Message box types.

Should be kept in sync with SlaveBase::MessageBoxType.

Since
4.11
Enumerator
QuestionYesNo 
WarningYesNo 
WarningContinueCancel 
WarningYesNoCancel 
Information 
SSLMessageBox 

Definition at line 141 of file jobuidelegate.h.

Constructor & Destructor Documentation

KIO::JobUiDelegate::JobUiDelegate ( )

Constructs a new KIO Job UI delegate.

Definition at line 48 of file jobuidelegate.cpp.

KIO::JobUiDelegate::~JobUiDelegate ( )
virtual

Destroys the KIO Job UI delegate.

Definition at line 53 of file jobuidelegate.cpp.

Member Function Documentation

bool KIO::JobUiDelegate::askDeleteConfirmation ( const KUrl::List &  urls,
DeletionType  deletionType,
ConfirmationType  confirmationType 
)

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
methodthe type of deletion (Delete for real deletion, Trash otherwise)
confirmationsee ConfirmationType. Normally set to DefaultConfirmation. Note: the window passed to setWindow is used as the parent for the message box.
Returns
true if confirmed

Definition at line 108 of file jobuidelegate.cpp.

KIO::SkipDialog_Result KIO::JobUiDelegate::askSkip ( KJob *  job,
bool  multi,
const QString &  error_text 
)
virtual

See skipdialog.h

Definition at line 97 of file jobuidelegate.cpp.

int KIO::JobUiDelegate::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() 
)

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.
Since
4.11

Definition at line 200 of file jobuidelegate.cpp.

void KIO::JobUiDelegate::setWindow ( QWidget *  window)
virtual

Associate this job with a window given by window.

Parameters
windowthe window to associate to
See also
window()

Reimplemented from KDialogJobUiDelegate.

Definition at line 58 of file jobuidelegate.cpp.

Friends And Related Function Documentation

KIO::RenameDialog_Result KIO::JobUiDelegate::askFileRename ( KJob *  job,
const QString &  caption,
const QString &  src,
const QString &  dest,
KIO::RenameDialog_Mode  mode,
QString &  newDest,
KIO::filesize_t  sizeSrc = KIO::filesize_t(-1),
KIO::filesize_t  sizeDest = KIO::filesize_t(-1),
time_t  ctimeSrc = time_t(-1),
time_t  ctimeDest = time_t(-1),
time_t  mtimeSrc = time_t(-1),
time_t  mtimeDest = time_t(-1) 
)
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
modeparameters for the dialog (which buttons to show...), see RenameDialog_Mode
newDestPaththe 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

Definition at line 64 of file jobuidelegate.cpp.


The documentation for this class was generated from the following files:
  • jobuidelegate.h
  • jobuidelegate.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:55 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal