|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.WebBrowser.OpenSearch.OpenSearchEngineModel</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> |
|
22 <a NAME="top" ID="top"></a> |
|
23 <h1>eric7.WebBrowser.OpenSearch.OpenSearchEngineModel</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing a model for search engines. |
|
27 </p> |
|
28 <h3>Global Attributes</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <h3>Classes</h3> |
|
34 |
|
35 <table> |
|
36 |
|
37 <tr> |
|
38 <td><a href="#OpenSearchEngineModel">OpenSearchEngineModel</a></td> |
|
39 <td>Class implementing a model for search engines.</td> |
|
40 </tr> |
|
41 </table> |
|
42 <h3>Functions</h3> |
|
43 |
|
44 <table> |
|
45 <tr><td>None</td></tr> |
|
46 </table> |
|
47 <hr /> |
|
48 <hr /> |
|
49 <a NAME="OpenSearchEngineModel" ID="OpenSearchEngineModel"></a> |
|
50 <h2>OpenSearchEngineModel</h2> |
|
51 |
|
52 <p> |
|
53 Class implementing a model for search engines. |
|
54 </p> |
|
55 <h3>Derived from</h3> |
|
56 QAbstractTableModel |
|
57 <h3>Class Attributes</h3> |
|
58 |
|
59 <table> |
|
60 <tr><td>None</td></tr> |
|
61 </table> |
|
62 <h3>Class Methods</h3> |
|
63 |
|
64 <table> |
|
65 <tr><td>None</td></tr> |
|
66 </table> |
|
67 <h3>Methods</h3> |
|
68 |
|
69 <table> |
|
70 |
|
71 <tr> |
|
72 <td><a href="#OpenSearchEngineModel.__init__">OpenSearchEngineModel</a></td> |
|
73 <td>Constructor</td> |
|
74 </tr> |
|
75 <tr> |
|
76 <td><a href="#OpenSearchEngineModel.__enginesChanged">__enginesChanged</a></td> |
|
77 <td>Private slot handling a change of the registered engines.</td> |
|
78 </tr> |
|
79 <tr> |
|
80 <td><a href="#OpenSearchEngineModel.columnCount">columnCount</a></td> |
|
81 <td>Public method to get the number of columns of the model.</td> |
|
82 </tr> |
|
83 <tr> |
|
84 <td><a href="#OpenSearchEngineModel.data">data</a></td> |
|
85 <td>Public method to get data from the model.</td> |
|
86 </tr> |
|
87 <tr> |
|
88 <td><a href="#OpenSearchEngineModel.flags">flags</a></td> |
|
89 <td>Public method to get flags for a model cell.</td> |
|
90 </tr> |
|
91 <tr> |
|
92 <td><a href="#OpenSearchEngineModel.headerData">headerData</a></td> |
|
93 <td>Public method to get the header data.</td> |
|
94 </tr> |
|
95 <tr> |
|
96 <td><a href="#OpenSearchEngineModel.removeRows">removeRows</a></td> |
|
97 <td>Public method to remove entries from the model.</td> |
|
98 </tr> |
|
99 <tr> |
|
100 <td><a href="#OpenSearchEngineModel.rowCount">rowCount</a></td> |
|
101 <td>Public method to get the number of rows of the model.</td> |
|
102 </tr> |
|
103 <tr> |
|
104 <td><a href="#OpenSearchEngineModel.setData">setData</a></td> |
|
105 <td>Public method to set the data of a model cell.</td> |
|
106 </tr> |
|
107 </table> |
|
108 <h3>Static Methods</h3> |
|
109 |
|
110 <table> |
|
111 <tr><td>None</td></tr> |
|
112 </table> |
|
113 |
|
114 <a NAME="OpenSearchEngineModel.__init__" ID="OpenSearchEngineModel.__init__"></a> |
|
115 <h4>OpenSearchEngineModel (Constructor)</h4> |
|
116 <b>OpenSearchEngineModel</b>(<i>manager, parent=None</i>) |
|
117 |
|
118 <p> |
|
119 Constructor |
|
120 </p> |
|
121 <dl> |
|
122 |
|
123 <dt><i>manager</i></dt> |
|
124 <dd> |
|
125 reference to the search engine manager |
|
126 (OpenSearchManager) |
|
127 </dd> |
|
128 <dt><i>parent</i></dt> |
|
129 <dd> |
|
130 reference to the parent object (QObject) |
|
131 </dd> |
|
132 </dl> |
|
133 <a NAME="OpenSearchEngineModel.__enginesChanged" ID="OpenSearchEngineModel.__enginesChanged"></a> |
|
134 <h4>OpenSearchEngineModel.__enginesChanged</h4> |
|
135 <b>__enginesChanged</b>(<i></i>) |
|
136 |
|
137 <p> |
|
138 Private slot handling a change of the registered engines. |
|
139 </p> |
|
140 <a NAME="OpenSearchEngineModel.columnCount" ID="OpenSearchEngineModel.columnCount"></a> |
|
141 <h4>OpenSearchEngineModel.columnCount</h4> |
|
142 <b>columnCount</b>(<i>parent=None</i>) |
|
143 |
|
144 <p> |
|
145 Public method to get the number of columns of the model. |
|
146 </p> |
|
147 <dl> |
|
148 |
|
149 <dt><i>parent</i></dt> |
|
150 <dd> |
|
151 parent index (QModelIndex) (Unused) |
|
152 </dd> |
|
153 </dl> |
|
154 <dl> |
|
155 <dt>Return:</dt> |
|
156 <dd> |
|
157 number of columns (integer) |
|
158 </dd> |
|
159 </dl> |
|
160 <a NAME="OpenSearchEngineModel.data" ID="OpenSearchEngineModel.data"></a> |
|
161 <h4>OpenSearchEngineModel.data</h4> |
|
162 <b>data</b>(<i>index, role</i>) |
|
163 |
|
164 <p> |
|
165 Public method to get data from the model. |
|
166 </p> |
|
167 <dl> |
|
168 |
|
169 <dt><i>index</i></dt> |
|
170 <dd> |
|
171 index to get data for (QModelIndex) |
|
172 </dd> |
|
173 <dt><i>role</i></dt> |
|
174 <dd> |
|
175 role of the data to retrieve (integer) |
|
176 </dd> |
|
177 </dl> |
|
178 <dl> |
|
179 <dt>Return:</dt> |
|
180 <dd> |
|
181 requested data |
|
182 </dd> |
|
183 </dl> |
|
184 <a NAME="OpenSearchEngineModel.flags" ID="OpenSearchEngineModel.flags"></a> |
|
185 <h4>OpenSearchEngineModel.flags</h4> |
|
186 <b>flags</b>(<i>index</i>) |
|
187 |
|
188 <p> |
|
189 Public method to get flags for a model cell. |
|
190 </p> |
|
191 <dl> |
|
192 |
|
193 <dt><i>index</i></dt> |
|
194 <dd> |
|
195 index of the model cell (QModelIndex) |
|
196 </dd> |
|
197 </dl> |
|
198 <dl> |
|
199 <dt>Return:</dt> |
|
200 <dd> |
|
201 flags (Qt.ItemFlags) |
|
202 </dd> |
|
203 </dl> |
|
204 <a NAME="OpenSearchEngineModel.headerData" ID="OpenSearchEngineModel.headerData"></a> |
|
205 <h4>OpenSearchEngineModel.headerData</h4> |
|
206 <b>headerData</b>(<i>section, orientation, role=Qt.ItemDataRole.DisplayRole</i>) |
|
207 |
|
208 <p> |
|
209 Public method to get the header data. |
|
210 </p> |
|
211 <dl> |
|
212 |
|
213 <dt><i>section</i></dt> |
|
214 <dd> |
|
215 section number (integer) |
|
216 </dd> |
|
217 <dt><i>orientation</i></dt> |
|
218 <dd> |
|
219 header orientation (Qt.Orientation) |
|
220 </dd> |
|
221 <dt><i>role</i></dt> |
|
222 <dd> |
|
223 data role (Qt.ItemDataRole) |
|
224 </dd> |
|
225 </dl> |
|
226 <dl> |
|
227 <dt>Return:</dt> |
|
228 <dd> |
|
229 header data |
|
230 </dd> |
|
231 </dl> |
|
232 <a NAME="OpenSearchEngineModel.removeRows" ID="OpenSearchEngineModel.removeRows"></a> |
|
233 <h4>OpenSearchEngineModel.removeRows</h4> |
|
234 <b>removeRows</b>(<i>row, count, parent=None</i>) |
|
235 |
|
236 <p> |
|
237 Public method to remove entries from the model. |
|
238 </p> |
|
239 <dl> |
|
240 |
|
241 <dt><i>row</i></dt> |
|
242 <dd> |
|
243 start row (integer) |
|
244 </dd> |
|
245 <dt><i>count</i></dt> |
|
246 <dd> |
|
247 number of rows to remove (integer) |
|
248 </dd> |
|
249 <dt><i>parent</i></dt> |
|
250 <dd> |
|
251 parent index (QModelIndex) |
|
252 </dd> |
|
253 </dl> |
|
254 <dl> |
|
255 <dt>Return:</dt> |
|
256 <dd> |
|
257 flag indicating success (boolean) |
|
258 </dd> |
|
259 </dl> |
|
260 <a NAME="OpenSearchEngineModel.rowCount" ID="OpenSearchEngineModel.rowCount"></a> |
|
261 <h4>OpenSearchEngineModel.rowCount</h4> |
|
262 <b>rowCount</b>(<i>parent=None</i>) |
|
263 |
|
264 <p> |
|
265 Public method to get the number of rows of the model. |
|
266 </p> |
|
267 <dl> |
|
268 |
|
269 <dt><i>parent</i></dt> |
|
270 <dd> |
|
271 parent index (QModelIndex) |
|
272 </dd> |
|
273 </dl> |
|
274 <dl> |
|
275 <dt>Return:</dt> |
|
276 <dd> |
|
277 number of rows (integer) |
|
278 </dd> |
|
279 </dl> |
|
280 <a NAME="OpenSearchEngineModel.setData" ID="OpenSearchEngineModel.setData"></a> |
|
281 <h4>OpenSearchEngineModel.setData</h4> |
|
282 <b>setData</b>(<i>index, value, role=Qt.ItemDataRole.EditRole</i>) |
|
283 |
|
284 <p> |
|
285 Public method to set the data of a model cell. |
|
286 </p> |
|
287 <dl> |
|
288 |
|
289 <dt><i>index</i></dt> |
|
290 <dd> |
|
291 index of the model cell (QModelIndex) |
|
292 </dd> |
|
293 <dt><i>value</i></dt> |
|
294 <dd> |
|
295 value to be set |
|
296 </dd> |
|
297 <dt><i>role</i></dt> |
|
298 <dd> |
|
299 role of the data (integer) |
|
300 </dd> |
|
301 </dl> |
|
302 <dl> |
|
303 <dt>Return:</dt> |
|
304 <dd> |
|
305 flag indicating success (boolean) |
|
306 </dd> |
|
307 </dl> |
|
308 <div align="right"><a href="#top">Up</a></div> |
|
309 <hr /> |
|
310 </body></html> |