Documentation/Source/eric5.Helpviewer.GreaseMonkey.GreaseMonkeyManager.html

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

eric ide

mercurial