|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.Helpviewer.WebPlugins.ClickToFlash.ClickToFlash</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.WebPlugins.ClickToFlash.ClickToFlash</h1> |
|
23 <p> |
|
24 Module implementing the Flash blocker. |
|
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="#ClickToFlash">ClickToFlash</a></td> |
|
34 <td>Class implementing the Flash blocker.</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="ClickToFlash" ID="ClickToFlash"></a> |
|
43 <h2>ClickToFlash</h2> |
|
44 <p> |
|
45 Class implementing the Flash blocker. |
|
46 </p> |
|
47 <h3>Derived from</h3> |
|
48 QWidget, Ui_ClickToFlash |
|
49 <h3>Class Attributes</h3> |
|
50 <table> |
|
51 <tr><td>_acceptedArgNames</td></tr><tr><td>_acceptedArgValues</td></tr><tr><td>_acceptedUrl</td></tr> |
|
52 </table> |
|
53 <h3>Class Methods</h3> |
|
54 <table> |
|
55 <tr> |
|
56 <td><a href="#ClickToFlash.isAlreadyAccepted">isAlreadyAccepted</a></td> |
|
57 <td>Class method to check, if the given parameter combination is being accepted.</td> |
|
58 </tr> |
|
59 </table> |
|
60 <h3>Methods</h3> |
|
61 <table> |
|
62 <tr> |
|
63 <td><a href="#ClickToFlash.__init__">ClickToFlash</a></td> |
|
64 <td>Constructor</td> |
|
65 </tr><tr> |
|
66 <td><a href="#ClickToFlash.__addToWhitelist">__addToWhitelist</a></td> |
|
67 <td>Private slot to add the host to the whitelist.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#ClickToFlash.__checkElement">__checkElement</a></td> |
|
70 <td>Private slot to check an element against the saved arguments.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#ClickToFlash.__checkUrlOnElement">__checkUrlOnElement</a></td> |
|
73 <td>Private slot to check the URL of an element.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#ClickToFlash.__configure">__configure</a></td> |
|
76 <td>Private slot to configure the whitelist.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#ClickToFlash.__elide">__elide</a></td> |
|
79 <td>Private method to elide some text.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#ClickToFlash.__findElement">__findElement</a></td> |
|
82 <td>Private method to find the element belonging to this ClickToFlash instance.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#ClickToFlash.__hideAdBlocked">__hideAdBlocked</a></td> |
|
85 <td>Private slot to hide the object.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#ClickToFlash.__load">__load</a></td> |
|
88 <td>Private slot to load the flash content.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#ClickToFlash.__removeFromWhitelist">__removeFromWhitelist</a></td> |
|
91 <td>Private slot to remove the host from the whitelist.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#ClickToFlash.__showContextMenu">__showContextMenu</a></td> |
|
94 <td>Private slot to show the context menu.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#ClickToFlash.__showInfo">__showInfo</a></td> |
|
97 <td>Private slot to show information about the blocked object.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#ClickToFlash.on_loadFlashButton_clicked">on_loadFlashButton_clicked</a></td> |
|
100 <td>Private slot handling the flash activation.</td> |
|
101 </tr><tr> |
|
102 <td><a href="#ClickToFlash.swapping">swapping</a></td> |
|
103 <td>Public method to check, if the plug-in is swapping.</td> |
|
104 </tr> |
|
105 </table> |
|
106 <h3>Static Methods</h3> |
|
107 <table> |
|
108 <tr><td>None</td></tr> |
|
109 </table> |
|
110 <a NAME="ClickToFlash.isAlreadyAccepted" ID="ClickToFlash.isAlreadyAccepted"></a> |
|
111 <h4>ClickToFlash.isAlreadyAccepted (class method)</h4> |
|
112 <b>isAlreadyAccepted</b>(<i>url, argumentNames, argumentValues</i>) |
|
113 <p> |
|
114 Class method to check, if the given parameter combination is being |
|
115 accepted. |
|
116 </p><dl> |
|
117 <dt><i>url</i></dt> |
|
118 <dd> |
|
119 URL to be checked for (QUrl) |
|
120 </dd><dt><i>argumentNames</i></dt> |
|
121 <dd> |
|
122 argument names to be checked for (list of strings) |
|
123 </dd><dt><i>argumentValues</i></dt> |
|
124 <dd> |
|
125 argument values to be checked for (list of |
|
126 strings) |
|
127 </dd> |
|
128 </dl><dl> |
|
129 <dt>Returns:</dt> |
|
130 <dd> |
|
131 flag indicating that this was already accepted (boolean) |
|
132 </dd> |
|
133 </dl><a NAME="ClickToFlash.__init__" ID="ClickToFlash.__init__"></a> |
|
134 <h4>ClickToFlash (Constructor)</h4> |
|
135 <b>ClickToFlash</b>(<i>plugin, mimeType, url, argumentNames, argumentValues, parent=None</i>) |
|
136 <p> |
|
137 Constructor |
|
138 </p><dl> |
|
139 <dt><i>plugin</i></dt> |
|
140 <dd> |
|
141 reference to the plug-in (ClickToFlashPlugin) |
|
142 </dd><dt><i>mimeType</i></dt> |
|
143 <dd> |
|
144 MIME type for the plug-in (string) |
|
145 </dd><dt><i>url</i></dt> |
|
146 <dd> |
|
147 requested URL (QUrl) |
|
148 </dd><dt><i>argumentNames</i></dt> |
|
149 <dd> |
|
150 list of argument names (list of strings) |
|
151 </dd><dt><i>argumentValues</i></dt> |
|
152 <dd> |
|
153 list of argument values (list of strings) |
|
154 </dd><dt><i>parent</i></dt> |
|
155 <dd> |
|
156 reference to the parent widget (QWidget) |
|
157 </dd> |
|
158 </dl><a NAME="ClickToFlash.__addToWhitelist" ID="ClickToFlash.__addToWhitelist"></a> |
|
159 <h4>ClickToFlash.__addToWhitelist</h4> |
|
160 <b>__addToWhitelist</b>(<i></i>) |
|
161 <p> |
|
162 Private slot to add the host to the whitelist. |
|
163 </p><a NAME="ClickToFlash.__checkElement" ID="ClickToFlash.__checkElement"></a> |
|
164 <h4>ClickToFlash.__checkElement</h4> |
|
165 <b>__checkElement</b>(<i>element</i>) |
|
166 <p> |
|
167 Private slot to check an element against the saved arguments. |
|
168 </p><dl> |
|
169 <dt><i>element</i></dt> |
|
170 <dd> |
|
171 reference to the element to check (QWebElement) |
|
172 </dd> |
|
173 </dl><dl> |
|
174 <dt>Returns:</dt> |
|
175 <dd> |
|
176 flag indicating a positive result (boolean) |
|
177 </dd> |
|
178 </dl><a NAME="ClickToFlash.__checkUrlOnElement" ID="ClickToFlash.__checkUrlOnElement"></a> |
|
179 <h4>ClickToFlash.__checkUrlOnElement</h4> |
|
180 <b>__checkUrlOnElement</b>(<i>element, view</i>) |
|
181 <p> |
|
182 Private slot to check the URL of an element. |
|
183 </p><dl> |
|
184 <dt><i>element</i></dt> |
|
185 <dd> |
|
186 reference to the element to check (QWebElement) |
|
187 </dd><dt><i>view</i></dt> |
|
188 <dd> |
|
189 reference to the view object (QWebView) |
|
190 </dd> |
|
191 </dl><dl> |
|
192 <dt>Returns:</dt> |
|
193 <dd> |
|
194 flag indicating a positive result (boolean) |
|
195 </dd> |
|
196 </dl><a NAME="ClickToFlash.__configure" ID="ClickToFlash.__configure"></a> |
|
197 <h4>ClickToFlash.__configure</h4> |
|
198 <b>__configure</b>(<i></i>) |
|
199 <p> |
|
200 Private slot to configure the whitelist. |
|
201 </p><a NAME="ClickToFlash.__elide" ID="ClickToFlash.__elide"></a> |
|
202 <h4>ClickToFlash.__elide</h4> |
|
203 <b>__elide</b>(<i>txt, mode=Qt.ElideMiddle, length=40</i>) |
|
204 <p> |
|
205 Private method to elide some text. |
|
206 </p><dl> |
|
207 <dt><i>txt</i></dt> |
|
208 <dd> |
|
209 text to be elided (string) |
|
210 </dd><dt><i>mode=</i></dt> |
|
211 <dd> |
|
212 elide mode (Qt.TextElideMode) |
|
213 </dd><dt><i>length=</i></dt> |
|
214 <dd> |
|
215 amount of characters to be used (integer) |
|
216 </dd> |
|
217 </dl><dl> |
|
218 <dt>Returns:</dt> |
|
219 <dd> |
|
220 the elided text (string) |
|
221 </dd> |
|
222 </dl><a NAME="ClickToFlash.__findElement" ID="ClickToFlash.__findElement"></a> |
|
223 <h4>ClickToFlash.__findElement</h4> |
|
224 <b>__findElement</b>(<i></i>) |
|
225 <p> |
|
226 Private method to find the element belonging to this ClickToFlash |
|
227 instance. |
|
228 </p><a NAME="ClickToFlash.__hideAdBlocked" ID="ClickToFlash.__hideAdBlocked"></a> |
|
229 <h4>ClickToFlash.__hideAdBlocked</h4> |
|
230 <b>__hideAdBlocked</b>(<i></i>) |
|
231 <p> |
|
232 Private slot to hide the object. |
|
233 </p><a NAME="ClickToFlash.__load" ID="ClickToFlash.__load"></a> |
|
234 <h4>ClickToFlash.__load</h4> |
|
235 <b>__load</b>(<i>all=False</i>) |
|
236 <p> |
|
237 Private slot to load the flash content. |
|
238 </p><dl> |
|
239 <dt><i>all</i></dt> |
|
240 <dd> |
|
241 flag indicating to load all flash players. (boolean) |
|
242 </dd> |
|
243 </dl><a NAME="ClickToFlash.__removeFromWhitelist" ID="ClickToFlash.__removeFromWhitelist"></a> |
|
244 <h4>ClickToFlash.__removeFromWhitelist</h4> |
|
245 <b>__removeFromWhitelist</b>(<i></i>) |
|
246 <p> |
|
247 Private slot to remove the host from the whitelist. |
|
248 </p><a NAME="ClickToFlash.__showContextMenu" ID="ClickToFlash.__showContextMenu"></a> |
|
249 <h4>ClickToFlash.__showContextMenu</h4> |
|
250 <b>__showContextMenu</b>(<i></i>) |
|
251 <p> |
|
252 Private slot to show the context menu. |
|
253 </p><a NAME="ClickToFlash.__showInfo" ID="ClickToFlash.__showInfo"></a> |
|
254 <h4>ClickToFlash.__showInfo</h4> |
|
255 <b>__showInfo</b>(<i></i>) |
|
256 <p> |
|
257 Private slot to show information about the blocked object. |
|
258 </p><a NAME="ClickToFlash.on_loadFlashButton_clicked" ID="ClickToFlash.on_loadFlashButton_clicked"></a> |
|
259 <h4>ClickToFlash.on_loadFlashButton_clicked</h4> |
|
260 <b>on_loadFlashButton_clicked</b>(<i></i>) |
|
261 <p> |
|
262 Private slot handling the flash activation. |
|
263 </p><a NAME="ClickToFlash.swapping" ID="ClickToFlash.swapping"></a> |
|
264 <h4>ClickToFlash.swapping</h4> |
|
265 <b>swapping</b>(<i></i>) |
|
266 <p> |
|
267 Public method to check, if the plug-in is swapping. |
|
268 </p><dl> |
|
269 <dt>Returns:</dt> |
|
270 <dd> |
|
271 flag indicating the swapping status (boolean) |
|
272 </dd> |
|
273 </dl> |
|
274 <div align="right"><a href="#top">Up</a></div> |
|
275 <hr /> |
|
276 </body></html> |