# eric7.Project.AddFileDialog

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

### Global Attributes

None

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

QDialog, Ui_AddFileDialog

### Class Attributes

None

### Class Methods

None

### Methods

AddFileDialog | Constructor
getData | Public slot to retrieve the dialogs data.
on_sourceFilesPicker_aboutToShowPathPickerDialog | Private slot to perform actions before the source files selection dialog is shown.
on_sourceFilesPicker_textChanged | Private slot to handle the source file text changed.

### Static Methods

None

#### AddFileDialog (Constructor)

AddFileDialog(pro, parent=None, fileTypeFilter=None, name=None, startdir=None)

Constructor

pro (Project)
  reference to the project object
parent (QWidget)
  parent widget of this dialog
fileTypeFilter (str)
  filter specification for the file to add
name (str)
  name of this dialog
startdir (str)
  start directory for the selection dialog

#### AddFileDialog.getData

getData()

Public slot to retrieve the dialogs data.

Return:
  tuple containing the source files, the target directory and a flag telling, whether the files shall be added as source code

Return Type:
  tuple of (list of string, string, boolean)

#### AddFileDialog.on_sourceFilesPicker_aboutToShowPathPickerDialog

on_sourceFilesPicker_aboutToShowPathPickerDialog()

Private slot to perform actions before the source files selection dialog is shown.

#### AddFileDialog.on_sourceFilesPicker_textChanged

on_sourceFilesPicker_textChanged(sfile)

Private slot to handle the source file 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 (str)
  the text of the source file picker

Up