src/eric7/Documentation/Source/eric7.WebBrowser.GreaseMonkey.GreaseMonkeyManager.html

branch
eric7
changeset 9209
b99e7fd55fd3
parent 8596
d64760b2da50
child 9503
ae9232bf4854
equal deleted inserted replaced
9208:3fc8dfeb6ebe 9209:b99e7fd55fd3
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.WebBrowser.GreaseMonkey.GreaseMonkeyManager</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.GreaseMonkey.GreaseMonkeyManager</h1>
10
11 <p>
12 Module implementing the manager for GreaseMonkey scripts.
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="#GreaseMonkeyManager">GreaseMonkeyManager</a></td>
25 <td>Class implementing the manager for GreaseMonkey scripts.</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="GreaseMonkeyManager" ID="GreaseMonkeyManager"></a>
36 <h2>GreaseMonkeyManager</h2>
37
38 <p>
39 Class implementing the manager for GreaseMonkey scripts.
40 </p>
41 <h3>Signals</h3>
42 <dl>
43
44 <dt>scriptsChanged()</dt>
45 <dd>
46 emitted to indicate a change of scripts
47 </dd>
48 </dl>
49 <h3>Derived from</h3>
50 QObject
51 <h3>Class Attributes</h3>
52
53 <table>
54 <tr><td>None</td></tr>
55 </table>
56 <h3>Class Methods</h3>
57
58 <table>
59 <tr><td>None</td></tr>
60 </table>
61 <h3>Methods</h3>
62
63 <table>
64
65 <tr>
66 <td><a href="#GreaseMonkeyManager.__init__">GreaseMonkeyManager</a></td>
67 <td>Constructor</td>
68 </tr>
69 <tr>
70 <td><a href="#GreaseMonkeyManager.__downloaderFinished">__downloaderFinished</a></td>
71 <td>Private slot to handle the completion of a script download.</td>
72 </tr>
73 <tr>
74 <td><a href="#GreaseMonkeyManager.__load">__load</a></td>
75 <td>Private slot to load the available scripts into the manager.</td>
76 </tr>
77 <tr>
78 <td><a href="#GreaseMonkeyManager.__scriptChanged">__scriptChanged</a></td>
79 <td>Private slot handling a changed script.</td>
80 </tr>
81 <tr>
82 <td><a href="#GreaseMonkeyManager.addScript">addScript</a></td>
83 <td>Public method to add a script.</td>
84 </tr>
85 <tr>
86 <td><a href="#GreaseMonkeyManager.allScripts">allScripts</a></td>
87 <td>Public method to get a list of all scripts.</td>
88 </tr>
89 <tr>
90 <td><a href="#GreaseMonkeyManager.canRunOnScheme">canRunOnScheme</a></td>
91 <td>Public method to check, if scripts can be run on a scheme.</td>
92 </tr>
93 <tr>
94 <td><a href="#GreaseMonkeyManager.containsScript">containsScript</a></td>
95 <td>Public method to check, if the given script exists.</td>
96 </tr>
97 <tr>
98 <td><a href="#GreaseMonkeyManager.disableScript">disableScript</a></td>
99 <td>Public method to disable the given script.</td>
100 </tr>
101 <tr>
102 <td><a href="#GreaseMonkeyManager.doDownloadScript">doDownloadScript</a></td>
103 <td>Public slot to download a GreaseMonkey script.</td>
104 </tr>
105 <tr>
106 <td><a href="#GreaseMonkeyManager.downloadScript">downloadScript</a></td>
107 <td>Public method to download a GreaseMonkey script.</td>
108 </tr>
109 <tr>
110 <td><a href="#GreaseMonkeyManager.enableScript">enableScript</a></td>
111 <td>Public method to enable the given script.</td>
112 </tr>
113 <tr>
114 <td><a href="#GreaseMonkeyManager.removeScript">removeScript</a></td>
115 <td>Public method to remove a script.</td>
116 </tr>
117 <tr>
118 <td><a href="#GreaseMonkeyManager.requireScripts">requireScripts</a></td>
119 <td>Public method to get the sources of all required scripts.</td>
120 </tr>
121 <tr>
122 <td><a href="#GreaseMonkeyManager.requireScriptsDirectory">requireScriptsDirectory</a></td>
123 <td>Public method to get the path of the scripts directory.</td>
124 </tr>
125 <tr>
126 <td><a href="#GreaseMonkeyManager.saveConfiguration">saveConfiguration</a></td>
127 <td>Public method to save the configuration.</td>
128 </tr>
129 <tr>
130 <td><a href="#GreaseMonkeyManager.scriptsDirectory">scriptsDirectory</a></td>
131 <td>Public method to get the path of the scripts directory.</td>
132 </tr>
133 <tr>
134 <td><a href="#GreaseMonkeyManager.showConfigurationDialog">showConfigurationDialog</a></td>
135 <td>Public method to show the configuration dialog.</td>
136 </tr>
137 </table>
138 <h3>Static Methods</h3>
139
140 <table>
141 <tr><td>None</td></tr>
142 </table>
143
144 <a NAME="GreaseMonkeyManager.__init__" ID="GreaseMonkeyManager.__init__"></a>
145 <h4>GreaseMonkeyManager (Constructor)</h4>
146 <b>GreaseMonkeyManager</b>(<i>parent=None</i>)
147
148 <p>
149 Constructor
150 </p>
151 <dl>
152
153 <dt><i>parent</i></dt>
154 <dd>
155 reference to the parent object (QObject)
156 </dd>
157 </dl>
158 <a NAME="GreaseMonkeyManager.__downloaderFinished" ID="GreaseMonkeyManager.__downloaderFinished"></a>
159 <h4>GreaseMonkeyManager.__downloaderFinished</h4>
160 <b>__downloaderFinished</b>(<i>fileName, downloader</i>)
161
162 <p>
163 Private slot to handle the completion of a script download.
164 </p>
165 <dl>
166
167 <dt><i>fileName</i> (str)</dt>
168 <dd>
169 name of the downloaded script
170 </dd>
171 <dt><i>downloader</i> (GreaseMonkeyDownloader)</dt>
172 <dd>
173 reference to the downloader object
174 </dd>
175 </dl>
176 <a NAME="GreaseMonkeyManager.__load" ID="GreaseMonkeyManager.__load"></a>
177 <h4>GreaseMonkeyManager.__load</h4>
178 <b>__load</b>(<i></i>)
179
180 <p>
181 Private slot to load the available scripts into the manager.
182 </p>
183 <a NAME="GreaseMonkeyManager.__scriptChanged" ID="GreaseMonkeyManager.__scriptChanged"></a>
184 <h4>GreaseMonkeyManager.__scriptChanged</h4>
185 <b>__scriptChanged</b>(<i>script</i>)
186
187 <p>
188 Private slot handling a changed script.
189 </p>
190 <dl>
191
192 <dt><i>script</i> (GreaseMonkeyScript)</dt>
193 <dd>
194 reference to the changed script
195 </dd>
196 </dl>
197 <a NAME="GreaseMonkeyManager.addScript" ID="GreaseMonkeyManager.addScript"></a>
198 <h4>GreaseMonkeyManager.addScript</h4>
199 <b>addScript</b>(<i>script</i>)
200
201 <p>
202 Public method to add a script.
203 </p>
204 <dl>
205
206 <dt><i>script</i></dt>
207 <dd>
208 script to be added (GreaseMonkeyScript)
209 </dd>
210 </dl>
211 <dl>
212 <dt>Return:</dt>
213 <dd>
214 flag indicating success (boolean)
215 </dd>
216 </dl>
217 <a NAME="GreaseMonkeyManager.allScripts" ID="GreaseMonkeyManager.allScripts"></a>
218 <h4>GreaseMonkeyManager.allScripts</h4>
219 <b>allScripts</b>(<i></i>)
220
221 <p>
222 Public method to get a list of all scripts.
223 </p>
224 <dl>
225 <dt>Return:</dt>
226 <dd>
227 list of all scripts (list of GreaseMonkeyScript)
228 </dd>
229 </dl>
230 <a NAME="GreaseMonkeyManager.canRunOnScheme" ID="GreaseMonkeyManager.canRunOnScheme"></a>
231 <h4>GreaseMonkeyManager.canRunOnScheme</h4>
232 <b>canRunOnScheme</b>(<i>scheme</i>)
233
234 <p>
235 Public method to check, if scripts can be run on a scheme.
236 </p>
237 <dl>
238
239 <dt><i>scheme</i></dt>
240 <dd>
241 scheme to check (string)
242 </dd>
243 </dl>
244 <dl>
245 <dt>Return:</dt>
246 <dd>
247 flag indicating, that scripts can be run (boolean)
248 </dd>
249 </dl>
250 <a NAME="GreaseMonkeyManager.containsScript" ID="GreaseMonkeyManager.containsScript"></a>
251 <h4>GreaseMonkeyManager.containsScript</h4>
252 <b>containsScript</b>(<i>fullName</i>)
253
254 <p>
255 Public method to check, if the given script exists.
256 </p>
257 <dl>
258
259 <dt><i>fullName</i></dt>
260 <dd>
261 full name of the script (string)
262 </dd>
263 </dl>
264 <dl>
265 <dt>Return:</dt>
266 <dd>
267 flag indicating the existence (boolean)
268 </dd>
269 </dl>
270 <a NAME="GreaseMonkeyManager.disableScript" ID="GreaseMonkeyManager.disableScript"></a>
271 <h4>GreaseMonkeyManager.disableScript</h4>
272 <b>disableScript</b>(<i>script</i>)
273
274 <p>
275 Public method to disable the given script.
276 </p>
277 <dl>
278
279 <dt><i>script</i></dt>
280 <dd>
281 script to be disabled (GreaseMonkeyScript)
282 </dd>
283 </dl>
284 <a NAME="GreaseMonkeyManager.doDownloadScript" ID="GreaseMonkeyManager.doDownloadScript"></a>
285 <h4>GreaseMonkeyManager.doDownloadScript</h4>
286 <b>doDownloadScript</b>(<i>url</i>)
287
288 <p>
289 Public slot to download a GreaseMonkey script.
290 </p>
291 <p>
292 Note: The download needed to be separated in the invoking part
293 (s.a.) and the one doing the real download because the invoking
294 part runs in a different thread (i.e. the web engine thread).
295 </p>
296 <dl>
297
298 <dt><i>url</i> (QUrl)</dt>
299 <dd>
300 URL to download script from
301 </dd>
302 </dl>
303 <a NAME="GreaseMonkeyManager.downloadScript" ID="GreaseMonkeyManager.downloadScript"></a>
304 <h4>GreaseMonkeyManager.downloadScript</h4>
305 <b>downloadScript</b>(<i>url</i>)
306
307 <p>
308 Public method to download a GreaseMonkey script.
309 </p>
310 <dl>
311
312 <dt><i>url</i> (QUrl)</dt>
313 <dd>
314 URL to download script from
315 </dd>
316 </dl>
317 <a NAME="GreaseMonkeyManager.enableScript" ID="GreaseMonkeyManager.enableScript"></a>
318 <h4>GreaseMonkeyManager.enableScript</h4>
319 <b>enableScript</b>(<i>script</i>)
320
321 <p>
322 Public method to enable the given script.
323 </p>
324 <dl>
325
326 <dt><i>script</i></dt>
327 <dd>
328 script to be enabled (GreaseMonkeyScript)
329 </dd>
330 </dl>
331 <a NAME="GreaseMonkeyManager.removeScript" ID="GreaseMonkeyManager.removeScript"></a>
332 <h4>GreaseMonkeyManager.removeScript</h4>
333 <b>removeScript</b>(<i>script, removeFile=True</i>)
334
335 <p>
336 Public method to remove a script.
337 </p>
338 <dl>
339
340 <dt><i>script</i></dt>
341 <dd>
342 script to be removed (GreaseMonkeyScript)
343 </dd>
344 <dt><i>removeFile</i></dt>
345 <dd>
346 flag indicating to remove the script file as well
347 (bool)
348 </dd>
349 </dl>
350 <dl>
351 <dt>Return:</dt>
352 <dd>
353 flag indicating success (boolean)
354 </dd>
355 </dl>
356 <a NAME="GreaseMonkeyManager.requireScripts" ID="GreaseMonkeyManager.requireScripts"></a>
357 <h4>GreaseMonkeyManager.requireScripts</h4>
358 <b>requireScripts</b>(<i>urlList</i>)
359
360 <p>
361 Public method to get the sources of all required scripts.
362 </p>
363 <dl>
364
365 <dt><i>urlList</i></dt>
366 <dd>
367 list of URLs (list of string)
368 </dd>
369 </dl>
370 <dl>
371 <dt>Return:</dt>
372 <dd>
373 sources of all required scripts (string)
374 </dd>
375 </dl>
376 <a NAME="GreaseMonkeyManager.requireScriptsDirectory" ID="GreaseMonkeyManager.requireScriptsDirectory"></a>
377 <h4>GreaseMonkeyManager.requireScriptsDirectory</h4>
378 <b>requireScriptsDirectory</b>(<i></i>)
379
380 <p>
381 Public method to get the path of the scripts directory.
382 </p>
383 <dl>
384 <dt>Return:</dt>
385 <dd>
386 path of the scripts directory (string)
387 </dd>
388 </dl>
389 <a NAME="GreaseMonkeyManager.saveConfiguration" ID="GreaseMonkeyManager.saveConfiguration"></a>
390 <h4>GreaseMonkeyManager.saveConfiguration</h4>
391 <b>saveConfiguration</b>(<i></i>)
392
393 <p>
394 Public method to save the configuration.
395 </p>
396 <a NAME="GreaseMonkeyManager.scriptsDirectory" ID="GreaseMonkeyManager.scriptsDirectory"></a>
397 <h4>GreaseMonkeyManager.scriptsDirectory</h4>
398 <b>scriptsDirectory</b>(<i></i>)
399
400 <p>
401 Public method to get the path of the scripts directory.
402 </p>
403 <dl>
404 <dt>Return:</dt>
405 <dd>
406 path of the scripts directory (string)
407 </dd>
408 </dl>
409 <a NAME="GreaseMonkeyManager.showConfigurationDialog" ID="GreaseMonkeyManager.showConfigurationDialog"></a>
410 <h4>GreaseMonkeyManager.showConfigurationDialog</h4>
411 <b>showConfigurationDialog</b>(<i>parent=None</i>)
412
413 <p>
414 Public method to show the configuration dialog.
415 </p>
416 <dl>
417
418 <dt><i>parent</i></dt>
419 <dd>
420 reference to the parent widget (QWidget)
421 </dd>
422 </dl>
423 <div align="right"><a href="#top">Up</a></div>
424 <hr />
425 </body></html>

eric ide

mercurial