Documentation/Source/eric6.WebBrowser.GreaseMonkey.GreaseMonkeyManager.html

changeset 4918
71caf42a13d8
child 5715
cbcca230679f
equal deleted inserted replaced
4917:682750cc7bd5 4918:71caf42a13d8
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.WebBrowser.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.WebBrowser.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>
47 <h3>Derived from</h3>
48 QObject
49 <h3>Class Attributes</h3>
50 <table>
51 <tr><td>None</td></tr>
52 </table>
53 <h3>Class Methods</h3>
54 <table>
55 <tr><td>None</td></tr>
56 </table>
57 <h3>Methods</h3>
58 <table>
59 <tr>
60 <td><a href="#GreaseMonkeyManager.__init__">GreaseMonkeyManager</a></td>
61 <td>Constructor</td>
62 </tr><tr>
63 <td><a href="#GreaseMonkeyManager.__del__">__del__</a></td>
64 <td>Special method called during object destruction.</td>
65 </tr><tr>
66 <td><a href="#GreaseMonkeyManager.__downloaderFinished">__downloaderFinished</a></td>
67 <td>Private slot to handle the completion of a script download.</td>
68 </tr><tr>
69 <td><a href="#GreaseMonkeyManager.__load">__load</a></td>
70 <td>Private slot to load the available scripts into the manager.</td>
71 </tr><tr>
72 <td><a href="#GreaseMonkeyManager.__scriptChanged">__scriptChanged</a></td>
73 <td>Private slot handling a changed script.</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.containsScript">containsScript</a></td>
85 <td>Public method to check, if the given script exists.</td>
86 </tr><tr>
87 <td><a href="#GreaseMonkeyManager.disableScript">disableScript</a></td>
88 <td>Public method to disable the given script.</td>
89 </tr><tr>
90 <td><a href="#GreaseMonkeyManager.doDownloadScript">doDownloadScript</a></td>
91 <td>Public slot to download a GreaseMonkey script.</td>
92 </tr><tr>
93 <td><a href="#GreaseMonkeyManager.downloadScript">downloadScript</a></td>
94 <td>Public method to download a GreaseMonkey script.</td>
95 </tr><tr>
96 <td><a href="#GreaseMonkeyManager.enableScript">enableScript</a></td>
97 <td>Public method to enable the given script.</td>
98 </tr><tr>
99 <td><a href="#GreaseMonkeyManager.removeScript">removeScript</a></td>
100 <td>Public method to remove a script.</td>
101 </tr><tr>
102 <td><a href="#GreaseMonkeyManager.requireScripts">requireScripts</a></td>
103 <td>Public method to get the sources of all required scripts.</td>
104 </tr><tr>
105 <td><a href="#GreaseMonkeyManager.requireScriptsDirectory">requireScriptsDirectory</a></td>
106 <td>Public method to get the path of the scripts directory.</td>
107 </tr><tr>
108 <td><a href="#GreaseMonkeyManager.saveConfiguration">saveConfiguration</a></td>
109 <td>Public method to save the configuration.</td>
110 </tr><tr>
111 <td><a href="#GreaseMonkeyManager.scriptsDirectory">scriptsDirectory</a></td>
112 <td>Public method to get the path of the scripts directory.</td>
113 </tr><tr>
114 <td><a href="#GreaseMonkeyManager.showConfigurationDialog">showConfigurationDialog</a></td>
115 <td>Public method to show the configuration dialog.</td>
116 </tr>
117 </table>
118 <h3>Static Methods</h3>
119 <table>
120 <tr><td>None</td></tr>
121 </table>
122 <a NAME="GreaseMonkeyManager.__init__" ID="GreaseMonkeyManager.__init__"></a>
123 <h4>GreaseMonkeyManager (Constructor)</h4>
124 <b>GreaseMonkeyManager</b>(<i>parent=None</i>)
125 <p>
126 Constructor
127 </p><dl>
128 <dt><i>parent</i></dt>
129 <dd>
130 reference to the parent object (QObject)
131 </dd>
132 </dl><a NAME="GreaseMonkeyManager.__del__" ID="GreaseMonkeyManager.__del__"></a>
133 <h4>GreaseMonkeyManager.__del__</h4>
134 <b>__del__</b>(<i></i>)
135 <p>
136 Special method called during object destruction.
137 </p><a NAME="GreaseMonkeyManager.__downloaderFinished" ID="GreaseMonkeyManager.__downloaderFinished"></a>
138 <h4>GreaseMonkeyManager.__downloaderFinished</h4>
139 <b>__downloaderFinished</b>(<i></i>)
140 <p>
141 Private slot to handle the completion of a script download.
142 </p><a NAME="GreaseMonkeyManager.__load" ID="GreaseMonkeyManager.__load"></a>
143 <h4>GreaseMonkeyManager.__load</h4>
144 <b>__load</b>(<i></i>)
145 <p>
146 Private slot to load the available scripts into the manager.
147 </p><a NAME="GreaseMonkeyManager.__scriptChanged" ID="GreaseMonkeyManager.__scriptChanged"></a>
148 <h4>GreaseMonkeyManager.__scriptChanged</h4>
149 <b>__scriptChanged</b>(<i></i>)
150 <p>
151 Private slot handling a changed script.
152 </p><a NAME="GreaseMonkeyManager.addScript" ID="GreaseMonkeyManager.addScript"></a>
153 <h4>GreaseMonkeyManager.addScript</h4>
154 <b>addScript</b>(<i>script</i>)
155 <p>
156 Public method to add a script.
157 </p><dl>
158 <dt><i>script</i></dt>
159 <dd>
160 script to be added (GreaseMonkeyScript)
161 </dd>
162 </dl><dl>
163 <dt>Returns:</dt>
164 <dd>
165 flag indicating success (boolean)
166 </dd>
167 </dl><a NAME="GreaseMonkeyManager.allScripts" ID="GreaseMonkeyManager.allScripts"></a>
168 <h4>GreaseMonkeyManager.allScripts</h4>
169 <b>allScripts</b>(<i></i>)
170 <p>
171 Public method to get a list of all scripts.
172 </p><dl>
173 <dt>Returns:</dt>
174 <dd>
175 list of all scripts (list of GreaseMonkeyScript)
176 </dd>
177 </dl><a NAME="GreaseMonkeyManager.canRunOnScheme" ID="GreaseMonkeyManager.canRunOnScheme"></a>
178 <h4>GreaseMonkeyManager.canRunOnScheme</h4>
179 <b>canRunOnScheme</b>(<i>scheme</i>)
180 <p>
181 Public method to check, if scripts can be run on a scheme.
182 </p><dl>
183 <dt><i>scheme</i></dt>
184 <dd>
185 scheme to check (string)
186 </dd>
187 </dl><dl>
188 <dt>Returns:</dt>
189 <dd>
190 flag indicating, that scripts can be run (boolean)
191 </dd>
192 </dl><a NAME="GreaseMonkeyManager.containsScript" ID="GreaseMonkeyManager.containsScript"></a>
193 <h4>GreaseMonkeyManager.containsScript</h4>
194 <b>containsScript</b>(<i>fullName</i>)
195 <p>
196 Public method to check, if the given script exists.
197 </p><dl>
198 <dt><i>fullName</i></dt>
199 <dd>
200 full name of the script (string)
201 </dd>
202 </dl><dl>
203 <dt>Returns:</dt>
204 <dd>
205 flag indicating the existence (boolean)
206 </dd>
207 </dl><a NAME="GreaseMonkeyManager.disableScript" ID="GreaseMonkeyManager.disableScript"></a>
208 <h4>GreaseMonkeyManager.disableScript</h4>
209 <b>disableScript</b>(<i>script</i>)
210 <p>
211 Public method to disable the given script.
212 </p><dl>
213 <dt><i>script</i></dt>
214 <dd>
215 script to be disabled (GreaseMonkeyScript)
216 </dd>
217 </dl><a NAME="GreaseMonkeyManager.doDownloadScript" ID="GreaseMonkeyManager.doDownloadScript"></a>
218 <h4>GreaseMonkeyManager.doDownloadScript</h4>
219 <b>doDownloadScript</b>(<i>url</i>)
220 <p>
221 Public slot to download a GreaseMonkey script.
222 </p><p>
223 Note: The download needed to be separated in the invoking part
224 (s.a.) and the one doing the real download because the invoking
225 part runs in a different thread (i.e. the web engine thread).
226 </p><dl>
227 <dt><i>url</i> (QUrl)</dt>
228 <dd>
229 URL to download script from
230 </dd>
231 </dl><a NAME="GreaseMonkeyManager.downloadScript" ID="GreaseMonkeyManager.downloadScript"></a>
232 <h4>GreaseMonkeyManager.downloadScript</h4>
233 <b>downloadScript</b>(<i>url</i>)
234 <p>
235 Public method to download a GreaseMonkey script.
236 </p><dl>
237 <dt><i>url</i> (QUrl)</dt>
238 <dd>
239 URL to download script from
240 </dd>
241 </dl><a NAME="GreaseMonkeyManager.enableScript" ID="GreaseMonkeyManager.enableScript"></a>
242 <h4>GreaseMonkeyManager.enableScript</h4>
243 <b>enableScript</b>(<i>script</i>)
244 <p>
245 Public method to enable the given script.
246 </p><dl>
247 <dt><i>script</i></dt>
248 <dd>
249 script to be enabled (GreaseMonkeyScript)
250 </dd>
251 </dl><a NAME="GreaseMonkeyManager.removeScript" ID="GreaseMonkeyManager.removeScript"></a>
252 <h4>GreaseMonkeyManager.removeScript</h4>
253 <b>removeScript</b>(<i>script, removeFile=True</i>)
254 <p>
255 Public method to remove a script.
256 </p><dl>
257 <dt><i>script</i></dt>
258 <dd>
259 script to be removed (GreaseMonkeyScript)
260 </dd><dt><i>removeFile</i></dt>
261 <dd>
262 flag indicating to remove the script file as well
263 (bool)
264 </dd>
265 </dl><dl>
266 <dt>Returns:</dt>
267 <dd>
268 flag indicating success (boolean)
269 </dd>
270 </dl><a NAME="GreaseMonkeyManager.requireScripts" ID="GreaseMonkeyManager.requireScripts"></a>
271 <h4>GreaseMonkeyManager.requireScripts</h4>
272 <b>requireScripts</b>(<i>urlList</i>)
273 <p>
274 Public method to get the sources of all required scripts.
275 </p><dl>
276 <dt><i>urlList</i></dt>
277 <dd>
278 list of URLs (list of string)
279 </dd>
280 </dl><dl>
281 <dt>Returns:</dt>
282 <dd>
283 sources of all required scripts (string)
284 </dd>
285 </dl><a NAME="GreaseMonkeyManager.requireScriptsDirectory" ID="GreaseMonkeyManager.requireScriptsDirectory"></a>
286 <h4>GreaseMonkeyManager.requireScriptsDirectory</h4>
287 <b>requireScriptsDirectory</b>(<i></i>)
288 <p>
289 Public method to get the path of the scripts directory.
290 </p><dl>
291 <dt>Returns:</dt>
292 <dd>
293 path of the scripts directory (string)
294 </dd>
295 </dl><a NAME="GreaseMonkeyManager.saveConfiguration" ID="GreaseMonkeyManager.saveConfiguration"></a>
296 <h4>GreaseMonkeyManager.saveConfiguration</h4>
297 <b>saveConfiguration</b>(<i></i>)
298 <p>
299 Public method to save the configuration.
300 </p><a NAME="GreaseMonkeyManager.scriptsDirectory" ID="GreaseMonkeyManager.scriptsDirectory"></a>
301 <h4>GreaseMonkeyManager.scriptsDirectory</h4>
302 <b>scriptsDirectory</b>(<i></i>)
303 <p>
304 Public method to get the path of the scripts directory.
305 </p><dl>
306 <dt>Returns:</dt>
307 <dd>
308 path of the scripts directory (string)
309 </dd>
310 </dl><a NAME="GreaseMonkeyManager.showConfigurationDialog" ID="GreaseMonkeyManager.showConfigurationDialog"></a>
311 <h4>GreaseMonkeyManager.showConfigurationDialog</h4>
312 <b>showConfigurationDialog</b>(<i>parent=None</i>)
313 <p>
314 Public method to show the configuration dialog.
315 </p><dl>
316 <dt><i>parent</i></dt>
317 <dd>
318 reference to the parent widget (QWidget)
319 </dd>
320 </dl>
321 <div align="right"><a href="#top">Up</a></div>
322 <hr />
323 </body></html>

eric ide

mercurial