Documentation/Source/eric5.Helpviewer.AdBlock.AdBlockModel.html

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

eric ide

mercurial