|
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.E4Network.E4NetworkMonitor</title> |
|
6 <style> |
|
7 b'body {\n background:white;\n margin: 0em 1em 10em 1em;\n color: black;\n}\n\nh1 { color: white; background: #4FA4FF; }\nh2 { color: white; background: #4FA4FF; }\nh3 { color: white; background: #00557F; }\nh4 { color: white; background: #00557F; }\n \na { color: #AA5500; }\n' |
|
8 </style> |
|
9 </head> |
|
10 <body><a NAME="top" ID="top"></a> |
|
11 <h1>eric5.E4Network.E4NetworkMonitor</h1> |
|
12 <p> |
|
13 Module implementing a network monitor dialog. |
|
14 </p> |
|
15 <h3>Global Attributes</h3> |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 <table> |
|
21 <tr> |
|
22 <td><a href="#E4NetworkMonitor">E4NetworkMonitor</a></td> |
|
23 <td>Class implementing a network monitor dialog.</td> |
|
24 </tr><tr> |
|
25 <td><a href="#E4NetworkRequest">E4NetworkRequest</a></td> |
|
26 <td>Class for storing all data related to a specific request.</td> |
|
27 </tr><tr> |
|
28 <td><a href="#E4RequestModel">E4RequestModel</a></td> |
|
29 <td>Class implementing a model storing request objects.</td> |
|
30 </tr> |
|
31 </table> |
|
32 <h3>Functions</h3> |
|
33 <table> |
|
34 <tr><td>None</td></tr> |
|
35 </table> |
|
36 <hr /><hr /> |
|
37 <a NAME="E4NetworkMonitor" ID="E4NetworkMonitor"></a> |
|
38 <h2>E4NetworkMonitor</h2> |
|
39 <p> |
|
40 Class implementing a network monitor dialog. |
|
41 </p> |
|
42 <h3>Derived from</h3> |
|
43 QDialog, Ui_E4NetworkMonitor |
|
44 <h3>Class Attributes</h3> |
|
45 <table> |
|
46 <tr><td>_monitor</td></tr> |
|
47 </table> |
|
48 <h3>Methods</h3> |
|
49 <table> |
|
50 <tr> |
|
51 <td><a href="#E4NetworkMonitor.__init__">E4NetworkMonitor</a></td> |
|
52 <td>Constructor</td> |
|
53 </tr><tr> |
|
54 <td><a href="#E4NetworkMonitor.__currentChanged">__currentChanged</a></td> |
|
55 <td>Private slot to handle a change of the current index.</td> |
|
56 </tr><tr> |
|
57 <td><a href="#E4NetworkMonitor.__showHeaderDetails">__showHeaderDetails</a></td> |
|
58 <td>Private slot to show a dialog with the header details.</td> |
|
59 </tr><tr> |
|
60 <td><a href="#E4NetworkMonitor.closeEvent">closeEvent</a></td> |
|
61 <td>Protected method called upon closing the dialog.</td> |
|
62 </tr><tr> |
|
63 <td><a href="#E4NetworkMonitor.closeMonitor">closeMonitor</a></td> |
|
64 <td>Class method to close the monitor dialog.</td> |
|
65 </tr><tr> |
|
66 <td><a href="#E4NetworkMonitor.instance">instance</a></td> |
|
67 <td>Class method to get a reference to our singleton.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#E4NetworkMonitor.reject">reject</a></td> |
|
70 <td>Public slot to close the dialog with a Reject status.</td> |
|
71 </tr> |
|
72 </table> |
|
73 <a NAME="E4NetworkMonitor.__init__" ID="E4NetworkMonitor.__init__"></a> |
|
74 <h4>E4NetworkMonitor (Constructor)</h4> |
|
75 <b>E4NetworkMonitor</b>(<i>networkAccessManager, parent = None</i>) |
|
76 <p> |
|
77 Constructor |
|
78 </p><dl> |
|
79 <dt><i>networkAccessManager</i></dt> |
|
80 <dd> |
|
81 reference to the network access manager |
|
82 (QNetworkAccessManager) |
|
83 </dd><dt><i>parent</i></dt> |
|
84 <dd> |
|
85 reference to the parent widget (QWidget) |
|
86 </dd> |
|
87 </dl><a NAME="E4NetworkMonitor.__currentChanged" ID="E4NetworkMonitor.__currentChanged"></a> |
|
88 <h4>E4NetworkMonitor.__currentChanged</h4> |
|
89 <b>__currentChanged</b>(<i>current, previous</i>) |
|
90 <p> |
|
91 Private slot to handle a change of the current index. |
|
92 </p><dl> |
|
93 <dt><i>current</i></dt> |
|
94 <dd> |
|
95 new current index (QModelIndex) |
|
96 </dd><dt><i>previous</i></dt> |
|
97 <dd> |
|
98 old current index (QModelIndex) |
|
99 </dd> |
|
100 </dl><a NAME="E4NetworkMonitor.__showHeaderDetails" ID="E4NetworkMonitor.__showHeaderDetails"></a> |
|
101 <h4>E4NetworkMonitor.__showHeaderDetails</h4> |
|
102 <b>__showHeaderDetails</b>(<i>index</i>) |
|
103 <p> |
|
104 Private slot to show a dialog with the header details. |
|
105 </p><dl> |
|
106 <dt><i>index</i></dt> |
|
107 <dd> |
|
108 index of the entry to show (QModelIndex) |
|
109 </dd> |
|
110 </dl><a NAME="E4NetworkMonitor.closeEvent" ID="E4NetworkMonitor.closeEvent"></a> |
|
111 <h4>E4NetworkMonitor.closeEvent</h4> |
|
112 <b>closeEvent</b>(<i>evt</i>) |
|
113 <p> |
|
114 Protected method called upon closing the dialog. |
|
115 </p><dl> |
|
116 <dt><i>evt</i></dt> |
|
117 <dd> |
|
118 reference to the close event object (QCloseEvent) |
|
119 </dd> |
|
120 </dl><a NAME="E4NetworkMonitor.closeMonitor" ID="E4NetworkMonitor.closeMonitor"></a> |
|
121 <h4>E4NetworkMonitor.closeMonitor</h4> |
|
122 <b>closeMonitor</b>(<i></i>) |
|
123 <p> |
|
124 Class method to close the monitor dialog. |
|
125 </p><a NAME="E4NetworkMonitor.instance" ID="E4NetworkMonitor.instance"></a> |
|
126 <h4>E4NetworkMonitor.instance</h4> |
|
127 <b>instance</b>(<i>networkAccessManager</i>) |
|
128 <p> |
|
129 Class method to get a reference to our singleton. |
|
130 </p><dl> |
|
131 <dt><i>networkAccessManager</i></dt> |
|
132 <dd> |
|
133 reference to the network access manager |
|
134 (QNetworkAccessManager) |
|
135 </dd> |
|
136 </dl><a NAME="E4NetworkMonitor.reject" ID="E4NetworkMonitor.reject"></a> |
|
137 <h4>E4NetworkMonitor.reject</h4> |
|
138 <b>reject</b>(<i></i>) |
|
139 <p> |
|
140 Public slot to close the dialog with a Reject status. |
|
141 </p> |
|
142 <div align="right"><a href="#top">Up</a></div> |
|
143 <hr /><hr /> |
|
144 <a NAME="E4NetworkRequest" ID="E4NetworkRequest"></a> |
|
145 <h2>E4NetworkRequest</h2> |
|
146 <p> |
|
147 Class for storing all data related to a specific request. |
|
148 </p> |
|
149 <h3>Derived from</h3> |
|
150 object |
|
151 <h3>Class Attributes</h3> |
|
152 <table> |
|
153 <tr><td>None</td></tr> |
|
154 </table> |
|
155 <h3>Methods</h3> |
|
156 <table> |
|
157 <tr> |
|
158 <td><a href="#E4NetworkRequest.__init__">E4NetworkRequest</a></td> |
|
159 <td>Constructor</td> |
|
160 </tr> |
|
161 </table> |
|
162 <a NAME="E4NetworkRequest.__init__" ID="E4NetworkRequest.__init__"></a> |
|
163 <h4>E4NetworkRequest (Constructor)</h4> |
|
164 <b>E4NetworkRequest</b>(<i></i>) |
|
165 <p> |
|
166 Constructor |
|
167 </p> |
|
168 <div align="right"><a href="#top">Up</a></div> |
|
169 <hr /><hr /> |
|
170 <a NAME="E4RequestModel" ID="E4RequestModel"></a> |
|
171 <h2>E4RequestModel</h2> |
|
172 <p> |
|
173 Class implementing a model storing request objects. |
|
174 </p> |
|
175 <h3>Derived from</h3> |
|
176 QAbstractTableModel |
|
177 <h3>Class Attributes</h3> |
|
178 <table> |
|
179 <tr><td>None</td></tr> |
|
180 </table> |
|
181 <h3>Methods</h3> |
|
182 <table> |
|
183 <tr> |
|
184 <td><a href="#E4RequestModel.__init__">E4RequestModel</a></td> |
|
185 <td>Constructor</td> |
|
186 </tr><tr> |
|
187 <td><a href="#E4RequestModel.__addReply">__addReply</a></td> |
|
188 <td>Private slot to add the reply data to the model.</td> |
|
189 </tr><tr> |
|
190 <td><a href="#E4RequestModel.__addRequest">__addRequest</a></td> |
|
191 <td>Private method to add a request object to the model.</td> |
|
192 </tr><tr> |
|
193 <td><a href="#E4RequestModel.__requestCreated">__requestCreated</a></td> |
|
194 <td>Private slot handling the creation of a network request.</td> |
|
195 </tr><tr> |
|
196 <td><a href="#E4RequestModel.columnCount">columnCount</a></td> |
|
197 <td>Public method to get the number of columns of the model.</td> |
|
198 </tr><tr> |
|
199 <td><a href="#E4RequestModel.data">data</a></td> |
|
200 <td>Public method to get data from the model.</td> |
|
201 </tr><tr> |
|
202 <td><a href="#E4RequestModel.headerData">headerData</a></td> |
|
203 <td>Public method to get header data from the model.</td> |
|
204 </tr><tr> |
|
205 <td><a href="#E4RequestModel.removeRows">removeRows</a></td> |
|
206 <td>Public method to remove entries from the model.</td> |
|
207 </tr><tr> |
|
208 <td><a href="#E4RequestModel.rowCount">rowCount</a></td> |
|
209 <td>Public method to get the number of rows of the model.</td> |
|
210 </tr> |
|
211 </table> |
|
212 <a NAME="E4RequestModel.__init__" ID="E4RequestModel.__init__"></a> |
|
213 <h4>E4RequestModel (Constructor)</h4> |
|
214 <b>E4RequestModel</b>(<i>networkAccessManager, parent = None</i>) |
|
215 <p> |
|
216 Constructor |
|
217 </p><dl> |
|
218 <dt><i>networkAccessManager</i></dt> |
|
219 <dd> |
|
220 reference to the network access manager |
|
221 (QNetworkAccessManager) |
|
222 </dd><dt><i>parent</i></dt> |
|
223 <dd> |
|
224 reference to the parent object (QObject) |
|
225 </dd> |
|
226 </dl><a NAME="E4RequestModel.__addReply" ID="E4RequestModel.__addReply"></a> |
|
227 <h4>E4RequestModel.__addReply</h4> |
|
228 <b>__addReply</b>(<i></i>) |
|
229 <p> |
|
230 Private slot to add the reply data to the model. |
|
231 </p><a NAME="E4RequestModel.__addRequest" ID="E4RequestModel.__addRequest"></a> |
|
232 <h4>E4RequestModel.__addRequest</h4> |
|
233 <b>__addRequest</b>(<i>req</i>) |
|
234 <p> |
|
235 Private method to add a request object to the model. |
|
236 </p><dl> |
|
237 <dt><i>req</i></dt> |
|
238 <dd> |
|
239 reference to the request object (E4NetworkRequest) |
|
240 </dd> |
|
241 </dl><a NAME="E4RequestModel.__requestCreated" ID="E4RequestModel.__requestCreated"></a> |
|
242 <h4>E4RequestModel.__requestCreated</h4> |
|
243 <b>__requestCreated</b>(<i>operation, request, reply</i>) |
|
244 <p> |
|
245 Private slot handling the creation of a network request. |
|
246 </p><dl> |
|
247 <dt><i>operation</i></dt> |
|
248 <dd> |
|
249 network operation (QNetworkAccessManager.Operation) |
|
250 </dd><dt><i>request</i></dt> |
|
251 <dd> |
|
252 reference to the request object (QNetworkRequest) |
|
253 </dd><dt><i>reply</i></dt> |
|
254 <dd> |
|
255 reference to the reply object(QNetworkReply) |
|
256 </dd> |
|
257 </dl><a NAME="E4RequestModel.columnCount" ID="E4RequestModel.columnCount"></a> |
|
258 <h4>E4RequestModel.columnCount</h4> |
|
259 <b>columnCount</b>(<i>parent</i>) |
|
260 <p> |
|
261 Public method to get the number of columns of the model. |
|
262 </p><dl> |
|
263 <dt><i>parent</i></dt> |
|
264 <dd> |
|
265 parent index (QModelIndex) |
|
266 </dd> |
|
267 </dl><dl> |
|
268 <dt>Returns:</dt> |
|
269 <dd> |
|
270 number of columns (integer) |
|
271 </dd> |
|
272 </dl><a NAME="E4RequestModel.data" ID="E4RequestModel.data"></a> |
|
273 <h4>E4RequestModel.data</h4> |
|
274 <b>data</b>(<i>index, role</i>) |
|
275 <p> |
|
276 Public method to get data from the model. |
|
277 </p><dl> |
|
278 <dt><i>index</i></dt> |
|
279 <dd> |
|
280 index to get data for (QModelIndex) |
|
281 </dd><dt><i>role</i></dt> |
|
282 <dd> |
|
283 role of the data to retrieve (integer) |
|
284 </dd> |
|
285 </dl><dl> |
|
286 <dt>Returns:</dt> |
|
287 <dd> |
|
288 requested data |
|
289 </dd> |
|
290 </dl><a NAME="E4RequestModel.headerData" ID="E4RequestModel.headerData"></a> |
|
291 <h4>E4RequestModel.headerData</h4> |
|
292 <b>headerData</b>(<i>section, orientation, role</i>) |
|
293 <p> |
|
294 Public method to get header data from the model. |
|
295 </p><dl> |
|
296 <dt><i>section</i></dt> |
|
297 <dd> |
|
298 section number (integer) |
|
299 </dd><dt><i>orientation</i></dt> |
|
300 <dd> |
|
301 orientation (Qt.Orientation) |
|
302 </dd><dt><i>role</i></dt> |
|
303 <dd> |
|
304 role of the data to retrieve (integer) |
|
305 </dd> |
|
306 </dl><dl> |
|
307 <dt>Returns:</dt> |
|
308 <dd> |
|
309 requested data |
|
310 </dd> |
|
311 </dl><a NAME="E4RequestModel.removeRows" ID="E4RequestModel.removeRows"></a> |
|
312 <h4>E4RequestModel.removeRows</h4> |
|
313 <b>removeRows</b>(<i>row, count, parent</i>) |
|
314 <p> |
|
315 Public method to remove entries from the model. |
|
316 </p><dl> |
|
317 <dt><i>row</i></dt> |
|
318 <dd> |
|
319 start row (integer) |
|
320 </dd><dt><i>count</i></dt> |
|
321 <dd> |
|
322 number of rows to remove (integer) |
|
323 </dd><dt><i>parent</i></dt> |
|
324 <dd> |
|
325 parent index (QModelIndex) |
|
326 </dd> |
|
327 </dl><dl> |
|
328 <dt>Returns:</dt> |
|
329 <dd> |
|
330 flag indicating success (boolean) |
|
331 </dd> |
|
332 </dl><a NAME="E4RequestModel.rowCount" ID="E4RequestModel.rowCount"></a> |
|
333 <h4>E4RequestModel.rowCount</h4> |
|
334 <b>rowCount</b>(<i>parent</i>) |
|
335 <p> |
|
336 Public method to get the number of rows of the model. |
|
337 </p><dl> |
|
338 <dt><i>parent</i></dt> |
|
339 <dd> |
|
340 parent index (QModelIndex) |
|
341 </dd> |
|
342 </dl><dl> |
|
343 <dt>Returns:</dt> |
|
344 <dd> |
|
345 number of columns (integer) |
|
346 </dd> |
|
347 </dl> |
|
348 <div align="right"><a href="#top">Up</a></div> |
|
349 <hr /> |
|
350 </body></html> |