# eric6.WebBrowser.SpellCheck.ManageDictionariesDialog

Module implementing a dialog to install spell checking dictionaries.

### Global Attributes

None

### Classes

ManageDictionariesDialog | Class implementing a dialog to install spell checking dictionaries.

### Functions

None

## ManageDictionariesDialog

Class implementing a dialog to install spell checking dictionaries.

### Derived from

QDialog, Ui_ManageDictionariesDialog

### Class Attributes

DocumentationDirRole
FilenameRole
LocalesRole
UrlRole

### Class Methods

None

### Methods

ManageDictionariesDialog | Constructor
__checkInstalledDictionaries | Private method to check all installed dictionaries.
__downloadCancel | Private slot to cancel the current download.
__downloadDictionary | Private slot to download a dictionary.
__downloadProgress | Private slot to show the download progress.
__installDictionary | Private slot to install the downloaded dictionary.
__installSelected | Private method to install the selected dictionaries.
__installationFinished | Private method called after all selected dictionaries have been installed.
__isOnline | Private method to check the online status.
__listFileDownloaded | Private method called, after the dictionaries list file has been downloaded from the Internet.
__onlineStateChanged | Private slot handling online state changes.
__populateList | Private method to populate the list of available plugins.
__uninstallSelected | Private method to uninstall the selected dictionaries.
addEntry | Public method to add an entry to the list.
on_buttonBox_clicked | Private slot to handle the click of a button of the button box.
on_dictionariesList_itemSelectionChanged | Private slot to handle a change of the selection.
on_dictionariesUrlEditButton_toggled | Private slot to set the read only status of the dictionaries URL line edit.
on_locationComboBox_currentTextChanged | Private slot to handle a change of the installation location.

### Static Methods

None

#### ManageDictionariesDialog (Constructor)

ManageDictionariesDialog(writeableDirectories, parent=None)

Constructor

writeableDirectories (list of str)
  list of writable directories
parent (QWidget)
  reference to the parent widget

#### ManageDictionariesDialog.__checkInstalledDictionaries

__checkInstalledDictionaries()

Private method to check all installed dictionaries.

Note: A dictionary is assumed to be installed, if at least one of its binary dictionaries (*.bdic) is found in the selected dictionaries location.

#### ManageDictionariesDialog.__downloadCancel

__downloadCancel()

Private slot to cancel the current download.

#### ManageDictionariesDialog.__downloadDictionary

__downloadDictionary()

Private slot to download a dictionary.

#### ManageDictionariesDialog.__downloadProgress

__downloadProgress(done, total)

Private slot to show the download progress.

done (int)
  number of bytes downloaded so far
total (int)
  total bytes to be downloaded

#### ManageDictionariesDialog.__installDictionary

__installDictionary()

Private slot to install the downloaded dictionary.

#### ManageDictionariesDialog.__installSelected

__installSelected()

Private method to install the selected dictionaries.

#### ManageDictionariesDialog.__installationFinished

__installationFinished()

Private method called after all selected dictionaries have been installed.

#### ManageDictionariesDialog.__isOnline

__isOnline()

Private method to check the online status.

Returns:
  flag indicating the online status

Return Type:
  bool

#### ManageDictionariesDialog.__listFileDownloaded

__listFileDownloaded()

Private method called, after the dictionaries list file has been downloaded from the Internet.

#### ManageDictionariesDialog.__onlineStateChanged

__onlineStateChanged(online)

Private slot handling online state changes.

online (bool)
  flag indicating the online status

#### ManageDictionariesDialog.__populateList

__populateList()

Private method to populate the list of available plugins.

#### ManageDictionariesDialog.__uninstallSelected

__uninstallSelected()

Private method to uninstall the selected dictionaries.

#### ManageDictionariesDialog.addEntry

addEntry(short, filename, url, documentationDir, locales)

Public method to add an entry to the list.

short (str)
  data for the description field
filename (str)
  data for the filename field
url (str)
  download URL for the dictionary entry
documentationDir (str)
  name of the directory containing the dictionary documentation
locales (list of str)
  list of locales

#### ManageDictionariesDialog.on_buttonBox_clicked

on_buttonBox_clicked(button)

Private slot to handle the click of a button of the button box.

button (QAbstractButton)
  reference to the button pressed

#### ManageDictionariesDialog.on_dictionariesList_itemSelectionChanged

on_dictionariesList_itemSelectionChanged()

Private slot to handle a change of the selection.

#### ManageDictionariesDialog.on_dictionariesUrlEditButton_toggled

on_dictionariesUrlEditButton_toggled(checked)

Private slot to set the read only status of the dictionaries URL line edit.

checked
  state of the push button (boolean)

#### ManageDictionariesDialog.on_locationComboBox_currentTextChanged

on_locationComboBox_currentTextChanged(txt)

Private slot to handle a change of the installation location.

txt (str)
  installation location

Up