# eric7.EricWidgets.EricFileSaveConfirmDialog

Module implementing a dialog to enter a file system path using a file picker.

### Global Attributes

None

### Classes

EricFileSaveConfirmDialog | Class implementing a dialog to enter a file system path using a file picker.

### Functions

confirmOverwrite | Function to confirm that a file shall be overwritten.

## EricFileSaveConfirmDialog

Class implementing a dialog to enter a file system path using a file picker.

### Derived from

QDialog

### Class Attributes

None

### Class Methods

None

### Methods

EricFileSaveConfirmDialog | Constructor
__buttonBoxClicked | Private slot to handle the user clicking a button.
__filenameChanged | Private slot to handle a change of the file name.
selectedAction | Public method to get the selected action and associated data.

### Static Methods

None

#### EricFileSaveConfirmDialog (Constructor)

EricFileSaveConfirmDialog(filename, title, message="", picker=True, parent=None)

Constructor

filename (str)
  file name to be shown
title (str)
  title for the dialog
message (str)
  message to be shown
picker (bool)
  flag indicating to use a path picker
parent (QWidget)
  reference to the parent widget

#### EricFileSaveConfirmDialog.__buttonBoxClicked

__buttonBoxClicked(button)

Private slot to handle the user clicking a button.

button (QAbstractButton)
  reference to the clicked button

#### EricFileSaveConfirmDialog.__filenameChanged

__filenameChanged(text)

Private slot to handle a change of the file name.

text (str)
  new file name

#### EricFileSaveConfirmDialog.selectedAction

selectedAction()

Public method to get the selected action and associated data.

Return:
  tuple containing the selected action (cancel, rename, overwrite) and the filename (in case of 'rename' or 'overwrite')

Return Type:
  tuple of (str, str)

Up

## confirmOverwrite

confirmOverwrite(filename, title, message="", picker=True, parent=None)

Function to confirm that a file shall be overwritten.

filename (str)
  file name to be shown
title (str)
  title for the dialog
message (str)
  message to be shown
picker (bool)
  flag indicating to use a path picker
parent (QWidget)
  reference to the parent widget

Return:
  tuple containing the selected action (cancel, rename, overwrite) and the filename (in case of 'rename' or 'overwrite')

Return Type:
  tuple of (str, str)

Up