|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.Plugins.PluginTranslator</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.Plugins.PluginTranslator</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing the Translator plugin. |
|
13 </p> |
|
14 <h3>Global Attributes</h3> |
|
15 |
|
16 <table> |
|
17 <tr><td>author</td></tr><tr><td>autoactivate</td></tr><tr><td>className</td></tr><tr><td>deactivateable</td></tr><tr><td>error</td></tr><tr><td>longDescription</td></tr><tr><td>name</td></tr><tr><td>needsRestart</td></tr><tr><td>packageName</td></tr><tr><td>pyqtApi</td></tr><tr><td>shortDescription</td></tr><tr><td>translatorPluginObject</td></tr><tr><td>version</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 |
|
21 <table> |
|
22 |
|
23 <tr> |
|
24 <td><a href="#TranslatorPlugin">TranslatorPlugin</a></td> |
|
25 <td>Class implementing the Translator plug-in.</td> |
|
26 </tr> |
|
27 </table> |
|
28 <h3>Functions</h3> |
|
29 |
|
30 <table> |
|
31 |
|
32 <tr> |
|
33 <td><a href="#createTranslatorPage">createTranslatorPage</a></td> |
|
34 <td>Module function to create the Translator configuration page.</td> |
|
35 </tr> |
|
36 <tr> |
|
37 <td><a href="#getConfigData">getConfigData</a></td> |
|
38 <td>Module function returning data as required by the configuration dialog.</td> |
|
39 </tr> |
|
40 <tr> |
|
41 <td><a href="#prepareUninstall">prepareUninstall</a></td> |
|
42 <td>Module function to prepare for an uninstallation.</td> |
|
43 </tr> |
|
44 </table> |
|
45 <hr /> |
|
46 <hr /> |
|
47 <a NAME="TranslatorPlugin" ID="TranslatorPlugin"></a> |
|
48 <h2>TranslatorPlugin</h2> |
|
49 |
|
50 <p> |
|
51 Class implementing the Translator plug-in. |
|
52 </p> |
|
53 <h3>Signals</h3> |
|
54 <dl> |
|
55 |
|
56 <dt>updateLanguages()</dt> |
|
57 <dd> |
|
58 emitted to indicate a languages update |
|
59 </dd> |
|
60 </dl> |
|
61 <h3>Derived from</h3> |
|
62 QObject |
|
63 <h3>Class Attributes</h3> |
|
64 |
|
65 <table> |
|
66 <tr><td>PreferencesKey</td></tr> |
|
67 </table> |
|
68 <h3>Class Methods</h3> |
|
69 |
|
70 <table> |
|
71 <tr><td>None</td></tr> |
|
72 </table> |
|
73 <h3>Methods</h3> |
|
74 |
|
75 <table> |
|
76 |
|
77 <tr> |
|
78 <td><a href="#TranslatorPlugin.__init__">TranslatorPlugin</a></td> |
|
79 <td>Constructor</td> |
|
80 </tr> |
|
81 <tr> |
|
82 <td><a href="#TranslatorPlugin.__initialize">__initialize</a></td> |
|
83 <td>Private slot to (re)initialize the plugin.</td> |
|
84 </tr> |
|
85 <tr> |
|
86 <td><a href="#TranslatorPlugin.activate">activate</a></td> |
|
87 <td>Public method to activate this plugin.</td> |
|
88 </tr> |
|
89 <tr> |
|
90 <td><a href="#TranslatorPlugin.deactivate">deactivate</a></td> |
|
91 <td>Public method to deactivate this plugin.</td> |
|
92 </tr> |
|
93 <tr> |
|
94 <td><a href="#TranslatorPlugin.getPreferences">getPreferences</a></td> |
|
95 <td>Public method to retrieve the various settings.</td> |
|
96 </tr> |
|
97 <tr> |
|
98 <td><a href="#TranslatorPlugin.getPreferencesDefault">getPreferencesDefault</a></td> |
|
99 <td>Public method to retrieve the various default settings.</td> |
|
100 </tr> |
|
101 <tr> |
|
102 <td><a href="#TranslatorPlugin.setPreferences">setPreferences</a></td> |
|
103 <td>Public method to store the various settings.</td> |
|
104 </tr> |
|
105 </table> |
|
106 <h3>Static Methods</h3> |
|
107 |
|
108 <table> |
|
109 <tr><td>None</td></tr> |
|
110 </table> |
|
111 |
|
112 <a NAME="TranslatorPlugin.__init__" ID="TranslatorPlugin.__init__"></a> |
|
113 <h4>TranslatorPlugin (Constructor)</h4> |
|
114 <b>TranslatorPlugin</b>(<i>ui</i>) |
|
115 |
|
116 <p> |
|
117 Constructor |
|
118 </p> |
|
119 <dl> |
|
120 |
|
121 <dt><i>ui</i> (UI.UserInterface)</dt> |
|
122 <dd> |
|
123 reference to the user interface object |
|
124 </dd> |
|
125 </dl> |
|
126 <a NAME="TranslatorPlugin.__initialize" ID="TranslatorPlugin.__initialize"></a> |
|
127 <h4>TranslatorPlugin.__initialize</h4> |
|
128 <b>__initialize</b>(<i></i>) |
|
129 |
|
130 <p> |
|
131 Private slot to (re)initialize the plugin. |
|
132 </p> |
|
133 <a NAME="TranslatorPlugin.activate" ID="TranslatorPlugin.activate"></a> |
|
134 <h4>TranslatorPlugin.activate</h4> |
|
135 <b>activate</b>(<i></i>) |
|
136 |
|
137 <p> |
|
138 Public method to activate this plugin. |
|
139 </p> |
|
140 <dl> |
|
141 <dt>Return:</dt> |
|
142 <dd> |
|
143 tuple of None and activation status |
|
144 </dd> |
|
145 </dl> |
|
146 <dl> |
|
147 <dt>Return Type:</dt> |
|
148 <dd> |
|
149 tuple of (None, bool) |
|
150 </dd> |
|
151 </dl> |
|
152 <a NAME="TranslatorPlugin.deactivate" ID="TranslatorPlugin.deactivate"></a> |
|
153 <h4>TranslatorPlugin.deactivate</h4> |
|
154 <b>deactivate</b>(<i></i>) |
|
155 |
|
156 <p> |
|
157 Public method to deactivate this plugin. |
|
158 </p> |
|
159 <a NAME="TranslatorPlugin.getPreferences" ID="TranslatorPlugin.getPreferences"></a> |
|
160 <h4>TranslatorPlugin.getPreferences</h4> |
|
161 <b>getPreferences</b>(<i>key</i>) |
|
162 |
|
163 <p> |
|
164 Public method to retrieve the various settings. |
|
165 </p> |
|
166 <dl> |
|
167 |
|
168 <dt><i>key</i> (str)</dt> |
|
169 <dd> |
|
170 the key of the value to get |
|
171 </dd> |
|
172 </dl> |
|
173 <dl> |
|
174 <dt>Return:</dt> |
|
175 <dd> |
|
176 the requested setting |
|
177 </dd> |
|
178 </dl> |
|
179 <dl> |
|
180 <dt>Return Type:</dt> |
|
181 <dd> |
|
182 any |
|
183 </dd> |
|
184 </dl> |
|
185 <a NAME="TranslatorPlugin.getPreferencesDefault" ID="TranslatorPlugin.getPreferencesDefault"></a> |
|
186 <h4>TranslatorPlugin.getPreferencesDefault</h4> |
|
187 <b>getPreferencesDefault</b>(<i>key</i>) |
|
188 |
|
189 <p> |
|
190 Public method to retrieve the various default settings. |
|
191 </p> |
|
192 <dl> |
|
193 |
|
194 <dt><i>key</i> (str)</dt> |
|
195 <dd> |
|
196 the key of the value to get |
|
197 </dd> |
|
198 </dl> |
|
199 <dl> |
|
200 <dt>Return:</dt> |
|
201 <dd> |
|
202 the requested setting |
|
203 </dd> |
|
204 </dl> |
|
205 <dl> |
|
206 <dt>Return Type:</dt> |
|
207 <dd> |
|
208 any |
|
209 </dd> |
|
210 </dl> |
|
211 <a NAME="TranslatorPlugin.setPreferences" ID="TranslatorPlugin.setPreferences"></a> |
|
212 <h4>TranslatorPlugin.setPreferences</h4> |
|
213 <b>setPreferences</b>(<i>key, value</i>) |
|
214 |
|
215 <p> |
|
216 Public method to store the various settings. |
|
217 </p> |
|
218 <dl> |
|
219 |
|
220 <dt><i>key</i> (str)</dt> |
|
221 <dd> |
|
222 the key of the setting to be set |
|
223 </dd> |
|
224 <dt><i>value</i> (any)</dt> |
|
225 <dd> |
|
226 the value to be set |
|
227 </dd> |
|
228 </dl> |
|
229 <div align="right"><a href="#top">Up</a></div> |
|
230 <hr /> |
|
231 <hr /> |
|
232 <a NAME="createTranslatorPage" ID="createTranslatorPage"></a> |
|
233 <h2>createTranslatorPage</h2> |
|
234 <b>createTranslatorPage</b>(<i>configDlg</i>) |
|
235 |
|
236 <p> |
|
237 Module function to create the Translator configuration page. |
|
238 </p> |
|
239 <dl> |
|
240 |
|
241 <dt><i>configDlg</i> (ConfigurationWidget)</dt> |
|
242 <dd> |
|
243 reference to the configuration dialog |
|
244 </dd> |
|
245 </dl> |
|
246 <dl> |
|
247 <dt>Return:</dt> |
|
248 <dd> |
|
249 reference to the configuration page |
|
250 </dd> |
|
251 </dl> |
|
252 <dl> |
|
253 <dt>Return Type:</dt> |
|
254 <dd> |
|
255 TranslatorPage |
|
256 </dd> |
|
257 </dl> |
|
258 <div align="right"><a href="#top">Up</a></div> |
|
259 <hr /> |
|
260 <hr /> |
|
261 <a NAME="getConfigData" ID="getConfigData"></a> |
|
262 <h2>getConfigData</h2> |
|
263 <b>getConfigData</b>(<i></i>) |
|
264 |
|
265 <p> |
|
266 Module function returning data as required by the configuration dialog. |
|
267 </p> |
|
268 <dl> |
|
269 <dt>Return:</dt> |
|
270 <dd> |
|
271 dictionary containing the relevant data |
|
272 </dd> |
|
273 </dl> |
|
274 <dl> |
|
275 <dt>Return Type:</dt> |
|
276 <dd> |
|
277 dict |
|
278 </dd> |
|
279 </dl> |
|
280 <div align="right"><a href="#top">Up</a></div> |
|
281 <hr /> |
|
282 <hr /> |
|
283 <a NAME="prepareUninstall" ID="prepareUninstall"></a> |
|
284 <h2>prepareUninstall</h2> |
|
285 <b>prepareUninstall</b>(<i></i>) |
|
286 |
|
287 <p> |
|
288 Module function to prepare for an uninstallation. |
|
289 </p> |
|
290 <div align="right"><a href="#top">Up</a></div> |
|
291 <hr /> |
|
292 </body></html> |