|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.Helpviewer.GreaseMonkey.GreaseMonkeyManager</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><a NAME="top" ID="top"></a> |
|
22 <h1>eric6.Helpviewer.GreaseMonkey.GreaseMonkeyManager</h1> |
|
23 <p> |
|
24 Module implementing the manager for GreaseMonkey scripts. |
|
25 </p> |
|
26 <h3>Global Attributes</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <h3>Classes</h3> |
|
31 <table> |
|
32 <tr> |
|
33 <td><a href="#GreaseMonkeyManager">GreaseMonkeyManager</a></td> |
|
34 <td>Class implementing the manager for GreaseMonkey scripts.</td> |
|
35 </tr> |
|
36 </table> |
|
37 <h3>Functions</h3> |
|
38 <table> |
|
39 <tr><td>None</td></tr> |
|
40 </table> |
|
41 <hr /><hr /> |
|
42 <a NAME="GreaseMonkeyManager" ID="GreaseMonkeyManager"></a> |
|
43 <h2>GreaseMonkeyManager</h2> |
|
44 <p> |
|
45 Class implementing the manager for GreaseMonkey scripts. |
|
46 </p><h3>Signals</h3> |
|
47 <dl> |
|
48 <dt>scriptsChanged()</dt> |
|
49 <dd> |
|
50 emitted to indicate a change of scripts |
|
51 </dd> |
|
52 </dl> |
|
53 <h3>Derived from</h3> |
|
54 QObject |
|
55 <h3>Class Attributes</h3> |
|
56 <table> |
|
57 <tr><td>None</td></tr> |
|
58 </table> |
|
59 <h3>Class Methods</h3> |
|
60 <table> |
|
61 <tr><td>None</td></tr> |
|
62 </table> |
|
63 <h3>Methods</h3> |
|
64 <table> |
|
65 <tr> |
|
66 <td><a href="#GreaseMonkeyManager.__init__">GreaseMonkeyManager</a></td> |
|
67 <td>Constructor</td> |
|
68 </tr><tr> |
|
69 <td><a href="#GreaseMonkeyManager.__downloaderFinished">__downloaderFinished</a></td> |
|
70 <td>Private slot to handle the completion of a script download.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#GreaseMonkeyManager.__load">__load</a></td> |
|
73 <td>Private slot to load the available scripts into the manager.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#GreaseMonkeyManager.addScript">addScript</a></td> |
|
76 <td>Public method to add a script.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#GreaseMonkeyManager.allScripts">allScripts</a></td> |
|
79 <td>Public method to get a list of all scripts.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#GreaseMonkeyManager.canRunOnScheme">canRunOnScheme</a></td> |
|
82 <td>Public method to check, if scripts can be run on a scheme.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#GreaseMonkeyManager.connectPage">connectPage</a></td> |
|
85 <td>Public method to allow the GreaseMonkey manager to connect to the page.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#GreaseMonkeyManager.containsScript">containsScript</a></td> |
|
88 <td>Public method to check, if the given script exists.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#GreaseMonkeyManager.createRequest">createRequest</a></td> |
|
91 <td>Public method to create a request.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#GreaseMonkeyManager.disableScript">disableScript</a></td> |
|
94 <td>Public method to disable the given script.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#GreaseMonkeyManager.downloadScript">downloadScript</a></td> |
|
97 <td>Public method to download a GreaseMonkey script.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#GreaseMonkeyManager.enableScript">enableScript</a></td> |
|
100 <td>Public method to enable the given script.</td> |
|
101 </tr><tr> |
|
102 <td><a href="#GreaseMonkeyManager.pageLoadStarted">pageLoadStarted</a></td> |
|
103 <td>Public slot to handle the start of loading a page.</td> |
|
104 </tr><tr> |
|
105 <td><a href="#GreaseMonkeyManager.removeScript">removeScript</a></td> |
|
106 <td>Public method to remove a script.</td> |
|
107 </tr><tr> |
|
108 <td><a href="#GreaseMonkeyManager.requireScripts">requireScripts</a></td> |
|
109 <td>Public method to get the sources of all required scripts.</td> |
|
110 </tr><tr> |
|
111 <td><a href="#GreaseMonkeyManager.requireScriptsDirectory">requireScriptsDirectory</a></td> |
|
112 <td>Public method to get the path of the scripts directory.</td> |
|
113 </tr><tr> |
|
114 <td><a href="#GreaseMonkeyManager.saveConfiguration">saveConfiguration</a></td> |
|
115 <td>Public method to save the configuration.</td> |
|
116 </tr><tr> |
|
117 <td><a href="#GreaseMonkeyManager.scriptsDirectory">scriptsDirectory</a></td> |
|
118 <td>Public method to get the path of the scripts directory.</td> |
|
119 </tr><tr> |
|
120 <td><a href="#GreaseMonkeyManager.showConfigurationDialog">showConfigurationDialog</a></td> |
|
121 <td>Public method to show the configuration dialog.</td> |
|
122 </tr> |
|
123 </table> |
|
124 <h3>Static Methods</h3> |
|
125 <table> |
|
126 <tr><td>None</td></tr> |
|
127 </table> |
|
128 <a NAME="GreaseMonkeyManager.__init__" ID="GreaseMonkeyManager.__init__"></a> |
|
129 <h4>GreaseMonkeyManager (Constructor)</h4> |
|
130 <b>GreaseMonkeyManager</b>(<i>parent=None</i>) |
|
131 <p> |
|
132 Constructor |
|
133 </p><dl> |
|
134 <dt><i>parent</i></dt> |
|
135 <dd> |
|
136 reference to the parent object (QObject) |
|
137 </dd> |
|
138 </dl><a NAME="GreaseMonkeyManager.__downloaderFinished" ID="GreaseMonkeyManager.__downloaderFinished"></a> |
|
139 <h4>GreaseMonkeyManager.__downloaderFinished</h4> |
|
140 <b>__downloaderFinished</b>(<i>downloader</i>) |
|
141 <p> |
|
142 Private slot to handle the completion of a script download. |
|
143 </p><dl> |
|
144 <dt><i>downloader</i> (GreaseMonkeyDownloader)</dt> |
|
145 <dd> |
|
146 reference to the downloader object |
|
147 </dd> |
|
148 </dl><a NAME="GreaseMonkeyManager.__load" ID="GreaseMonkeyManager.__load"></a> |
|
149 <h4>GreaseMonkeyManager.__load</h4> |
|
150 <b>__load</b>(<i></i>) |
|
151 <p> |
|
152 Private slot to load the available scripts into the manager. |
|
153 </p><a NAME="GreaseMonkeyManager.addScript" ID="GreaseMonkeyManager.addScript"></a> |
|
154 <h4>GreaseMonkeyManager.addScript</h4> |
|
155 <b>addScript</b>(<i>script</i>) |
|
156 <p> |
|
157 Public method to add a script. |
|
158 </p><dl> |
|
159 <dt><i>script</i></dt> |
|
160 <dd> |
|
161 script to be added (GreaseMonkeyScript) |
|
162 </dd> |
|
163 </dl><dl> |
|
164 <dt>Returns:</dt> |
|
165 <dd> |
|
166 flag indicating success (boolean) |
|
167 </dd> |
|
168 </dl><a NAME="GreaseMonkeyManager.allScripts" ID="GreaseMonkeyManager.allScripts"></a> |
|
169 <h4>GreaseMonkeyManager.allScripts</h4> |
|
170 <b>allScripts</b>(<i></i>) |
|
171 <p> |
|
172 Public method to get a list of all scripts. |
|
173 </p><dl> |
|
174 <dt>Returns:</dt> |
|
175 <dd> |
|
176 list of all scripts (list of GreaseMonkeyScript) |
|
177 </dd> |
|
178 </dl><a NAME="GreaseMonkeyManager.canRunOnScheme" ID="GreaseMonkeyManager.canRunOnScheme"></a> |
|
179 <h4>GreaseMonkeyManager.canRunOnScheme</h4> |
|
180 <b>canRunOnScheme</b>(<i>scheme</i>) |
|
181 <p> |
|
182 Public method to check, if scripts can be run on a scheme. |
|
183 </p><dl> |
|
184 <dt><i>scheme</i></dt> |
|
185 <dd> |
|
186 scheme to check (string) |
|
187 </dd> |
|
188 </dl><dl> |
|
189 <dt>Returns:</dt> |
|
190 <dd> |
|
191 flag indicating, that scripts can be run (boolean) |
|
192 </dd> |
|
193 </dl><a NAME="GreaseMonkeyManager.connectPage" ID="GreaseMonkeyManager.connectPage"></a> |
|
194 <h4>GreaseMonkeyManager.connectPage</h4> |
|
195 <b>connectPage</b>(<i>page</i>) |
|
196 <p> |
|
197 Public method to allow the GreaseMonkey manager to connect to the page. |
|
198 </p><dl> |
|
199 <dt><i>page</i></dt> |
|
200 <dd> |
|
201 reference to the web page (HelpWebPage) |
|
202 </dd> |
|
203 </dl><a NAME="GreaseMonkeyManager.containsScript" ID="GreaseMonkeyManager.containsScript"></a> |
|
204 <h4>GreaseMonkeyManager.containsScript</h4> |
|
205 <b>containsScript</b>(<i>fullName</i>) |
|
206 <p> |
|
207 Public method to check, if the given script exists. |
|
208 </p><dl> |
|
209 <dt><i>fullName</i></dt> |
|
210 <dd> |
|
211 full name of the script (string) |
|
212 </dd> |
|
213 </dl><dl> |
|
214 <dt>Returns:</dt> |
|
215 <dd> |
|
216 flag indicating the existence (boolean) |
|
217 </dd> |
|
218 </dl><a NAME="GreaseMonkeyManager.createRequest" ID="GreaseMonkeyManager.createRequest"></a> |
|
219 <h4>GreaseMonkeyManager.createRequest</h4> |
|
220 <b>createRequest</b>(<i>op, request, outgoingData=None</i>) |
|
221 <p> |
|
222 Public method to create a request. |
|
223 </p><dl> |
|
224 <dt><i>op</i></dt> |
|
225 <dd> |
|
226 the operation to be performed |
|
227 (QNetworkAccessManager.Operation) |
|
228 </dd><dt><i>request</i></dt> |
|
229 <dd> |
|
230 reference to the request object (QNetworkRequest) |
|
231 </dd><dt><i>outgoingData</i></dt> |
|
232 <dd> |
|
233 reference to an IODevice containing data to be sent |
|
234 (QIODevice) |
|
235 </dd> |
|
236 </dl><dl> |
|
237 <dt>Returns:</dt> |
|
238 <dd> |
|
239 reference to the created reply object (QNetworkReply) |
|
240 </dd> |
|
241 </dl><a NAME="GreaseMonkeyManager.disableScript" ID="GreaseMonkeyManager.disableScript"></a> |
|
242 <h4>GreaseMonkeyManager.disableScript</h4> |
|
243 <b>disableScript</b>(<i>script</i>) |
|
244 <p> |
|
245 Public method to disable the given script. |
|
246 </p><dl> |
|
247 <dt><i>script</i></dt> |
|
248 <dd> |
|
249 script to be disabled (GreaseMonkeyScript) |
|
250 </dd> |
|
251 </dl><a NAME="GreaseMonkeyManager.downloadScript" ID="GreaseMonkeyManager.downloadScript"></a> |
|
252 <h4>GreaseMonkeyManager.downloadScript</h4> |
|
253 <b>downloadScript</b>(<i>request</i>) |
|
254 <p> |
|
255 Public method to download a GreaseMonkey script. |
|
256 </p><dl> |
|
257 <dt><i>request</i></dt> |
|
258 <dd> |
|
259 reference to the request (QNetworkRequest) |
|
260 </dd> |
|
261 </dl><a NAME="GreaseMonkeyManager.enableScript" ID="GreaseMonkeyManager.enableScript"></a> |
|
262 <h4>GreaseMonkeyManager.enableScript</h4> |
|
263 <b>enableScript</b>(<i>script</i>) |
|
264 <p> |
|
265 Public method to enable the given script. |
|
266 </p><dl> |
|
267 <dt><i>script</i></dt> |
|
268 <dd> |
|
269 script to be enabled (GreaseMonkeyScript) |
|
270 </dd> |
|
271 </dl><a NAME="GreaseMonkeyManager.pageLoadStarted" ID="GreaseMonkeyManager.pageLoadStarted"></a> |
|
272 <h4>GreaseMonkeyManager.pageLoadStarted</h4> |
|
273 <b>pageLoadStarted</b>(<i></i>) |
|
274 <p> |
|
275 Public slot to handle the start of loading a page. |
|
276 </p><a NAME="GreaseMonkeyManager.removeScript" ID="GreaseMonkeyManager.removeScript"></a> |
|
277 <h4>GreaseMonkeyManager.removeScript</h4> |
|
278 <b>removeScript</b>(<i>script</i>) |
|
279 <p> |
|
280 Public method to remove a script. |
|
281 </p><dl> |
|
282 <dt><i>script</i></dt> |
|
283 <dd> |
|
284 script to be removed (GreaseMonkeyScript) |
|
285 </dd> |
|
286 </dl><dl> |
|
287 <dt>Returns:</dt> |
|
288 <dd> |
|
289 flag indicating success (boolean) |
|
290 </dd> |
|
291 </dl><a NAME="GreaseMonkeyManager.requireScripts" ID="GreaseMonkeyManager.requireScripts"></a> |
|
292 <h4>GreaseMonkeyManager.requireScripts</h4> |
|
293 <b>requireScripts</b>(<i>urlList</i>) |
|
294 <p> |
|
295 Public method to get the sources of all required scripts. |
|
296 </p><dl> |
|
297 <dt><i>urlList</i></dt> |
|
298 <dd> |
|
299 list of URLs (list of string) |
|
300 </dd> |
|
301 </dl><dl> |
|
302 <dt>Returns:</dt> |
|
303 <dd> |
|
304 sources of all required scripts (string) |
|
305 </dd> |
|
306 </dl><a NAME="GreaseMonkeyManager.requireScriptsDirectory" ID="GreaseMonkeyManager.requireScriptsDirectory"></a> |
|
307 <h4>GreaseMonkeyManager.requireScriptsDirectory</h4> |
|
308 <b>requireScriptsDirectory</b>(<i></i>) |
|
309 <p> |
|
310 Public method to get the path of the scripts directory. |
|
311 </p><dl> |
|
312 <dt>Returns:</dt> |
|
313 <dd> |
|
314 path of the scripts directory (string) |
|
315 </dd> |
|
316 </dl><a NAME="GreaseMonkeyManager.saveConfiguration" ID="GreaseMonkeyManager.saveConfiguration"></a> |
|
317 <h4>GreaseMonkeyManager.saveConfiguration</h4> |
|
318 <b>saveConfiguration</b>(<i></i>) |
|
319 <p> |
|
320 Public method to save the configuration. |
|
321 </p><a NAME="GreaseMonkeyManager.scriptsDirectory" ID="GreaseMonkeyManager.scriptsDirectory"></a> |
|
322 <h4>GreaseMonkeyManager.scriptsDirectory</h4> |
|
323 <b>scriptsDirectory</b>(<i></i>) |
|
324 <p> |
|
325 Public method to get the path of the scripts directory. |
|
326 </p><dl> |
|
327 <dt>Returns:</dt> |
|
328 <dd> |
|
329 path of the scripts directory (string) |
|
330 </dd> |
|
331 </dl><a NAME="GreaseMonkeyManager.showConfigurationDialog" ID="GreaseMonkeyManager.showConfigurationDialog"></a> |
|
332 <h4>GreaseMonkeyManager.showConfigurationDialog</h4> |
|
333 <b>showConfigurationDialog</b>(<i>parent=None</i>) |
|
334 <p> |
|
335 Public method to show the configuration dialog. |
|
336 </p><dl> |
|
337 <dt><i>parent</i></dt> |
|
338 <dd> |
|
339 reference to the parent widget (QWidget) |
|
340 </dd> |
|
341 </dl> |
|
342 <div align="right"><a href="#top">Up</a></div> |
|
343 <hr /> |
|
344 </body></html> |