# eric3.UI.FindFileDialog

Module implementing a dialog to search for text in files.

### Classes

FindFileDialog | Class implementing a dialog to search for text in files.

### Functions

None

## FindFileDialog

Class implementing a dialog to search for text in files. The occurences found are displayed in a QListView widget showing the filename, the linenumber and the found text. The file will be opened upon a double click onto the respective entry of the list.

#### Signals

designerFile(string)
  emitted to open a Qt-Designer file
pythonFile(string, int)
  emitted to open a Python file at a line

### Derived from

FindFileForm

### Methods

FindFileDialog | Constructor
enableFindButton | Private slot called to enable the find button.
findPressed | Private slot to handle the find button being pressed.
getFileList | Private method to get a list of files to search.
handleDirSelection | Private slot to display a directory selection dialog.
handleDoubleClick | Private slot to handle the double click.
keyPressEvent | Protected slot to intercept the return key press.
show | Overwritten method to enable/disable the project button.
walkFilter | Private method used to walk through a directory tree building a list of files we are interested in.

### FindFileDialog (Constructor)

FindFileDialog(project, parent=None)

Constructor

project
  reference to the project object
parent
  parent widget of this dialog (QWidget)

### FindFileDialog.enableFindButton

enableFindButton()

Private slot called to enable the find button.

### FindFileDialog.findPressed

findPressed()

Private slot to handle the find button being pressed.

### FindFileDialog.getFileList

getFileList(path)

Private method to get a list of files to search.

path
  the root directory to search in (string)

Returns:
  list of files to be processed (list of strings)

### FindFileDialog.handleDirSelection

handleDirSelection()

Private slot to display a directory selection dialog.

### FindFileDialog.handleDoubleClick

handleDoubleClick(itm)

Private slot to handle the double click. It emits the signal pythonFile or designerFile depending on the file extension.

itm
  the double clicked listview item (QListViewItem)

### FindFileDialog.keyPressEvent

keyPressEvent(evt)

Protected slot to intercept the return key press.

evt
  a key press event (QKeyEvent)

### FindFileDialog.show

show(txt = "")

Overwritten method to enable/disable the project button.

txt
  text to be shown in the searchtext combo (string or QString)

### FindFileDialog.walkFilter

walkFilter(arg, dirname, names)

Private method used to walk through a directory tree building a list of files we are interested in.

arg
  variable we add our interesting files to
dirname
  name of directory (string)
names
  filenames of files in directory dirname (list of strings)

Up