# eric5.Helpviewer.HelpLanguagesDialog

Module implementing a dialog to configure the preferred languages.

### Global Attributes

None

### Classes

HelpLanguagesDialog | Class implementing a dialog to configure the preferred languages.

### Functions

None

## HelpLanguagesDialog

Class implementing a dialog to configure the preferred languages.

### Derived from

QDialog, Ui_HelpLanguagesDialog

### Class Attributes

None

### Class Methods

defaultAcceptLanguages | Class method to get the list of default accept languages.
expand | Class method to expand a language enum to a readable languages list.
httpString | Class method to convert a list of acceptable languages into a byte array.

### Methods

HelpLanguagesDialog | Constructor
__currentChanged | Private slot to handle a change of the current selection.
accept | Public method to accept the data entered.
on_addButton_clicked | Private slot to add a language to the list of acceptable languages.
on_downButton_clicked | Private slot to move a language down.
on_removeButton_clicked | Private slot to remove a language from the list of acceptable languages.
on_upButton_clicked | Private slot to move a language up.

### Static Methods

None

#### HelpLanguagesDialog.defaultAcceptLanguages (class method)

defaultAcceptLanguages()

Class method to get the list of default accept languages.

Returns:
  list of acceptable languages (list of strings)

#### HelpLanguagesDialog.expand (class method)

expand(language)

Class method to expand a language enum to a readable languages list.

language
  language number (QLocale.Language)

Returns:
  list of expanded language names (list of strings)

#### HelpLanguagesDialog.httpString (class method)

httpString(languages)

Class method to convert a list of acceptable languages into a byte array.

The byte array can be sent along with the Accept-Language http header (see RFC 2616).

languages
  list of acceptable languages (list of strings)

Returns:
  converted list (QByteArray)

#### HelpLanguagesDialog (Constructor)

HelpLanguagesDialog(parent=None)

Constructor

parent
  reference to the parent widget (QWidget)

#### HelpLanguagesDialog.__currentChanged

__currentChanged(current, previous)

Private slot to handle a change of the current selection.

current
  index of the currently selected item (QModelIndex)
previous
  index of the previously selected item (QModelIndex)

#### HelpLanguagesDialog.accept

accept()

Public method to accept the data entered.

#### HelpLanguagesDialog.on_addButton_clicked

on_addButton_clicked()

Private slot to add a language to the list of acceptable languages.

#### HelpLanguagesDialog.on_downButton_clicked

on_downButton_clicked()

Private slot to move a language down.

#### HelpLanguagesDialog.on_removeButton_clicked

on_removeButton_clicked()

Private slot to remove a language from the list of acceptable languages.

#### HelpLanguagesDialog.on_upButton_clicked

on_upButton_clicked()

Private slot to move a language up.

Up