# class JobUiDelegate

###

Module | kio
Namespace | KIO
Class | JobUiDelegate
Inherits | KDialogJobUiDelegate

A UI delegate tuned to be used with KIO Jobs.

### enums

- ConfirmationType { DefaultConfirmation, ForceConfirmation }
- DeletionType { Delete, Trash }

enum details

### methods

- JobUiDelegate ( )

  returns ctor

  Constructs a new KIO Job UI delegate.

- askDeleteConfirmation (urls, deletionType, confirmationType)

  returns bool
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  urls | KUrl.List |
  deletionType | KIO::JobUiDelegate.DeletionType |
  confirmationType | KIO::JobUiDelegate.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().

  urls - the urls about to be deleted/trashed

  method - the type of deletion (Delete for real deletion, Trash otherwise)

  confirmation - 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

- askFileRename (job, caption, src, dest, mode, newDest, sizeSrc, sizeDest, ctimeSrc, ctimeDest, mtimeSrc, mtimeDest)

  returns KIO.RenameDialog_Result

  Argument | Type | Default
  --- | --- | ---
  job | KJob |
  caption | QString |
  src | QString |
  dest | QString |
  mode | KIO.RenameDialog_Mode |
  newDest | QString |
  sizeSrc | KIO.filesize_t | -1
  sizeDest | KIO.filesize_t | -1
  ctimeSrc | time_t | -1
  ctimeDest | time_t | -1
  mtimeSrc | time_t | -1
  mtimeDest | time_t | -1

  \relates KIO.RenameDialog 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.

  caption - the caption 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

  mode - parameters for the dialog (which buttons to show...), see RenameDialog_Mode

  newDestPath - 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

- askSkip (job, multi, error_text)

  returns KIO.SkipDialog_Result

  Argument | Type | Default
  --- | --- | ---
  job | KJob |
  multi | bool |
  error_text | QString |

  Internal See skipdialog.h

- setWindow (window)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  window | QWidget |

  Associate this job with a window given by window.

  window - the window to associate to

  See also window()

### enums - detail

- ConfirmationType { DefaultConfirmation, ForceConfirmation }

  ForceConfirmation: always ask the user for confirmation DefaultConfirmation: don't ask the user if he/she said "don't ask again".

  Used by askDeleteConfirmation.

  | DefaultConfirmation | - | - |
  | ForceConfirmation | - | - |

- DeletionType { Delete, Trash }

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

  | Delete | - | - |
  | Trash | - | - |