# eric3.Project.AddDirectoryDialog

Module implementing a dialog to add files of a directory to the project.

### Classes

AddDirectoryDialog | Class implementing a dialog to add files of a directory to the project.

### Functions

None

## AddDirectoryDialog

Class implementing a dialog to add files of a directory to the project.

### Derived from

AddDirForm

### Methods

AddDirectoryDialog | Constructor
getData | Public slot to retrieve the dialogs data.
handleDirDialog | Private slot to display a directory selection dialog.
handleFileTypeSelected | Private slot to handle the selection of a file type.
handleSDirDialog | Private slot to handle the source dir button press.
handleSTextChanged | Private slot to handle the source dir text changed.
handleTDirDialog | Private slot to handle the target dir button press.

### AddDirectoryDialog (Constructor)

AddDirectoryDialog(pro, filter='py', parent = None, name = None, modal = 0, fl = 0, startdir = None)

Constructor

pro
  reference to the project object
filter
  file type filter (string or QString)
parent
  parent widget of this dialog (QWidget)
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

### AddDirectoryDialog.getData

getData()

Public slot to retrieve the dialogs data.

Returns:
  tuple of four values (string, string, string, boolean) giving the selected file extension, the source and target directory and a flag indicating a recursive add

### AddDirectoryDialog.handleDirDialog

handleDirDialog(textEdit)

Private slot to display a directory selection dialog.

textEdit
  field for the display of the selected directory name (QLineEdit)

### AddDirectoryDialog.handleFileTypeSelected

handleFileTypeSelected(fileType)

Private slot to handle the selection of a file type.

fileType
  the selected file type (QString)

### AddDirectoryDialog.handleSDirDialog

handleSDirDialog()

Private slot to handle the source dir button press.

### AddDirectoryDialog.handleSTextChanged

handleSTextChanged(dir)

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.

dir
  the text of the source directory line edit

### AddDirectoryDialog.handleTDirDialog

handleTDirDialog()

Private slot to handle the target dir button press.

Up