|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.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><a NAME="top" ID="top"></a> |
|
22 <h1>eric6.WebBrowser.AdBlock.AdBlockTreeWidget</h1> |
|
23 <p> |
|
24 Module implementing a tree widget for the AdBlock configuration dialog. |
|
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="#AdBlockTreeWidget">AdBlockTreeWidget</a></td> |
|
34 <td>Class implementing a tree widget for the AdBlock configuration dialog.</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="AdBlockTreeWidget" ID="AdBlockTreeWidget"></a> |
|
43 <h2>AdBlockTreeWidget</h2> |
|
44 <p> |
|
45 Class implementing a tree widget for the AdBlock configuration dialog. |
|
46 </p> |
|
47 <h3>Derived from</h3> |
|
48 E5TreeWidget |
|
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="#AdBlockTreeWidget.__init__">AdBlockTreeWidget</a></td> |
|
61 <td>Constructor</td> |
|
62 </tr><tr> |
|
63 <td><a href="#AdBlockTreeWidget.__adjustItemFeatures">__adjustItemFeatures</a></td> |
|
64 <td>Private method to adjust an item.</td> |
|
65 </tr><tr> |
|
66 <td><a href="#AdBlockTreeWidget.__contextMenuRequested">__contextMenuRequested</a></td> |
|
67 <td>Private slot to show the context menu.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#AdBlockTreeWidget.__copyFilter">__copyFilter</a></td> |
|
70 <td>Private slot to copy the current filter to the clipboard.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#AdBlockTreeWidget.__itemChanged">__itemChanged</a></td> |
|
73 <td>Private slot to handle the change of an item.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#AdBlockTreeWidget.__subscriptionChanged">__subscriptionChanged</a></td> |
|
76 <td>Private slot handling a subscription change.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#AdBlockTreeWidget.addRule">addRule</a></td> |
|
79 <td>Public slot to add a new rule.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#AdBlockTreeWidget.keyPressEvent">keyPressEvent</a></td> |
|
82 <td>Protected method handling key presses.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#AdBlockTreeWidget.refresh">refresh</a></td> |
|
85 <td>Public method to refresh the tree.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#AdBlockTreeWidget.removeRule">removeRule</a></td> |
|
88 <td>Public slot to remove the current rule.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#AdBlockTreeWidget.showRule">showRule</a></td> |
|
91 <td>Public method to highlight the given rule.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#AdBlockTreeWidget.subscription">subscription</a></td> |
|
94 <td>Public method to get a reference to the subscription.</td> |
|
95 </tr> |
|
96 </table> |
|
97 <h3>Static Methods</h3> |
|
98 <table> |
|
99 <tr><td>None</td></tr> |
|
100 </table> |
|
101 <a NAME="AdBlockTreeWidget.__init__" ID="AdBlockTreeWidget.__init__"></a> |
|
102 <h4>AdBlockTreeWidget (Constructor)</h4> |
|
103 <b>AdBlockTreeWidget</b>(<i>subscription, parent=None</i>) |
|
104 <p> |
|
105 Constructor |
|
106 </p><dl> |
|
107 <dt><i>subscription</i></dt> |
|
108 <dd> |
|
109 reference to the subscription (AdBlockSubscription) |
|
110 </dd><dt><i>parent</i></dt> |
|
111 <dd> |
|
112 reference to the parent widget (QWidget) |
|
113 </dd> |
|
114 </dl><a NAME="AdBlockTreeWidget.__adjustItemFeatures" ID="AdBlockTreeWidget.__adjustItemFeatures"></a> |
|
115 <h4>AdBlockTreeWidget.__adjustItemFeatures</h4> |
|
116 <b>__adjustItemFeatures</b>(<i>itm, rule</i>) |
|
117 <p> |
|
118 Private method to adjust an item. |
|
119 </p><dl> |
|
120 <dt><i>itm</i></dt> |
|
121 <dd> |
|
122 item to be adjusted (QTreeWidgetItem) |
|
123 </dd><dt><i>rule</i></dt> |
|
124 <dd> |
|
125 rule for the adjustment (AdBlockRule) |
|
126 </dd> |
|
127 </dl><a NAME="AdBlockTreeWidget.__contextMenuRequested" ID="AdBlockTreeWidget.__contextMenuRequested"></a> |
|
128 <h4>AdBlockTreeWidget.__contextMenuRequested</h4> |
|
129 <b>__contextMenuRequested</b>(<i>pos</i>) |
|
130 <p> |
|
131 Private slot to show the context menu. |
|
132 </p><dl> |
|
133 <dt><i>pos</i></dt> |
|
134 <dd> |
|
135 position for the menu (QPoint) |
|
136 </dd> |
|
137 </dl><a NAME="AdBlockTreeWidget.__copyFilter" ID="AdBlockTreeWidget.__copyFilter"></a> |
|
138 <h4>AdBlockTreeWidget.__copyFilter</h4> |
|
139 <b>__copyFilter</b>(<i></i>) |
|
140 <p> |
|
141 Private slot to copy the current filter to the clipboard. |
|
142 </p><a NAME="AdBlockTreeWidget.__itemChanged" ID="AdBlockTreeWidget.__itemChanged"></a> |
|
143 <h4>AdBlockTreeWidget.__itemChanged</h4> |
|
144 <b>__itemChanged</b>(<i>itm</i>) |
|
145 <p> |
|
146 Private slot to handle the change of an item. |
|
147 </p><dl> |
|
148 <dt><i>itm</i></dt> |
|
149 <dd> |
|
150 changed item (QTreeWidgetItem) |
|
151 </dd> |
|
152 </dl><a NAME="AdBlockTreeWidget.__subscriptionChanged" ID="AdBlockTreeWidget.__subscriptionChanged"></a> |
|
153 <h4>AdBlockTreeWidget.__subscriptionChanged</h4> |
|
154 <b>__subscriptionChanged</b>(<i></i>) |
|
155 <p> |
|
156 Private slot handling a subscription change. |
|
157 </p><a NAME="AdBlockTreeWidget.addRule" ID="AdBlockTreeWidget.addRule"></a> |
|
158 <h4>AdBlockTreeWidget.addRule</h4> |
|
159 <b>addRule</b>(<i>filter=""</i>) |
|
160 <p> |
|
161 Public slot to add a new rule. |
|
162 </p><dl> |
|
163 <dt><i>filter</i></dt> |
|
164 <dd> |
|
165 filter to be added (string) |
|
166 </dd> |
|
167 </dl><a NAME="AdBlockTreeWidget.keyPressEvent" ID="AdBlockTreeWidget.keyPressEvent"></a> |
|
168 <h4>AdBlockTreeWidget.keyPressEvent</h4> |
|
169 <b>keyPressEvent</b>(<i>evt</i>) |
|
170 <p> |
|
171 Protected method handling key presses. |
|
172 </p><dl> |
|
173 <dt><i>evt</i></dt> |
|
174 <dd> |
|
175 key press event (QKeyEvent) |
|
176 </dd> |
|
177 </dl><a NAME="AdBlockTreeWidget.refresh" ID="AdBlockTreeWidget.refresh"></a> |
|
178 <h4>AdBlockTreeWidget.refresh</h4> |
|
179 <b>refresh</b>(<i></i>) |
|
180 <p> |
|
181 Public method to refresh the tree. |
|
182 </p><a NAME="AdBlockTreeWidget.removeRule" ID="AdBlockTreeWidget.removeRule"></a> |
|
183 <h4>AdBlockTreeWidget.removeRule</h4> |
|
184 <b>removeRule</b>(<i></i>) |
|
185 <p> |
|
186 Public slot to remove the current rule. |
|
187 </p><a NAME="AdBlockTreeWidget.showRule" ID="AdBlockTreeWidget.showRule"></a> |
|
188 <h4>AdBlockTreeWidget.showRule</h4> |
|
189 <b>showRule</b>(<i>rule</i>) |
|
190 <p> |
|
191 Public method to highlight the given rule. |
|
192 </p><dl> |
|
193 <dt><i>rule</i></dt> |
|
194 <dd> |
|
195 AdBlock rule to be shown (AdBlockRule) |
|
196 </dd> |
|
197 </dl><a NAME="AdBlockTreeWidget.subscription" ID="AdBlockTreeWidget.subscription"></a> |
|
198 <h4>AdBlockTreeWidget.subscription</h4> |
|
199 <b>subscription</b>(<i></i>) |
|
200 <p> |
|
201 Public method to get a reference to the subscription. |
|
202 </p><dl> |
|
203 <dt>Returns:</dt> |
|
204 <dd> |
|
205 reference to the subscription (AdBlockSubscription) |
|
206 </dd> |
|
207 </dl> |
|
208 <div align="right"><a href="#top">Up</a></div> |
|
209 <hr /> |
|
210 </body></html> |