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