|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' |
|
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> |
|
4 <html><head> |
|
5 <title>eric4.Helpviewer.AdBlock.AdBlockModel</title> |
|
6 <style> |
|
7 body { |
|
8 background:white; |
|
9 margin: 0em 1em 10em 1em; |
|
10 color: black; |
|
11 } |
|
12 |
|
13 h1 { color: white; background: #4FA4FF; } |
|
14 h2 { color: white; background: #4FA4FF; } |
|
15 h3 { color: white; background: #00557F; } |
|
16 h4 { color: white; background: #00557F; } |
|
17 |
|
18 a { color: #AA5500; } |
|
19 |
|
20 </style> |
|
21 </head> |
|
22 <body><a NAME="top" ID="top"></a> |
|
23 <h1>eric4.Helpviewer.AdBlock.AdBlockModel</h1> |
|
24 <p> |
|
25 Module implementing a model for the AdBlock dialog. |
|
26 </p> |
|
27 <h3>Global Attributes</h3> |
|
28 <table> |
|
29 <tr><td>None</td></tr> |
|
30 </table> |
|
31 <h3>Classes</h3> |
|
32 <table> |
|
33 <tr> |
|
34 <td><a href="#AdBlockModel">AdBlockModel</a></td> |
|
35 <td>Class implementing a model for the AdBlock dialog.</td> |
|
36 </tr> |
|
37 </table> |
|
38 <h3>Functions</h3> |
|
39 <table> |
|
40 <tr><td>None</td></tr> |
|
41 </table> |
|
42 <hr /><hr /> |
|
43 <a NAME="AdBlockModel" ID="AdBlockModel"></a> |
|
44 <h2>AdBlockModel</h2> |
|
45 <p> |
|
46 Class implementing a model for the AdBlock dialog. |
|
47 </p> |
|
48 <h3>Derived from</h3> |
|
49 QAbstractItemModel |
|
50 <h3>Class Attributes</h3> |
|
51 <table> |
|
52 <tr><td>None</td></tr> |
|
53 </table> |
|
54 <h3>Methods</h3> |
|
55 <table> |
|
56 <tr> |
|
57 <td><a href="#AdBlockModel.__init__">AdBlockModel</a></td> |
|
58 <td>Constructor</td> |
|
59 </tr><tr> |
|
60 <td><a href="#AdBlockModel.__rulesChanged">__rulesChanged</a></td> |
|
61 <td>Private slot to handle changes in rules.</td> |
|
62 </tr><tr> |
|
63 <td><a href="#AdBlockModel.columnCount">columnCount</a></td> |
|
64 <td>Public method to get the number of columns.</td> |
|
65 </tr><tr> |
|
66 <td><a href="#AdBlockModel.data">data</a></td> |
|
67 <td>Public method to get data from the model.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#AdBlockModel.flags">flags</a></td> |
|
70 <td>Public method to get flags for a node cell.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#AdBlockModel.hasChildren">hasChildren</a></td> |
|
73 <td>Public method to check, if a parent node has some children.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#AdBlockModel.headerData">headerData</a></td> |
|
76 <td>Public method to get the header data.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#AdBlockModel.index">index</a></td> |
|
79 <td>Public method to get a model index for a node cell.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#AdBlockModel.parent">parent</a></td> |
|
82 <td>Public method to get the index of the parent node.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#AdBlockModel.removeRows">removeRows</a></td> |
|
85 <td>Public method to remove bookmarks from the model.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#AdBlockModel.rowCount">rowCount</a></td> |
|
88 <td>Public method to determine the number of rows.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#AdBlockModel.rule">rule</a></td> |
|
91 <td>Public method to get the rule given it's index.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#AdBlockModel.setData">setData</a></td> |
|
94 <td>Public method to set the data of a node cell.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#AdBlockModel.subscription">subscription</a></td> |
|
97 <td>Public method to get the subscription given it's index.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#AdBlockModel.subscriptionIndex">subscriptionIndex</a></td> |
|
100 <td>Public method to get the index of a subscription.</td> |
|
101 </tr> |
|
102 </table> |
|
103 <a NAME="AdBlockModel.__init__" ID="AdBlockModel.__init__"></a> |
|
104 <h4>AdBlockModel (Constructor)</h4> |
|
105 <b>AdBlockModel</b>(<i>parent = None</i>) |
|
106 <p> |
|
107 Constructor |
|
108 </p><dl> |
|
109 <dt><i>parent</i></dt> |
|
110 <dd> |
|
111 reference to the parent object (QObject) |
|
112 </dd> |
|
113 </dl><a NAME="AdBlockModel.__rulesChanged" ID="AdBlockModel.__rulesChanged"></a> |
|
114 <h4>AdBlockModel.__rulesChanged</h4> |
|
115 <b>__rulesChanged</b>(<i></i>) |
|
116 <p> |
|
117 Private slot to handle changes in rules. |
|
118 </p><a NAME="AdBlockModel.columnCount" ID="AdBlockModel.columnCount"></a> |
|
119 <h4>AdBlockModel.columnCount</h4> |
|
120 <b>columnCount</b>(<i>parent = QModelIndex()</i>) |
|
121 <p> |
|
122 Public method to get the number of columns. |
|
123 </p><dl> |
|
124 <dt><i>parent</i></dt> |
|
125 <dd> |
|
126 index of parent (QModelIndex) |
|
127 </dd> |
|
128 </dl><dl> |
|
129 <dt>Returns:</dt> |
|
130 <dd> |
|
131 number of columns (integer) |
|
132 </dd> |
|
133 </dl><a NAME="AdBlockModel.data" ID="AdBlockModel.data"></a> |
|
134 <h4>AdBlockModel.data</h4> |
|
135 <b>data</b>(<i>index, role = Qt.DisplayRole</i>) |
|
136 <p> |
|
137 Public method to get data from the model. |
|
138 </p><dl> |
|
139 <dt><i>index</i></dt> |
|
140 <dd> |
|
141 index of bookmark to get data for (QModelIndex) |
|
142 </dd><dt><i>role</i></dt> |
|
143 <dd> |
|
144 data role (integer) |
|
145 </dd> |
|
146 </dl><dl> |
|
147 <dt>Returns:</dt> |
|
148 <dd> |
|
149 bookmark data (QVariant) |
|
150 </dd> |
|
151 </dl><a NAME="AdBlockModel.flags" ID="AdBlockModel.flags"></a> |
|
152 <h4>AdBlockModel.flags</h4> |
|
153 <b>flags</b>(<i>index</i>) |
|
154 <p> |
|
155 Public method to get flags for a node cell. |
|
156 </p><dl> |
|
157 <dt><i>index</i></dt> |
|
158 <dd> |
|
159 index of the node cell (QModelIndex) |
|
160 </dd> |
|
161 </dl><dl> |
|
162 <dt>Returns:</dt> |
|
163 <dd> |
|
164 flags (Qt.ItemFlags) |
|
165 </dd> |
|
166 </dl><a NAME="AdBlockModel.hasChildren" ID="AdBlockModel.hasChildren"></a> |
|
167 <h4>AdBlockModel.hasChildren</h4> |
|
168 <b>hasChildren</b>(<i>parent = QModelIndex()</i>) |
|
169 <p> |
|
170 Public method to check, if a parent node has some children. |
|
171 </p><dl> |
|
172 <dt><i>parent</i></dt> |
|
173 <dd> |
|
174 index of the parent node (QModelIndex) |
|
175 </dd> |
|
176 </dl><dl> |
|
177 <dt>Returns:</dt> |
|
178 <dd> |
|
179 flag indicating the presence of children (boolean) |
|
180 </dd> |
|
181 </dl><a NAME="AdBlockModel.headerData" ID="AdBlockModel.headerData"></a> |
|
182 <h4>AdBlockModel.headerData</h4> |
|
183 <b>headerData</b>(<i>section, orientation, role = Qt.DisplayRole</i>) |
|
184 <p> |
|
185 Public method to get the header data. |
|
186 </p><dl> |
|
187 <dt><i>section</i></dt> |
|
188 <dd> |
|
189 section number (integer) |
|
190 </dd><dt><i>orientation</i></dt> |
|
191 <dd> |
|
192 header orientation (Qt.Orientation) |
|
193 </dd><dt><i>role</i></dt> |
|
194 <dd> |
|
195 data role (integer) |
|
196 </dd> |
|
197 </dl><dl> |
|
198 <dt>Returns:</dt> |
|
199 <dd> |
|
200 header data (QVariant) |
|
201 </dd> |
|
202 </dl><a NAME="AdBlockModel.index" ID="AdBlockModel.index"></a> |
|
203 <h4>AdBlockModel.index</h4> |
|
204 <b>index</b>(<i>row, column, parent = QModelIndex()</i>) |
|
205 <p> |
|
206 Public method to get a model index for a node cell. |
|
207 </p><dl> |
|
208 <dt><i>row</i></dt> |
|
209 <dd> |
|
210 row number (integer) |
|
211 </dd><dt><i>column</i></dt> |
|
212 <dd> |
|
213 column number (integer) |
|
214 </dd><dt><i>parent</i></dt> |
|
215 <dd> |
|
216 index of the parent (QModelIndex) |
|
217 </dd> |
|
218 </dl><dl> |
|
219 <dt>Returns:</dt> |
|
220 <dd> |
|
221 index (QModelIndex) |
|
222 </dd> |
|
223 </dl><a NAME="AdBlockModel.parent" ID="AdBlockModel.parent"></a> |
|
224 <h4>AdBlockModel.parent</h4> |
|
225 <b>parent</b>(<i>index = QModelIndex()</i>) |
|
226 <p> |
|
227 Public method to get the index of the parent node. |
|
228 </p><dl> |
|
229 <dt><i>index</i></dt> |
|
230 <dd> |
|
231 index of the child node (QModelIndex) |
|
232 </dd> |
|
233 </dl><dl> |
|
234 <dt>Returns:</dt> |
|
235 <dd> |
|
236 index of the parent node (QModelIndex) |
|
237 </dd> |
|
238 </dl><a NAME="AdBlockModel.removeRows" ID="AdBlockModel.removeRows"></a> |
|
239 <h4>AdBlockModel.removeRows</h4> |
|
240 <b>removeRows</b>(<i>row, count, parent = QModelIndex()</i>) |
|
241 <p> |
|
242 Public method to remove bookmarks from the model. |
|
243 </p><dl> |
|
244 <dt><i>row</i></dt> |
|
245 <dd> |
|
246 row of the first bookmark to remove (integer) |
|
247 </dd><dt><i>count</i></dt> |
|
248 <dd> |
|
249 number of bookmarks to remove (integer) |
|
250 </dd><dt><i>index</i></dt> |
|
251 <dd> |
|
252 of the parent bookmark node (QModelIndex) |
|
253 </dd> |
|
254 </dl><dl> |
|
255 <dt>Returns:</dt> |
|
256 <dd> |
|
257 flag indicating successful removal (boolean) |
|
258 </dd> |
|
259 </dl><a NAME="AdBlockModel.rowCount" ID="AdBlockModel.rowCount"></a> |
|
260 <h4>AdBlockModel.rowCount</h4> |
|
261 <b>rowCount</b>(<i>parent = QModelIndex()</i>) |
|
262 <p> |
|
263 Public method to determine the number of rows. |
|
264 </p><dl> |
|
265 <dt><i>parent</i></dt> |
|
266 <dd> |
|
267 index of parent (QModelIndex) |
|
268 </dd> |
|
269 </dl><dl> |
|
270 <dt>Returns:</dt> |
|
271 <dd> |
|
272 number of rows (integer) |
|
273 </dd> |
|
274 </dl><a NAME="AdBlockModel.rule" ID="AdBlockModel.rule"></a> |
|
275 <h4>AdBlockModel.rule</h4> |
|
276 <b>rule</b>(<i>index</i>) |
|
277 <p> |
|
278 Public method to get the rule given it's index. |
|
279 </p><dl> |
|
280 <dt><i>index</i></dt> |
|
281 <dd> |
|
282 index of the rule (QModelIndex) |
|
283 </dd> |
|
284 </dl><dl> |
|
285 <dt>Returns:</dt> |
|
286 <dd> |
|
287 reference to the rule (AdBlockRule) |
|
288 </dd> |
|
289 </dl><a NAME="AdBlockModel.setData" ID="AdBlockModel.setData"></a> |
|
290 <h4>AdBlockModel.setData</h4> |
|
291 <b>setData</b>(<i>index, value, role = Qt.EditRole</i>) |
|
292 <p> |
|
293 Public method to set the data of a node cell. |
|
294 </p><dl> |
|
295 <dt><i>index</i></dt> |
|
296 <dd> |
|
297 index of the node cell (QModelIndex) |
|
298 </dd><dt><i>value</i></dt> |
|
299 <dd> |
|
300 value to be set (QVariant) |
|
301 </dd><dt><i>role</i></dt> |
|
302 <dd> |
|
303 role of the data (integer) |
|
304 </dd> |
|
305 </dl><dl> |
|
306 <dt>Returns:</dt> |
|
307 <dd> |
|
308 flag indicating success (boolean) |
|
309 </dd> |
|
310 </dl><a NAME="AdBlockModel.subscription" ID="AdBlockModel.subscription"></a> |
|
311 <h4>AdBlockModel.subscription</h4> |
|
312 <b>subscription</b>(<i>index</i>) |
|
313 <p> |
|
314 Public method to get the subscription given it's index. |
|
315 </p><dl> |
|
316 <dt><i>index</i></dt> |
|
317 <dd> |
|
318 index of the subscription (QModelIndex) |
|
319 </dd> |
|
320 </dl><dl> |
|
321 <dt>Returns:</dt> |
|
322 <dd> |
|
323 reference to the subscription (AdBlockSubscription) |
|
324 </dd> |
|
325 </dl><a NAME="AdBlockModel.subscriptionIndex" ID="AdBlockModel.subscriptionIndex"></a> |
|
326 <h4>AdBlockModel.subscriptionIndex</h4> |
|
327 <b>subscriptionIndex</b>(<i>subscription</i>) |
|
328 <p> |
|
329 Public method to get the index of a subscription. |
|
330 </p><dl> |
|
331 <dt><i>subscription</i></dt> |
|
332 <dd> |
|
333 reference to the subscription (AdBlockSubscription) |
|
334 </dd> |
|
335 </dl><dl> |
|
336 <dt>Returns:</dt> |
|
337 <dd> |
|
338 index of the subscription (QModelIndex) |
|
339 </dd> |
|
340 </dl> |
|
341 <div align="right"><a href="#top">Up</a></div> |
|
342 <hr /> |
|
343 </body></html> |