KIO.RenameDialog

KDE 4.5 PyKDE API Reference

- KDE's Python API

# RenameDialog Class Reference

`from PyKDE4.kio import *`

Inherits: QDialog → QWidget → QObject
Namespace: KIO

## Detailed Description

The dialog shown when a CopyJob realizes that a destination file already exists, and wants to offer the user with the choice to either Rename, Overwrite, Skip; this dialog is also used when a .part file exists and the user can choose to Resume a previous download.

## Methods
| __init__ (self, QWidget parent, QString caption, KUrl src, KUrl dest, KIO.RenameDialog_Mode mode, long sizeSrc=-1, long sizeDest=-1, long ctimeSrc=-1, long ctimeDest=-1, long mtimeSrc=-1, long mtimeDest=-1)
KUrl | autoDestUrl (self)
| autoSkipPressed (self)
| cancelPressed (self)
| enableRenameButton (self, QString a0)
KUrl | newDestUrl (self)
| overwriteAllPressed (self)
| overwritePressed (self)
| renamePressed (self)
| resumeAllPressed (self)
| resumePressed (self)
| skipPressed (self)
| suggestNewNamePressed (self)
## Static Methods
QString | suggestName (KUrl baseURL, QString oldName)

## Method Documentation

__init__ | ( | self, |
|  | QWidget | parent,
|  | QString | caption,
|  | KUrl | src,
|  | KUrl | dest,
|  | KIO.RenameDialog_Mode | mode,
|  | long | sizeSrc=-1,
|  | long | sizeDest=-1,
|  | long | ctimeSrc=-1,
|  | long | ctimeDest=-1,
|  | long | mtimeSrc=-1,
|  | long | mtimeDest=-1
| ) |  |  |

Construct a "rename" dialog to let the user know that src is about to overwrite dest.

Parameters:

  | parent | parent widget (often 0)
  | caption | the caption for the dialog box
  | src | the url to the file/dir we're trying to copy, as it's part of the text message
  | dest | the path to destination file/dir, i.e. the one that already exists
  | mode | parameters for the dialog (which buttons to show...),
  | 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

See also:
  RenameDialog_Mode

KUrl autoDestUrl | ( |  | self ) |

Returns:
  an automatically renamed destination

Since:
  4.5 valid always

autoSkipPressed | ( |  | self ) |

cancelPressed | ( |  | self ) |

enableRenameButton | ( | self, |
|  | QString | a0
| ) |  |  |

KUrl newDestUrl | ( |  | self ) |

Returns:
  the new destination valid only if RENAME was chosen

overwriteAllPressed | ( |  | self ) |

overwritePressed | ( |  | self ) |

renamePressed | ( |  | self ) |

resumeAllPressed | ( |  | self ) |

resumePressed | ( |  | self ) |

skipPressed | ( |  | self ) |

suggestNewNamePressed | ( |  | self ) |

## Static Method Documentation

QString suggestName | ( | KUrl | baseURL,
|  | QString | oldName
| ) |  |  |

Given a directory path and a filename (which usually exists already), this function returns a suggested name for a file that doesn't exist in that directory. The existence is only checked for local urls though. The suggested file name is of the form foo_1 foo_2 etc.