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