eric7.WebBrowser.WebBrowserLanguagesDialog

Module implementing a dialog to configure the preferred languages.

Global Attributes

None

Classes

WebBrowserLanguagesDialog Class implementing a dialog to configure the preferred languages.

Functions

None


WebBrowserLanguagesDialog

Class implementing a dialog to configure the preferred languages.

Derived from

QDialog, Ui_WebBrowserLanguagesDialog

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

WebBrowserLanguagesDialog 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

WebBrowserLanguagesDialog.defaultAcceptLanguages (class method)

defaultAcceptLanguages()

Class method to get the list of default accept languages.

Return:
list of acceptable languages
Return Type:
list of str

WebBrowserLanguagesDialog.expand (class method)

expand(language)

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

language (QLocale.Language)
language number
Return:
list of expanded language names
Return Type:
list of str

WebBrowserLanguagesDialog.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 str)
list of acceptable languages
Return:
converted list
Return Type:
QByteArray

WebBrowserLanguagesDialog (Constructor)

WebBrowserLanguagesDialog(parent=None)

Constructor

parent (QWidget)
reference to the parent widget

WebBrowserLanguagesDialog.__currentChanged

__currentChanged(current, _previous)

Private slot to handle a change of the current selection.

current (QModelIndex)
index of the currently selected item
_previous (QModelIndex)
index of the previously selected item (unused)

WebBrowserLanguagesDialog.accept

accept()

Public method to accept the data entered.

WebBrowserLanguagesDialog.on_addButton_clicked

on_addButton_clicked()

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

WebBrowserLanguagesDialog.on_downButton_clicked

on_downButton_clicked()

Private slot to move a language down.

WebBrowserLanguagesDialog.on_removeButton_clicked

on_removeButton_clicked()

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

WebBrowserLanguagesDialog.on_upButton_clicked

on_upButton_clicked()

Private slot to move a language up.

Up