# eric6.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_sourceFileButton_clicked | Private slot to display a file selection dialog.
on_sourceFileEdit_textChanged | Private slot to handle the source file text changed.
on_targetDirButton_clicked | Private slot to display a directory selection dialog.

### Static Methods

None

#### AddFileDialog (Constructor)

AddFileDialog(pro, parent=None, filter=None, name=None, 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)
name
  name of this dialog (string)
startdir
  start directory for the selection dialog

#### AddFileDialog.getData

getData()

Public slot to retrieve the dialogs data.

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

#### AddFileDialog.on_sourceFileButton_clicked

on_sourceFileButton_clicked()

Private slot to display a file selection dialog.

#### AddFileDialog.on_sourceFileEdit_textChanged

on_sourceFileEdit_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
  the text of the source file line edit (string)

#### AddFileDialog.on_targetDirButton_clicked

on_targetDirButton_clicked()

Private slot to display a directory selection dialog.

Up