# eric3.Project.AddFileDialog

Module implementing a dialog to add a file to the project.

### Classes

AddFileDialog | Class implementing a dialog to add a file to the project.

### Functions

None

## AddFileDialog

Class implementing a dialog to add a file to the project.

### Derived from

AddFileForm

### Methods

AddFileDialog | Constructor
getData | Public slot to retrieve the dialogs data.
handleDirDialog | Private slot to display a directory selection dialog.
handleFileDialog | Private slot to display a file selection dialog.
handleSTextChanged | Private slot to handle the source dir text changed.

### AddFileDialog (Constructor)

AddFileDialog(pro, parent = None, filter = None, name = None, modal = 0, fl = 0, startdir = None)

Constructor

pro
  reference to the project object
parent
  parent widget of this dialog (QWidget)
filter
  filter specification for the file to add (string or QString)
name
  name of this dialog (string or QString)
modal
  flag for a modal dialog (boolean)
fl
  window flags
startdir
  start directory for the selection dialog

### AddFileDialog.getData

getData()

Public slot to retrieve the dialogs data.

Returns:
  tuple of three values (string, string, boolean) giving the source file, the target directory and a flag telling, whether the file shall be added as source code

### AddFileDialog.handleDirDialog

handleDirDialog()

Private slot to display a directory selection dialog.

### AddFileDialog.handleFileDialog

handleFileDialog()

Private slot to display a file selection dialog. A filter of 'py' is synonym for source files.

### AddFileDialog.handleSTextChanged

handleSTextChanged(sfile)

Private slot to handle the source dir text changed. If the entered source directory is a subdirectory of the current projects main directory, the target directory path is synchronized. It is assumed, that the user wants to add a bunch of files to the project in place.

sfile
  the text of the source file line edit

Up