|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.WebBrowser.AdBlock.AdBlockIcon</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> |
|
22 <a NAME="top" ID="top"></a> |
|
23 <h1>eric7.WebBrowser.AdBlock.AdBlockIcon</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing the AdBlock icon for the main window status bar. |
|
27 </p> |
|
28 <h3>Global Attributes</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <h3>Classes</h3> |
|
34 |
|
35 <table> |
|
36 |
|
37 <tr> |
|
38 <td><a href="#AdBlockIcon">AdBlockIcon</a></td> |
|
39 <td>Class implementing the AdBlock icon for the main window status bar.</td> |
|
40 </tr> |
|
41 </table> |
|
42 <h3>Functions</h3> |
|
43 |
|
44 <table> |
|
45 <tr><td>None</td></tr> |
|
46 </table> |
|
47 <hr /> |
|
48 <hr /> |
|
49 <a NAME="AdBlockIcon" ID="AdBlockIcon"></a> |
|
50 <h2>AdBlockIcon</h2> |
|
51 |
|
52 <p> |
|
53 Class implementing the AdBlock icon for the main window status bar. |
|
54 </p> |
|
55 <h3>Derived from</h3> |
|
56 EricClickableLabel |
|
57 <h3>Class Attributes</h3> |
|
58 |
|
59 <table> |
|
60 <tr><td>None</td></tr> |
|
61 </table> |
|
62 <h3>Class Methods</h3> |
|
63 |
|
64 <table> |
|
65 <tr><td>None</td></tr> |
|
66 </table> |
|
67 <h3>Methods</h3> |
|
68 |
|
69 <table> |
|
70 |
|
71 <tr> |
|
72 <td><a href="#AdBlockIcon.__init__">AdBlockIcon</a></td> |
|
73 <td>Constructor</td> |
|
74 </tr> |
|
75 <tr> |
|
76 <td><a href="#AdBlockIcon.__aboutToShowMenu">__aboutToShowMenu</a></td> |
|
77 <td>Private slot to show the context menu.</td> |
|
78 </tr> |
|
79 <tr> |
|
80 <td><a href="#AdBlockIcon.__enableAdBlock">__enableAdBlock</a></td> |
|
81 <td>Private slot to enable or disable AdBlock.</td> |
|
82 </tr> |
|
83 <tr> |
|
84 <td><a href="#AdBlockIcon.__isCurrentHostExcepted">__isCurrentHostExcepted</a></td> |
|
85 <td>Private method to check, if the host of the current browser is excepted.</td> |
|
86 </tr> |
|
87 <tr> |
|
88 <td><a href="#AdBlockIcon.__setException">__setException</a></td> |
|
89 <td>Private slot to add or remove the current host from the list of exceptions.</td> |
|
90 </tr> |
|
91 <tr> |
|
92 <td><a href="#AdBlockIcon.__showMenu">__showMenu</a></td> |
|
93 <td>Private slot to show the context menu.</td> |
|
94 </tr> |
|
95 <tr> |
|
96 <td><a href="#AdBlockIcon.currentChanged">currentChanged</a></td> |
|
97 <td>Public slot to handle a change of the current browser tab.</td> |
|
98 </tr> |
|
99 <tr> |
|
100 <td><a href="#AdBlockIcon.menu">menu</a></td> |
|
101 <td>Public method to get a reference to the menu.</td> |
|
102 </tr> |
|
103 <tr> |
|
104 <td><a href="#AdBlockIcon.setEnabled">setEnabled</a></td> |
|
105 <td>Public slot to set the enabled state.</td> |
|
106 </tr> |
|
107 <tr> |
|
108 <td><a href="#AdBlockIcon.sourceChanged">sourceChanged</a></td> |
|
109 <td>Public slot to handle URL changes.</td> |
|
110 </tr> |
|
111 </table> |
|
112 <h3>Static Methods</h3> |
|
113 |
|
114 <table> |
|
115 <tr><td>None</td></tr> |
|
116 </table> |
|
117 |
|
118 <a NAME="AdBlockIcon.__init__" ID="AdBlockIcon.__init__"></a> |
|
119 <h4>AdBlockIcon (Constructor)</h4> |
|
120 <b>AdBlockIcon</b>(<i>parent</i>) |
|
121 |
|
122 <p> |
|
123 Constructor |
|
124 </p> |
|
125 <dl> |
|
126 |
|
127 <dt><i>parent</i> (WebBrowserWindow)</dt> |
|
128 <dd> |
|
129 reference to the parent widget |
|
130 </dd> |
|
131 </dl> |
|
132 <a NAME="AdBlockIcon.__aboutToShowMenu" ID="AdBlockIcon.__aboutToShowMenu"></a> |
|
133 <h4>AdBlockIcon.__aboutToShowMenu</h4> |
|
134 <b>__aboutToShowMenu</b>(<i></i>) |
|
135 |
|
136 <p> |
|
137 Private slot to show the context menu. |
|
138 </p> |
|
139 <a NAME="AdBlockIcon.__enableAdBlock" ID="AdBlockIcon.__enableAdBlock"></a> |
|
140 <h4>AdBlockIcon.__enableAdBlock</h4> |
|
141 <b>__enableAdBlock</b>(<i>enable</i>) |
|
142 |
|
143 <p> |
|
144 Private slot to enable or disable AdBlock. |
|
145 </p> |
|
146 <dl> |
|
147 |
|
148 <dt><i>enable</i> (bool)</dt> |
|
149 <dd> |
|
150 flag indicating the desired enable state |
|
151 </dd> |
|
152 </dl> |
|
153 <a NAME="AdBlockIcon.__isCurrentHostExcepted" ID="AdBlockIcon.__isCurrentHostExcepted"></a> |
|
154 <h4>AdBlockIcon.__isCurrentHostExcepted</h4> |
|
155 <b>__isCurrentHostExcepted</b>(<i></i>) |
|
156 |
|
157 <p> |
|
158 Private method to check, if the host of the current browser is |
|
159 excepted. |
|
160 </p> |
|
161 <dl> |
|
162 <dt>Return:</dt> |
|
163 <dd> |
|
164 flag indicating an exception |
|
165 </dd> |
|
166 </dl> |
|
167 <dl> |
|
168 <dt>Return Type:</dt> |
|
169 <dd> |
|
170 bool |
|
171 </dd> |
|
172 </dl> |
|
173 <a NAME="AdBlockIcon.__setException" ID="AdBlockIcon.__setException"></a> |
|
174 <h4>AdBlockIcon.__setException</h4> |
|
175 <b>__setException</b>(<i>enable</i>) |
|
176 |
|
177 <p> |
|
178 Private slot to add or remove the current host from the list of |
|
179 exceptions. |
|
180 </p> |
|
181 <dl> |
|
182 |
|
183 <dt><i>enable</i> (bool)</dt> |
|
184 <dd> |
|
185 flag indicating to set or remove an exception |
|
186 </dd> |
|
187 </dl> |
|
188 <a NAME="AdBlockIcon.__showMenu" ID="AdBlockIcon.__showMenu"></a> |
|
189 <h4>AdBlockIcon.__showMenu</h4> |
|
190 <b>__showMenu</b>(<i>pos</i>) |
|
191 |
|
192 <p> |
|
193 Private slot to show the context menu. |
|
194 </p> |
|
195 <dl> |
|
196 |
|
197 <dt><i>pos</i> (QPoint)</dt> |
|
198 <dd> |
|
199 position the context menu should be shown |
|
200 </dd> |
|
201 </dl> |
|
202 <a NAME="AdBlockIcon.currentChanged" ID="AdBlockIcon.currentChanged"></a> |
|
203 <h4>AdBlockIcon.currentChanged</h4> |
|
204 <b>currentChanged</b>(<i></i>) |
|
205 |
|
206 <p> |
|
207 Public slot to handle a change of the current browser tab. |
|
208 </p> |
|
209 <a NAME="AdBlockIcon.menu" ID="AdBlockIcon.menu"></a> |
|
210 <h4>AdBlockIcon.menu</h4> |
|
211 <b>menu</b>(<i></i>) |
|
212 |
|
213 <p> |
|
214 Public method to get a reference to the menu. |
|
215 </p> |
|
216 <dl> |
|
217 <dt>Return:</dt> |
|
218 <dd> |
|
219 reference to the menu |
|
220 </dd> |
|
221 </dl> |
|
222 <dl> |
|
223 <dt>Return Type:</dt> |
|
224 <dd> |
|
225 QMenu |
|
226 </dd> |
|
227 </dl> |
|
228 <a NAME="AdBlockIcon.setEnabled" ID="AdBlockIcon.setEnabled"></a> |
|
229 <h4>AdBlockIcon.setEnabled</h4> |
|
230 <b>setEnabled</b>(<i>enabled</i>) |
|
231 |
|
232 <p> |
|
233 Public slot to set the enabled state. |
|
234 </p> |
|
235 <dl> |
|
236 |
|
237 <dt><i>enabled</i> (bool)</dt> |
|
238 <dd> |
|
239 enabled state |
|
240 </dd> |
|
241 </dl> |
|
242 <a NAME="AdBlockIcon.sourceChanged" ID="AdBlockIcon.sourceChanged"></a> |
|
243 <h4>AdBlockIcon.sourceChanged</h4> |
|
244 <b>sourceChanged</b>(<i>browser, url</i>) |
|
245 |
|
246 <p> |
|
247 Public slot to handle URL changes. |
|
248 </p> |
|
249 <dl> |
|
250 |
|
251 <dt><i>browser</i> (WebBrowserView)</dt> |
|
252 <dd> |
|
253 reference to the browser |
|
254 </dd> |
|
255 <dt><i>url</i> (QUrl)</dt> |
|
256 <dd> |
|
257 new URL |
|
258 </dd> |
|
259 </dl> |
|
260 <div align="right"><a href="#top">Up</a></div> |
|
261 <hr /> |
|
262 </body></html> |