# eric7.Project.FiletypeAssociationDialog

Module implementing a dialog to enter filetype associations for the project.

### Global Attributes

None

### Classes

FiletypeAssociationDialog | Class implementing a dialog to enter filetype associations for the project.

### Functions

None

## FiletypeAssociationDialog

Class implementing a dialog to enter filetype associations for the project.

### Derived from

QDialog, Ui_FiletypeAssociationDialog

### Class Attributes

None

### Class Methods

None

### Methods

FiletypeAssociationDialog | Constructor
__createItem | Private slot to create a new entry in the association list.
__reformat | Private method to reformat the tree.
__resort | Private method to resort the tree.
on_addAssociationButton_clicked | Private slot to add the association displayed to the list.
on_deleteAssociationButton_clicked | Private slot to delete the currently selected association of the listbox.
on_filePatternEdit_textChanged | Private slot to handle the textChanged signal of the pattern lineedit.
on_filetypeAssociationList_currentItemChanged | Private slot to handle the currentItemChanged signal of the association list.
transferData | Public slot to transfer the associations into the projects data structure.

### Static Methods

None

#### FiletypeAssociationDialog (Constructor)

FiletypeAssociationDialog(project, parent=None)

Constructor

project
  reference to the project object
parent
  reference to the parent widget (QWidget)

#### FiletypeAssociationDialog.__createItem

__createItem(pattern, filetype)

Private slot to create a new entry in the association list.

pattern
  pattern of the entry (string)
filetype
  file type of the entry (string)

Return:
  reference to the newly generated entry (QTreeWidgetItem)

#### FiletypeAssociationDialog.__reformat

__reformat()

Private method to reformat the tree.

#### FiletypeAssociationDialog.__resort

__resort()

Private method to resort the tree.

#### FiletypeAssociationDialog.on_addAssociationButton_clicked

on_addAssociationButton_clicked()

Private slot to add the association displayed to the list.

#### FiletypeAssociationDialog.on_deleteAssociationButton_clicked

on_deleteAssociationButton_clicked()

Private slot to delete the currently selected association of the listbox.

#### FiletypeAssociationDialog.on_filePatternEdit_textChanged

on_filePatternEdit_textChanged(txt)

Private slot to handle the textChanged signal of the pattern lineedit.

txt
  text of the lineedit (string)

#### FiletypeAssociationDialog.on_filetypeAssociationList_currentItemChanged

on_filetypeAssociationList_currentItemChanged(itm, prevItm)

Private slot to handle the currentItemChanged signal of the association list.

itm
  reference to the new current item (QTreeWidgetItem)
prevItm
  reference to the previous current item (QTreeWidgetItem)

#### FiletypeAssociationDialog.transferData

transferData()

Public slot to transfer the associations into the projects data structure.

Up