53 </table> |
53 </table> |
54 <h3>Methods</h3> |
54 <h3>Methods</h3> |
55 <table> |
55 <table> |
56 <tr> |
56 <tr> |
57 <td><a href="#AdBlockModel.__init__">AdBlockModel</a></td> |
57 <td><a href="#AdBlockModel.__init__">AdBlockModel</a></td> |
58 <td>Constructor</td> |
58 <td>Constructor</td> |
59 </tr><tr> |
59 </tr><tr> |
60 <td><a href="#AdBlockModel.__rulesChanged">__rulesChanged</a></td> |
60 <td><a href="#AdBlockModel.__rulesChanged">__rulesChanged</a></td> |
61 <td>Private slot to handle changes in rules.</td> |
61 <td>Private slot to handle changes in rules.</td> |
62 </tr><tr> |
62 </tr><tr> |
63 <td><a href="#AdBlockModel.columnCount">columnCount</a></td> |
63 <td><a href="#AdBlockModel.columnCount">columnCount</a></td> |
64 <td>Public method to get the number of columns.</td> |
64 <td>Public method to get the number of columns.</td> |
65 </tr><tr> |
65 </tr><tr> |
66 <td><a href="#AdBlockModel.data">data</a></td> |
66 <td><a href="#AdBlockModel.data">data</a></td> |
67 <td>Public method to get data from the model.</td> |
67 <td>Public method to get data from the model.</td> |
68 </tr><tr> |
68 </tr><tr> |
69 <td><a href="#AdBlockModel.flags">flags</a></td> |
69 <td><a href="#AdBlockModel.flags">flags</a></td> |
70 <td>Public method to get flags for a node cell.</td> |
70 <td>Public method to get flags for a node cell.</td> |
71 </tr><tr> |
71 </tr><tr> |
72 <td><a href="#AdBlockModel.hasChildren">hasChildren</a></td> |
72 <td><a href="#AdBlockModel.hasChildren">hasChildren</a></td> |
73 <td>Public method to check, if a parent node has some children.</td> |
73 <td>Public method to check, if a parent node has some children.</td> |
74 </tr><tr> |
74 </tr><tr> |
75 <td><a href="#AdBlockModel.headerData">headerData</a></td> |
75 <td><a href="#AdBlockModel.headerData">headerData</a></td> |
76 <td>Public method to get the header data.</td> |
76 <td>Public method to get the header data.</td> |
77 </tr><tr> |
77 </tr><tr> |
78 <td><a href="#AdBlockModel.index">index</a></td> |
78 <td><a href="#AdBlockModel.index">index</a></td> |
79 <td>Public method to get a model index for a node cell.</td> |
79 <td>Public method to get a model index for a node cell.</td> |
80 </tr><tr> |
80 </tr><tr> |
81 <td><a href="#AdBlockModel.parent">parent</a></td> |
81 <td><a href="#AdBlockModel.parent">parent</a></td> |
82 <td>Public method to get the index of the parent node.</td> |
82 <td>Public method to get the index of the parent node.</td> |
83 </tr><tr> |
83 </tr><tr> |
84 <td><a href="#AdBlockModel.removeRows">removeRows</a></td> |
84 <td><a href="#AdBlockModel.removeRows">removeRows</a></td> |
85 <td>Public method to remove bookmarks from the model.</td> |
85 <td>Public method to remove bookmarks from the model.</td> |
86 </tr><tr> |
86 </tr><tr> |
87 <td><a href="#AdBlockModel.rowCount">rowCount</a></td> |
87 <td><a href="#AdBlockModel.rowCount">rowCount</a></td> |
88 <td>Public method to determine the number of rows.</td> |
88 <td>Public method to determine the number of rows.</td> |
89 </tr><tr> |
89 </tr><tr> |
90 <td><a href="#AdBlockModel.rule">rule</a></td> |
90 <td><a href="#AdBlockModel.rule">rule</a></td> |
91 <td>Public method to get the rule given it's index.</td> |
91 <td>Public method to get the rule given it's index.</td> |
92 </tr><tr> |
92 </tr><tr> |
93 <td><a href="#AdBlockModel.setData">setData</a></td> |
93 <td><a href="#AdBlockModel.setData">setData</a></td> |
94 <td>Public method to set the data of a node cell.</td> |
94 <td>Public method to set the data of a node cell.</td> |
95 </tr><tr> |
95 </tr><tr> |
96 <td><a href="#AdBlockModel.subscription">subscription</a></td> |
96 <td><a href="#AdBlockModel.subscription">subscription</a></td> |
97 <td>Public method to get the subscription given it's index.</td> |
97 <td>Public method to get the subscription given it's index.</td> |
98 </tr><tr> |
98 </tr><tr> |
99 <td><a href="#AdBlockModel.subscriptionIndex">subscriptionIndex</a></td> |
99 <td><a href="#AdBlockModel.subscriptionIndex">subscriptionIndex</a></td> |
100 <td>Public method to get the index of a subscription.</td> |
100 <td>Public method to get the index of a subscription.</td> |
101 </tr> |
101 </tr> |
102 </table> |
102 </table> |
103 <a NAME="AdBlockModel.__init__" ID="AdBlockModel.__init__"></a> |
103 <a NAME="AdBlockModel.__init__" ID="AdBlockModel.__init__"></a> |
104 <h4>AdBlockModel (Constructor)</h4> |
104 <h4>AdBlockModel (Constructor)</h4> |
105 <b>AdBlockModel</b>(<i>parent = None</i>) |
105 <b>AdBlockModel</b>(<i>parent = None</i>) |
106 <p> |
106 <p> |
107 Constructor |
107 Constructor |
108 </p><dl> |
108 </p><dl> |
109 <dt><i>parent</i></dt> |
109 <dt><i>parent</i></dt> |
110 <dd> |
110 <dd> |
111 reference to the parent object (QObject) |
111 reference to the parent object (QObject) |
112 </dd> |
112 </dd> |
113 </dl><a NAME="AdBlockModel.__rulesChanged" ID="AdBlockModel.__rulesChanged"></a> |
113 </dl><a NAME="AdBlockModel.__rulesChanged" ID="AdBlockModel.__rulesChanged"></a> |
114 <h4>AdBlockModel.__rulesChanged</h4> |
114 <h4>AdBlockModel.__rulesChanged</h4> |
115 <b>__rulesChanged</b>(<i></i>) |
115 <b>__rulesChanged</b>(<i></i>) |
116 <p> |
116 <p> |
117 Private slot to handle changes in rules. |
117 Private slot to handle changes in rules. |
118 </p><a NAME="AdBlockModel.columnCount" ID="AdBlockModel.columnCount"></a> |
118 </p><a NAME="AdBlockModel.columnCount" ID="AdBlockModel.columnCount"></a> |
119 <h4>AdBlockModel.columnCount</h4> |
119 <h4>AdBlockModel.columnCount</h4> |
120 <b>columnCount</b>(<i>parent = QModelIndex()</i>) |
120 <b>columnCount</b>(<i>parent = QModelIndex()</i>) |
121 <p> |
121 <p> |
122 Public method to get the number of columns. |
122 Public method to get the number of columns. |
123 </p><dl> |
123 </p><dl> |
124 <dt><i>parent</i></dt> |
124 <dt><i>parent</i></dt> |
125 <dd> |
125 <dd> |
126 index of parent (QModelIndex) |
126 index of parent (QModelIndex) |
127 </dd> |
127 </dd> |
128 </dl><dl> |
128 </dl><dl> |
129 <dt>Returns:</dt> |
129 <dt>Returns:</dt> |
130 <dd> |
130 <dd> |
131 number of columns (integer) |
131 number of columns (integer) |
132 </dd> |
132 </dd> |
133 </dl><a NAME="AdBlockModel.data" ID="AdBlockModel.data"></a> |
133 </dl><a NAME="AdBlockModel.data" ID="AdBlockModel.data"></a> |
134 <h4>AdBlockModel.data</h4> |
134 <h4>AdBlockModel.data</h4> |
135 <b>data</b>(<i>index, role = Qt.DisplayRole</i>) |
135 <b>data</b>(<i>index, role = Qt.DisplayRole</i>) |
136 <p> |
136 <p> |
137 Public method to get data from the model. |
137 Public method to get data from the model. |
138 </p><dl> |
138 </p><dl> |
139 <dt><i>index</i></dt> |
139 <dt><i>index</i></dt> |
140 <dd> |
140 <dd> |
141 index of bookmark to get data for (QModelIndex) |
141 index of bookmark to get data for (QModelIndex) |
142 </dd><dt><i>role</i></dt> |
142 </dd><dt><i>role</i></dt> |
143 <dd> |
143 <dd> |
144 data role (integer) |
144 data role (integer) |
145 </dd> |
145 </dd> |
146 </dl><dl> |
146 </dl><dl> |
147 <dt>Returns:</dt> |
147 <dt>Returns:</dt> |
148 <dd> |
148 <dd> |
149 bookmark data |
149 bookmark data |
150 </dd> |
150 </dd> |
151 </dl><a NAME="AdBlockModel.flags" ID="AdBlockModel.flags"></a> |
151 </dl><a NAME="AdBlockModel.flags" ID="AdBlockModel.flags"></a> |
152 <h4>AdBlockModel.flags</h4> |
152 <h4>AdBlockModel.flags</h4> |
153 <b>flags</b>(<i>index</i>) |
153 <b>flags</b>(<i>index</i>) |
154 <p> |
154 <p> |
155 Public method to get flags for a node cell. |
155 Public method to get flags for a node cell. |
156 </p><dl> |
156 </p><dl> |
157 <dt><i>index</i></dt> |
157 <dt><i>index</i></dt> |
158 <dd> |
158 <dd> |
159 index of the node cell (QModelIndex) |
159 index of the node cell (QModelIndex) |
160 </dd> |
160 </dd> |
161 </dl><dl> |
161 </dl><dl> |
162 <dt>Returns:</dt> |
162 <dt>Returns:</dt> |
163 <dd> |
163 <dd> |
164 flags (Qt.ItemFlags) |
164 flags (Qt.ItemFlags) |
165 </dd> |
165 </dd> |
166 </dl><a NAME="AdBlockModel.hasChildren" ID="AdBlockModel.hasChildren"></a> |
166 </dl><a NAME="AdBlockModel.hasChildren" ID="AdBlockModel.hasChildren"></a> |
167 <h4>AdBlockModel.hasChildren</h4> |
167 <h4>AdBlockModel.hasChildren</h4> |
168 <b>hasChildren</b>(<i>parent = QModelIndex()</i>) |
168 <b>hasChildren</b>(<i>parent = QModelIndex()</i>) |
169 <p> |
169 <p> |
170 Public method to check, if a parent node has some children. |
170 Public method to check, if a parent node has some children. |
171 </p><dl> |
171 </p><dl> |
172 <dt><i>parent</i></dt> |
172 <dt><i>parent</i></dt> |
173 <dd> |
173 <dd> |
174 index of the parent node (QModelIndex) |
174 index of the parent node (QModelIndex) |
175 </dd> |
175 </dd> |
176 </dl><dl> |
176 </dl><dl> |
177 <dt>Returns:</dt> |
177 <dt>Returns:</dt> |
178 <dd> |
178 <dd> |
179 flag indicating the presence of children (boolean) |
179 flag indicating the presence of children (boolean) |
180 </dd> |
180 </dd> |
181 </dl><a NAME="AdBlockModel.headerData" ID="AdBlockModel.headerData"></a> |
181 </dl><a NAME="AdBlockModel.headerData" ID="AdBlockModel.headerData"></a> |
182 <h4>AdBlockModel.headerData</h4> |
182 <h4>AdBlockModel.headerData</h4> |
183 <b>headerData</b>(<i>section, orientation, role = Qt.DisplayRole</i>) |
183 <b>headerData</b>(<i>section, orientation, role = Qt.DisplayRole</i>) |
184 <p> |
184 <p> |
185 Public method to get the header data. |
185 Public method to get the header data. |
186 </p><dl> |
186 </p><dl> |
187 <dt><i>section</i></dt> |
187 <dt><i>section</i></dt> |
188 <dd> |
188 <dd> |
189 section number (integer) |
189 section number (integer) |
190 </dd><dt><i>orientation</i></dt> |
190 </dd><dt><i>orientation</i></dt> |
191 <dd> |
191 <dd> |
192 header orientation (Qt.Orientation) |
192 header orientation (Qt.Orientation) |
193 </dd><dt><i>role</i></dt> |
193 </dd><dt><i>role</i></dt> |
194 <dd> |
194 <dd> |
195 data role (integer) |
195 data role (integer) |
196 </dd> |
196 </dd> |
197 </dl><dl> |
197 </dl><dl> |
198 <dt>Returns:</dt> |
198 <dt>Returns:</dt> |
199 <dd> |
199 <dd> |
200 header data |
200 header data |
201 </dd> |
201 </dd> |
202 </dl><a NAME="AdBlockModel.index" ID="AdBlockModel.index"></a> |
202 </dl><a NAME="AdBlockModel.index" ID="AdBlockModel.index"></a> |
203 <h4>AdBlockModel.index</h4> |
203 <h4>AdBlockModel.index</h4> |
204 <b>index</b>(<i>row, column, parent = QModelIndex()</i>) |
204 <b>index</b>(<i>row, column, parent = QModelIndex()</i>) |
205 <p> |
205 <p> |
206 Public method to get a model index for a node cell. |
206 Public method to get a model index for a node cell. |
207 </p><dl> |
207 </p><dl> |
208 <dt><i>row</i></dt> |
208 <dt><i>row</i></dt> |
209 <dd> |
209 <dd> |
210 row number (integer) |
210 row number (integer) |
211 </dd><dt><i>column</i></dt> |
211 </dd><dt><i>column</i></dt> |
212 <dd> |
212 <dd> |
213 column number (integer) |
213 column number (integer) |
214 </dd><dt><i>parent</i></dt> |
214 </dd><dt><i>parent</i></dt> |
215 <dd> |
215 <dd> |
216 index of the parent (QModelIndex) |
216 index of the parent (QModelIndex) |
217 </dd> |
217 </dd> |
218 </dl><dl> |
218 </dl><dl> |
219 <dt>Returns:</dt> |
219 <dt>Returns:</dt> |
220 <dd> |
220 <dd> |
221 index (QModelIndex) |
221 index (QModelIndex) |
222 </dd> |
222 </dd> |
223 </dl><a NAME="AdBlockModel.parent" ID="AdBlockModel.parent"></a> |
223 </dl><a NAME="AdBlockModel.parent" ID="AdBlockModel.parent"></a> |
224 <h4>AdBlockModel.parent</h4> |
224 <h4>AdBlockModel.parent</h4> |
225 <b>parent</b>(<i>index = QModelIndex()</i>) |
225 <b>parent</b>(<i>index = QModelIndex()</i>) |
226 <p> |
226 <p> |
227 Public method to get the index of the parent node. |
227 Public method to get the index of the parent node. |
228 </p><dl> |
228 </p><dl> |
229 <dt><i>index</i></dt> |
229 <dt><i>index</i></dt> |
230 <dd> |
230 <dd> |
231 index of the child node (QModelIndex) |
231 index of the child node (QModelIndex) |
232 </dd> |
232 </dd> |
233 </dl><dl> |
233 </dl><dl> |
234 <dt>Returns:</dt> |
234 <dt>Returns:</dt> |
235 <dd> |
235 <dd> |
236 index of the parent node (QModelIndex) |
236 index of the parent node (QModelIndex) |
237 </dd> |
237 </dd> |
238 </dl><a NAME="AdBlockModel.removeRows" ID="AdBlockModel.removeRows"></a> |
238 </dl><a NAME="AdBlockModel.removeRows" ID="AdBlockModel.removeRows"></a> |
239 <h4>AdBlockModel.removeRows</h4> |
239 <h4>AdBlockModel.removeRows</h4> |
240 <b>removeRows</b>(<i>row, count, parent = QModelIndex()</i>) |
240 <b>removeRows</b>(<i>row, count, parent = QModelIndex()</i>) |
241 <p> |
241 <p> |
242 Public method to remove bookmarks from the model. |
242 Public method to remove bookmarks from the model. |
243 </p><dl> |
243 </p><dl> |
244 <dt><i>row</i></dt> |
244 <dt><i>row</i></dt> |
245 <dd> |
245 <dd> |
246 row of the first bookmark to remove (integer) |
246 row of the first bookmark to remove (integer) |
247 </dd><dt><i>count</i></dt> |
247 </dd><dt><i>count</i></dt> |
248 <dd> |
248 <dd> |
249 number of bookmarks to remove (integer) |
249 number of bookmarks to remove (integer) |
250 </dd><dt><i>index</i></dt> |
250 </dd><dt><i>index</i></dt> |
251 <dd> |
251 <dd> |
252 of the parent bookmark node (QModelIndex) |
252 of the parent bookmark node (QModelIndex) |
253 </dd> |
253 </dd> |
254 </dl><dl> |
254 </dl><dl> |
255 <dt>Returns:</dt> |
255 <dt>Returns:</dt> |
256 <dd> |
256 <dd> |
257 flag indicating successful removal (boolean) |
257 flag indicating successful removal (boolean) |
258 </dd> |
258 </dd> |
259 </dl><a NAME="AdBlockModel.rowCount" ID="AdBlockModel.rowCount"></a> |
259 </dl><a NAME="AdBlockModel.rowCount" ID="AdBlockModel.rowCount"></a> |
260 <h4>AdBlockModel.rowCount</h4> |
260 <h4>AdBlockModel.rowCount</h4> |
261 <b>rowCount</b>(<i>parent = QModelIndex()</i>) |
261 <b>rowCount</b>(<i>parent = QModelIndex()</i>) |
262 <p> |
262 <p> |
263 Public method to determine the number of rows. |
263 Public method to determine the number of rows. |
264 </p><dl> |
264 </p><dl> |
265 <dt><i>parent</i></dt> |
265 <dt><i>parent</i></dt> |
266 <dd> |
266 <dd> |
267 index of parent (QModelIndex) |
267 index of parent (QModelIndex) |
268 </dd> |
268 </dd> |
269 </dl><dl> |
269 </dl><dl> |
270 <dt>Returns:</dt> |
270 <dt>Returns:</dt> |
271 <dd> |
271 <dd> |
272 number of rows (integer) |
272 number of rows (integer) |
273 </dd> |
273 </dd> |
274 </dl><a NAME="AdBlockModel.rule" ID="AdBlockModel.rule"></a> |
274 </dl><a NAME="AdBlockModel.rule" ID="AdBlockModel.rule"></a> |
275 <h4>AdBlockModel.rule</h4> |
275 <h4>AdBlockModel.rule</h4> |
276 <b>rule</b>(<i>index</i>) |
276 <b>rule</b>(<i>index</i>) |
277 <p> |
277 <p> |
278 Public method to get the rule given it's index. |
278 Public method to get the rule given it's index. |
279 </p><dl> |
279 </p><dl> |
280 <dt><i>index</i></dt> |
280 <dt><i>index</i></dt> |
281 <dd> |
281 <dd> |
282 index of the rule (QModelIndex) |
282 index of the rule (QModelIndex) |
283 </dd> |
283 </dd> |
284 </dl><dl> |
284 </dl><dl> |
285 <dt>Returns:</dt> |
285 <dt>Returns:</dt> |
286 <dd> |
286 <dd> |
287 reference to the rule (AdBlockRule) |
287 reference to the rule (AdBlockRule) |
288 </dd> |
288 </dd> |
289 </dl><a NAME="AdBlockModel.setData" ID="AdBlockModel.setData"></a> |
289 </dl><a NAME="AdBlockModel.setData" ID="AdBlockModel.setData"></a> |
290 <h4>AdBlockModel.setData</h4> |
290 <h4>AdBlockModel.setData</h4> |
291 <b>setData</b>(<i>index, value, role = Qt.EditRole</i>) |
291 <b>setData</b>(<i>index, value, role = Qt.EditRole</i>) |
292 <p> |
292 <p> |
293 Public method to set the data of a node cell. |
293 Public method to set the data of a node cell. |
294 </p><dl> |
294 </p><dl> |
295 <dt><i>index</i></dt> |
295 <dt><i>index</i></dt> |
296 <dd> |
296 <dd> |
297 index of the node cell (QModelIndex) |
297 index of the node cell (QModelIndex) |
298 </dd><dt><i>value</i></dt> |
298 </dd><dt><i>value</i></dt> |
299 <dd> |
299 <dd> |
300 value to be set |
300 value to be set |
301 </dd><dt><i>role</i></dt> |
301 </dd><dt><i>role</i></dt> |
302 <dd> |
302 <dd> |
303 role of the data (integer) |
303 role of the data (integer) |
304 </dd> |
304 </dd> |
305 </dl><dl> |
305 </dl><dl> |
306 <dt>Returns:</dt> |
306 <dt>Returns:</dt> |
307 <dd> |
307 <dd> |
308 flag indicating success (boolean) |
308 flag indicating success (boolean) |
309 </dd> |
309 </dd> |
310 </dl><a NAME="AdBlockModel.subscription" ID="AdBlockModel.subscription"></a> |
310 </dl><a NAME="AdBlockModel.subscription" ID="AdBlockModel.subscription"></a> |
311 <h4>AdBlockModel.subscription</h4> |
311 <h4>AdBlockModel.subscription</h4> |
312 <b>subscription</b>(<i>index</i>) |
312 <b>subscription</b>(<i>index</i>) |
313 <p> |
313 <p> |
314 Public method to get the subscription given it's index. |
314 Public method to get the subscription given it's index. |
315 </p><dl> |
315 </p><dl> |
316 <dt><i>index</i></dt> |
316 <dt><i>index</i></dt> |
317 <dd> |
317 <dd> |
318 index of the subscription (QModelIndex) |
318 index of the subscription (QModelIndex) |
319 </dd> |
319 </dd> |
320 </dl><dl> |
320 </dl><dl> |
321 <dt>Returns:</dt> |
321 <dt>Returns:</dt> |
322 <dd> |
322 <dd> |
323 reference to the subscription (AdBlockSubscription) |
323 reference to the subscription (AdBlockSubscription) |
324 </dd> |
324 </dd> |
325 </dl><a NAME="AdBlockModel.subscriptionIndex" ID="AdBlockModel.subscriptionIndex"></a> |
325 </dl><a NAME="AdBlockModel.subscriptionIndex" ID="AdBlockModel.subscriptionIndex"></a> |
326 <h4>AdBlockModel.subscriptionIndex</h4> |
326 <h4>AdBlockModel.subscriptionIndex</h4> |
327 <b>subscriptionIndex</b>(<i>subscription</i>) |
327 <b>subscriptionIndex</b>(<i>subscription</i>) |
328 <p> |
328 <p> |
329 Public method to get the index of a subscription. |
329 Public method to get the index of a subscription. |
330 </p><dl> |
330 </p><dl> |
331 <dt><i>subscription</i></dt> |
331 <dt><i>subscription</i></dt> |
332 <dd> |
332 <dd> |
333 reference to the subscription (AdBlockSubscription) |
333 reference to the subscription (AdBlockSubscription) |
334 </dd> |
334 </dd> |
335 </dl><dl> |
335 </dl><dl> |
336 <dt>Returns:</dt> |
336 <dt>Returns:</dt> |
337 <dd> |
337 <dd> |
338 index of the subscription (QModelIndex) |
338 index of the subscription (QModelIndex) |
339 </dd> |
339 </dd> |
340 </dl> |
340 </dl> |
341 <div align="right"><a href="#top">Up</a></div> |
341 <div align="right"><a href="#top">Up</a></div> |
342 <hr /> |
342 <hr /> |
343 </body></html> |
343 </body></html> |