# eric6.Project.AddDirectoryDialog

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

### Global Attributes

None

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

QDialog, Ui_AddDirectoryDialog

### Class Attributes

None

### Class Methods

None

### Methods

AddDirectoryDialog | Constructor
__dirDialog | Private slot to display a directory selection dialog.
getData | Public slot to retrieve the dialogs data.
on_filterComboBox_highlighted | Private slot to handle the selection of a file type.
on_sourceDirButton_clicked | Private slot to handle the source dir button press.
on_sourceDirEdit_textChanged | Private slot to handle the source dir text changed.
on_targetDirButton_clicked | Private slot to handle the target dir button press.

### Static Methods

None

#### AddDirectoryDialog (Constructor)

AddDirectoryDialog(pro, filter='source', parent=None, name=None, startdir=None)

Constructor

pro
  reference to the project object
filter
  file type filter (string)
parent
  parent widget of this dialog (QWidget)
name
  name of this dialog (string)
startdir
  start directory for the selection dialog

#### AddDirectoryDialog.__dirDialog

__dirDialog(textEdit)

Private slot to display a directory selection dialog.

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

#### AddDirectoryDialog.getData

getData()

Public slot to retrieve the dialogs data.

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

#### AddDirectoryDialog.on_filterComboBox_highlighted

on_filterComboBox_highlighted(fileType)

Private slot to handle the selection of a file type.

fileType
  the selected file type (string)

#### AddDirectoryDialog.on_sourceDirButton_clicked

on_sourceDirButton_clicked()

Private slot to handle the source dir button press.

#### AddDirectoryDialog.on_sourceDirEdit_textChanged

on_sourceDirEdit_textChanged(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 (string)

#### AddDirectoryDialog.on_targetDirButton_clicked

on_targetDirButton_clicked()

Private slot to handle the target dir button press.

Up