|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.WebBrowser.AdBlock.AdBlockTreeWidget</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.AdBlockTreeWidget</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing a tree widget for the AdBlock configuration dialog. |
|
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="#AdBlockTreeWidget">AdBlockTreeWidget</a></td> |
|
39 <td>Class implementing a tree widget for the AdBlock configuration dialog.</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="AdBlockTreeWidget" ID="AdBlockTreeWidget"></a> |
|
50 <h2>AdBlockTreeWidget</h2> |
|
51 |
|
52 <p> |
|
53 Class implementing a tree widget for the AdBlock configuration dialog. |
|
54 </p> |
|
55 <h3>Derived from</h3> |
|
56 EricTreeWidget |
|
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="#AdBlockTreeWidget.__init__">AdBlockTreeWidget</a></td> |
|
73 <td>Constructor</td> |
|
74 </tr> |
|
75 <tr> |
|
76 <td><a href="#AdBlockTreeWidget.__adjustItemFeatures">__adjustItemFeatures</a></td> |
|
77 <td>Private method to adjust an item.</td> |
|
78 </tr> |
|
79 <tr> |
|
80 <td><a href="#AdBlockTreeWidget.__contextMenuRequested">__contextMenuRequested</a></td> |
|
81 <td>Private slot to show the context menu.</td> |
|
82 </tr> |
|
83 <tr> |
|
84 <td><a href="#AdBlockTreeWidget.__copyFilter">__copyFilter</a></td> |
|
85 <td>Private slot to copy the current filter to the clipboard.</td> |
|
86 </tr> |
|
87 <tr> |
|
88 <td><a href="#AdBlockTreeWidget.__itemChanged">__itemChanged</a></td> |
|
89 <td>Private slot to handle the change of an item.</td> |
|
90 </tr> |
|
91 <tr> |
|
92 <td><a href="#AdBlockTreeWidget.__subscriptionChanged">__subscriptionChanged</a></td> |
|
93 <td>Private slot handling a subscription change.</td> |
|
94 </tr> |
|
95 <tr> |
|
96 <td><a href="#AdBlockTreeWidget.addRule">addRule</a></td> |
|
97 <td>Public slot to add a new rule.</td> |
|
98 </tr> |
|
99 <tr> |
|
100 <td><a href="#AdBlockTreeWidget.keyPressEvent">keyPressEvent</a></td> |
|
101 <td>Protected method handling key presses.</td> |
|
102 </tr> |
|
103 <tr> |
|
104 <td><a href="#AdBlockTreeWidget.refresh">refresh</a></td> |
|
105 <td>Public method to refresh the tree.</td> |
|
106 </tr> |
|
107 <tr> |
|
108 <td><a href="#AdBlockTreeWidget.removeRule">removeRule</a></td> |
|
109 <td>Public slot to remove the current rule.</td> |
|
110 </tr> |
|
111 <tr> |
|
112 <td><a href="#AdBlockTreeWidget.showRule">showRule</a></td> |
|
113 <td>Public method to highlight the given rule.</td> |
|
114 </tr> |
|
115 <tr> |
|
116 <td><a href="#AdBlockTreeWidget.subscription">subscription</a></td> |
|
117 <td>Public method to get a reference to the subscription.</td> |
|
118 </tr> |
|
119 </table> |
|
120 <h3>Static Methods</h3> |
|
121 |
|
122 <table> |
|
123 <tr><td>None</td></tr> |
|
124 </table> |
|
125 |
|
126 <a NAME="AdBlockTreeWidget.__init__" ID="AdBlockTreeWidget.__init__"></a> |
|
127 <h4>AdBlockTreeWidget (Constructor)</h4> |
|
128 <b>AdBlockTreeWidget</b>(<i>subscription, parent=None</i>) |
|
129 |
|
130 <p> |
|
131 Constructor |
|
132 </p> |
|
133 <dl> |
|
134 |
|
135 <dt><i>subscription</i> (AdBlockSubscription)</dt> |
|
136 <dd> |
|
137 reference to the subscription |
|
138 </dd> |
|
139 <dt><i>parent</i> (QWidget)</dt> |
|
140 <dd> |
|
141 reference to the parent widget |
|
142 </dd> |
|
143 </dl> |
|
144 <a NAME="AdBlockTreeWidget.__adjustItemFeatures" ID="AdBlockTreeWidget.__adjustItemFeatures"></a> |
|
145 <h4>AdBlockTreeWidget.__adjustItemFeatures</h4> |
|
146 <b>__adjustItemFeatures</b>(<i>itm, rule</i>) |
|
147 |
|
148 <p> |
|
149 Private method to adjust an item. |
|
150 </p> |
|
151 <dl> |
|
152 |
|
153 <dt><i>itm</i> (QTreeWidgetItem)</dt> |
|
154 <dd> |
|
155 item to be adjusted |
|
156 </dd> |
|
157 <dt><i>rule</i> (AdBlockRule)</dt> |
|
158 <dd> |
|
159 rule for the adjustment |
|
160 </dd> |
|
161 </dl> |
|
162 <a NAME="AdBlockTreeWidget.__contextMenuRequested" ID="AdBlockTreeWidget.__contextMenuRequested"></a> |
|
163 <h4>AdBlockTreeWidget.__contextMenuRequested</h4> |
|
164 <b>__contextMenuRequested</b>(<i>pos</i>) |
|
165 |
|
166 <p> |
|
167 Private slot to show the context menu. |
|
168 </p> |
|
169 <dl> |
|
170 |
|
171 <dt><i>pos</i> (QPoint)</dt> |
|
172 <dd> |
|
173 position for the menu |
|
174 </dd> |
|
175 </dl> |
|
176 <a NAME="AdBlockTreeWidget.__copyFilter" ID="AdBlockTreeWidget.__copyFilter"></a> |
|
177 <h4>AdBlockTreeWidget.__copyFilter</h4> |
|
178 <b>__copyFilter</b>(<i></i>) |
|
179 |
|
180 <p> |
|
181 Private slot to copy the current filter to the clipboard. |
|
182 </p> |
|
183 <a NAME="AdBlockTreeWidget.__itemChanged" ID="AdBlockTreeWidget.__itemChanged"></a> |
|
184 <h4>AdBlockTreeWidget.__itemChanged</h4> |
|
185 <b>__itemChanged</b>(<i>itm</i>) |
|
186 |
|
187 <p> |
|
188 Private slot to handle the change of an item. |
|
189 </p> |
|
190 <dl> |
|
191 |
|
192 <dt><i>itm</i> (QTreeWidgetItem)</dt> |
|
193 <dd> |
|
194 changed item |
|
195 </dd> |
|
196 </dl> |
|
197 <a NAME="AdBlockTreeWidget.__subscriptionChanged" ID="AdBlockTreeWidget.__subscriptionChanged"></a> |
|
198 <h4>AdBlockTreeWidget.__subscriptionChanged</h4> |
|
199 <b>__subscriptionChanged</b>(<i></i>) |
|
200 |
|
201 <p> |
|
202 Private slot handling a subscription change. |
|
203 </p> |
|
204 <a NAME="AdBlockTreeWidget.addRule" ID="AdBlockTreeWidget.addRule"></a> |
|
205 <h4>AdBlockTreeWidget.addRule</h4> |
|
206 <b>addRule</b>(<i>filterRule=""</i>) |
|
207 |
|
208 <p> |
|
209 Public slot to add a new rule. |
|
210 </p> |
|
211 <dl> |
|
212 |
|
213 <dt><i>filterRule</i> (str)</dt> |
|
214 <dd> |
|
215 filter to be added |
|
216 </dd> |
|
217 </dl> |
|
218 <a NAME="AdBlockTreeWidget.keyPressEvent" ID="AdBlockTreeWidget.keyPressEvent"></a> |
|
219 <h4>AdBlockTreeWidget.keyPressEvent</h4> |
|
220 <b>keyPressEvent</b>(<i>evt</i>) |
|
221 |
|
222 <p> |
|
223 Protected method handling key presses. |
|
224 </p> |
|
225 <dl> |
|
226 |
|
227 <dt><i>evt</i> (QKeyEvent)</dt> |
|
228 <dd> |
|
229 key press event |
|
230 </dd> |
|
231 </dl> |
|
232 <a NAME="AdBlockTreeWidget.refresh" ID="AdBlockTreeWidget.refresh"></a> |
|
233 <h4>AdBlockTreeWidget.refresh</h4> |
|
234 <b>refresh</b>(<i></i>) |
|
235 |
|
236 <p> |
|
237 Public method to refresh the tree. |
|
238 </p> |
|
239 <a NAME="AdBlockTreeWidget.removeRule" ID="AdBlockTreeWidget.removeRule"></a> |
|
240 <h4>AdBlockTreeWidget.removeRule</h4> |
|
241 <b>removeRule</b>(<i></i>) |
|
242 |
|
243 <p> |
|
244 Public slot to remove the current rule. |
|
245 </p> |
|
246 <a NAME="AdBlockTreeWidget.showRule" ID="AdBlockTreeWidget.showRule"></a> |
|
247 <h4>AdBlockTreeWidget.showRule</h4> |
|
248 <b>showRule</b>(<i>rule</i>) |
|
249 |
|
250 <p> |
|
251 Public method to highlight the given rule. |
|
252 </p> |
|
253 <dl> |
|
254 |
|
255 <dt><i>rule</i> (AdBlockRule)</dt> |
|
256 <dd> |
|
257 AdBlock rule to be shown |
|
258 </dd> |
|
259 </dl> |
|
260 <a NAME="AdBlockTreeWidget.subscription" ID="AdBlockTreeWidget.subscription"></a> |
|
261 <h4>AdBlockTreeWidget.subscription</h4> |
|
262 <b>subscription</b>(<i></i>) |
|
263 |
|
264 <p> |
|
265 Public method to get a reference to the subscription. |
|
266 </p> |
|
267 <dl> |
|
268 <dt>Return:</dt> |
|
269 <dd> |
|
270 reference to the subscription |
|
271 </dd> |
|
272 </dl> |
|
273 <dl> |
|
274 <dt>Return Type:</dt> |
|
275 <dd> |
|
276 AdBlockSubscription |
|
277 </dd> |
|
278 </dl> |
|
279 <div align="right"><a href="#top">Up</a></div> |
|
280 <hr /> |
|
281 </body></html> |