|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.WebBrowser.WebBrowserLanguagesDialog</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.WebBrowser.WebBrowserLanguagesDialog</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing a dialog to configure the preferred languages. |
|
13 </p> |
|
14 <h3>Global Attributes</h3> |
|
15 |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 |
|
21 <table> |
|
22 |
|
23 <tr> |
|
24 <td><a href="#WebBrowserLanguagesDialog">WebBrowserLanguagesDialog</a></td> |
|
25 <td>Class implementing a dialog to configure the preferred languages.</td> |
|
26 </tr> |
|
27 </table> |
|
28 <h3>Functions</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <hr /> |
|
34 <hr /> |
|
35 <a NAME="WebBrowserLanguagesDialog" ID="WebBrowserLanguagesDialog"></a> |
|
36 <h2>WebBrowserLanguagesDialog</h2> |
|
37 |
|
38 <p> |
|
39 Class implementing a dialog to configure the preferred languages. |
|
40 </p> |
|
41 <h3>Derived from</h3> |
|
42 QDialog, Ui_WebBrowserLanguagesDialog |
|
43 <h3>Class Attributes</h3> |
|
44 |
|
45 <table> |
|
46 <tr><td>None</td></tr> |
|
47 </table> |
|
48 <h3>Class Methods</h3> |
|
49 |
|
50 <table> |
|
51 |
|
52 <tr> |
|
53 <td><a href="#WebBrowserLanguagesDialog.defaultAcceptLanguages">defaultAcceptLanguages</a></td> |
|
54 <td>Class method to get the list of default accept languages.</td> |
|
55 </tr> |
|
56 <tr> |
|
57 <td><a href="#WebBrowserLanguagesDialog.expand">expand</a></td> |
|
58 <td>Class method to expand a language enum to a readable languages list.</td> |
|
59 </tr> |
|
60 <tr> |
|
61 <td><a href="#WebBrowserLanguagesDialog.httpString">httpString</a></td> |
|
62 <td>Class method to convert a list of acceptable languages into a byte array.</td> |
|
63 </tr> |
|
64 </table> |
|
65 <h3>Methods</h3> |
|
66 |
|
67 <table> |
|
68 |
|
69 <tr> |
|
70 <td><a href="#WebBrowserLanguagesDialog.__init__">WebBrowserLanguagesDialog</a></td> |
|
71 <td>Constructor</td> |
|
72 </tr> |
|
73 <tr> |
|
74 <td><a href="#WebBrowserLanguagesDialog.__currentChanged">__currentChanged</a></td> |
|
75 <td>Private slot to handle a change of the current selection.</td> |
|
76 </tr> |
|
77 <tr> |
|
78 <td><a href="#WebBrowserLanguagesDialog.accept">accept</a></td> |
|
79 <td>Public method to accept the data entered.</td> |
|
80 </tr> |
|
81 <tr> |
|
82 <td><a href="#WebBrowserLanguagesDialog.on_addButton_clicked">on_addButton_clicked</a></td> |
|
83 <td>Private slot to add a language to the list of acceptable languages.</td> |
|
84 </tr> |
|
85 <tr> |
|
86 <td><a href="#WebBrowserLanguagesDialog.on_downButton_clicked">on_downButton_clicked</a></td> |
|
87 <td>Private slot to move a language down.</td> |
|
88 </tr> |
|
89 <tr> |
|
90 <td><a href="#WebBrowserLanguagesDialog.on_removeButton_clicked">on_removeButton_clicked</a></td> |
|
91 <td>Private slot to remove a language from the list of acceptable languages.</td> |
|
92 </tr> |
|
93 <tr> |
|
94 <td><a href="#WebBrowserLanguagesDialog.on_upButton_clicked">on_upButton_clicked</a></td> |
|
95 <td>Private slot to move a language up.</td> |
|
96 </tr> |
|
97 </table> |
|
98 <h3>Static Methods</h3> |
|
99 |
|
100 <table> |
|
101 <tr><td>None</td></tr> |
|
102 </table> |
|
103 |
|
104 <a NAME="WebBrowserLanguagesDialog.defaultAcceptLanguages" ID="WebBrowserLanguagesDialog.defaultAcceptLanguages"></a> |
|
105 <h4>WebBrowserLanguagesDialog.defaultAcceptLanguages (class method)</h4> |
|
106 <b>defaultAcceptLanguages</b>(<i></i>) |
|
107 |
|
108 <p> |
|
109 Class method to get the list of default accept languages. |
|
110 </p> |
|
111 <dl> |
|
112 <dt>Return:</dt> |
|
113 <dd> |
|
114 list of acceptable languages (list of strings) |
|
115 </dd> |
|
116 </dl> |
|
117 <a NAME="WebBrowserLanguagesDialog.expand" ID="WebBrowserLanguagesDialog.expand"></a> |
|
118 <h4>WebBrowserLanguagesDialog.expand (class method)</h4> |
|
119 <b>expand</b>(<i>language</i>) |
|
120 |
|
121 <p> |
|
122 Class method to expand a language enum to a readable languages |
|
123 list. |
|
124 </p> |
|
125 <dl> |
|
126 |
|
127 <dt><i>language</i></dt> |
|
128 <dd> |
|
129 language number (QLocale.Language) |
|
130 </dd> |
|
131 </dl> |
|
132 <dl> |
|
133 <dt>Return:</dt> |
|
134 <dd> |
|
135 list of expanded language names (list of strings) |
|
136 </dd> |
|
137 </dl> |
|
138 <a NAME="WebBrowserLanguagesDialog.httpString" ID="WebBrowserLanguagesDialog.httpString"></a> |
|
139 <h4>WebBrowserLanguagesDialog.httpString (class method)</h4> |
|
140 <b>httpString</b>(<i>languages</i>) |
|
141 |
|
142 <p> |
|
143 Class method to convert a list of acceptable languages into a |
|
144 byte array. |
|
145 </p> |
|
146 <p> |
|
147 The byte array can be sent along with the Accept-Language http header |
|
148 (see RFC 2616). |
|
149 </p> |
|
150 <dl> |
|
151 |
|
152 <dt><i>languages</i></dt> |
|
153 <dd> |
|
154 list of acceptable languages (list of strings) |
|
155 </dd> |
|
156 </dl> |
|
157 <dl> |
|
158 <dt>Return:</dt> |
|
159 <dd> |
|
160 converted list (QByteArray) |
|
161 </dd> |
|
162 </dl> |
|
163 <a NAME="WebBrowserLanguagesDialog.__init__" ID="WebBrowserLanguagesDialog.__init__"></a> |
|
164 <h4>WebBrowserLanguagesDialog (Constructor)</h4> |
|
165 <b>WebBrowserLanguagesDialog</b>(<i>parent=None</i>) |
|
166 |
|
167 <p> |
|
168 Constructor |
|
169 </p> |
|
170 <dl> |
|
171 |
|
172 <dt><i>parent</i></dt> |
|
173 <dd> |
|
174 reference to the parent widget (QWidget) |
|
175 </dd> |
|
176 </dl> |
|
177 <a NAME="WebBrowserLanguagesDialog.__currentChanged" ID="WebBrowserLanguagesDialog.__currentChanged"></a> |
|
178 <h4>WebBrowserLanguagesDialog.__currentChanged</h4> |
|
179 <b>__currentChanged</b>(<i>current, previous</i>) |
|
180 |
|
181 <p> |
|
182 Private slot to handle a change of the current selection. |
|
183 </p> |
|
184 <dl> |
|
185 |
|
186 <dt><i>current</i></dt> |
|
187 <dd> |
|
188 index of the currently selected item (QModelIndex) |
|
189 </dd> |
|
190 <dt><i>previous</i></dt> |
|
191 <dd> |
|
192 index of the previously selected item (QModelIndex) |
|
193 </dd> |
|
194 </dl> |
|
195 <a NAME="WebBrowserLanguagesDialog.accept" ID="WebBrowserLanguagesDialog.accept"></a> |
|
196 <h4>WebBrowserLanguagesDialog.accept</h4> |
|
197 <b>accept</b>(<i></i>) |
|
198 |
|
199 <p> |
|
200 Public method to accept the data entered. |
|
201 </p> |
|
202 <a NAME="WebBrowserLanguagesDialog.on_addButton_clicked" ID="WebBrowserLanguagesDialog.on_addButton_clicked"></a> |
|
203 <h4>WebBrowserLanguagesDialog.on_addButton_clicked</h4> |
|
204 <b>on_addButton_clicked</b>(<i></i>) |
|
205 |
|
206 <p> |
|
207 Private slot to add a language to the list of acceptable languages. |
|
208 </p> |
|
209 <a NAME="WebBrowserLanguagesDialog.on_downButton_clicked" ID="WebBrowserLanguagesDialog.on_downButton_clicked"></a> |
|
210 <h4>WebBrowserLanguagesDialog.on_downButton_clicked</h4> |
|
211 <b>on_downButton_clicked</b>(<i></i>) |
|
212 |
|
213 <p> |
|
214 Private slot to move a language down. |
|
215 </p> |
|
216 <a NAME="WebBrowserLanguagesDialog.on_removeButton_clicked" ID="WebBrowserLanguagesDialog.on_removeButton_clicked"></a> |
|
217 <h4>WebBrowserLanguagesDialog.on_removeButton_clicked</h4> |
|
218 <b>on_removeButton_clicked</b>(<i></i>) |
|
219 |
|
220 <p> |
|
221 Private slot to remove a language from the list of acceptable |
|
222 languages. |
|
223 </p> |
|
224 <a NAME="WebBrowserLanguagesDialog.on_upButton_clicked" ID="WebBrowserLanguagesDialog.on_upButton_clicked"></a> |
|
225 <h4>WebBrowserLanguagesDialog.on_upButton_clicked</h4> |
|
226 <b>on_upButton_clicked</b>(<i></i>) |
|
227 |
|
228 <p> |
|
229 Private slot to move a language up. |
|
230 </p> |
|
231 <div align="right"><a href="#top">Up</a></div> |
|
232 <hr /> |
|
233 </body></html> |