eric6/Documentation/Source/eric6.WebBrowser.Download.DownloadItem.html

changeset 7273
391d6b7b1eff
parent 6942
2602857055c5
child 7989
a21d673a8f99
equal deleted inserted replaced
7272:1779dc278077 7273:391d6b7b1eff
16 16
17 a { color: #BA6D36; } 17 a { color: #BA6D36; }
18 18
19 </style> 19 </style>
20 </head> 20 </head>
21 <body><a NAME="top" ID="top"></a> 21 <body>
22 <a NAME="top" ID="top"></a>
22 <h1>eric6.WebBrowser.Download.DownloadItem</h1> 23 <h1>eric6.WebBrowser.Download.DownloadItem</h1>
24
23 <p> 25 <p>
24 Module implementing a widget controlling a download. 26 Module implementing a widget controlling a download.
25 </p> 27 </p>
26 <h3>Global Attributes</h3> 28 <h3>Global Attributes</h3>
29
27 <table> 30 <table>
28 <tr><td>None</td></tr> 31 <tr><td>None</td></tr>
29 </table> 32 </table>
30 <h3>Classes</h3> 33 <h3>Classes</h3>
34
31 <table> 35 <table>
36
32 <tr> 37 <tr>
33 <td><a href="#DownloadItem">DownloadItem</a></td> 38 <td><a href="#DownloadItem">DownloadItem</a></td>
34 <td>Class implementing a widget controlling a download.</td> 39 <td>Class implementing a widget controlling a download.</td>
35 </tr> 40 </tr>
36 </table> 41 </table>
37 <h3>Functions</h3> 42 <h3>Functions</h3>
43
38 <table> 44 <table>
39 <tr><td>None</td></tr> 45 <tr><td>None</td></tr>
40 </table> 46 </table>
41 <hr /><hr /> 47 <hr />
48 <hr />
42 <a NAME="DownloadItem" ID="DownloadItem"></a> 49 <a NAME="DownloadItem" ID="DownloadItem"></a>
43 <h2>DownloadItem</h2> 50 <h2>DownloadItem</h2>
51
44 <p> 52 <p>
45 Class implementing a widget controlling a download. 53 Class implementing a widget controlling a download.
46 </p><h3>Signals</h3> 54 </p>
47 <dl> 55 <h3>Signals</h3>
56 <dl>
57
48 <dt>downloadFinished(success)</dt> 58 <dt>downloadFinished(success)</dt>
49 <dd> 59 <dd>
50 emitted when a download finished 60 emitted when a download finished
51 </dd><dt>progress(int, int)</dt> 61 </dd>
62 <dt>progress(int, int)</dt>
52 <dd> 63 <dd>
53 emitted to signal the download progress 64 emitted to signal the download progress
54 </dd><dt>statusChanged()</dt> 65 </dd>
66 <dt>statusChanged()</dt>
55 <dd> 67 <dd>
56 emitted upon a status change of a download 68 emitted upon a status change of a download
57 </dd> 69 </dd>
58 </dl> 70 </dl>
59 <h3>Derived from</h3> 71 <h3>Derived from</h3>
60 QWidget, Ui_DownloadItem 72 QWidget, Ui_DownloadItem
61 <h3>Class Attributes</h3> 73 <h3>Class Attributes</h3>
74
62 <table> 75 <table>
63 <tr><td>DownloadCancelled</td></tr><tr><td>DownloadSuccessful</td></tr><tr><td>Downloading</td></tr> 76 <tr><td>DownloadCancelled</td></tr><tr><td>DownloadSuccessful</td></tr><tr><td>Downloading</td></tr>
64 </table> 77 </table>
65 <h3>Class Methods</h3> 78 <h3>Class Methods</h3>
79
66 <table> 80 <table>
67 <tr><td>None</td></tr> 81 <tr><td>None</td></tr>
68 </table> 82 </table>
69 <h3>Methods</h3> 83 <h3>Methods</h3>
84
70 <table> 85 <table>
86
71 <tr> 87 <tr>
72 <td><a href="#DownloadItem.__init__">DownloadItem</a></td> 88 <td><a href="#DownloadItem.__init__">DownloadItem</a></td>
73 <td>Constructor</td> 89 <td>Constructor</td>
74 </tr><tr> 90 </tr>
91 <tr>
75 <td><a href="#DownloadItem.__adjustSize">__adjustSize</a></td> 92 <td><a href="#DownloadItem.__adjustSize">__adjustSize</a></td>
76 <td>Private method to adjust the size of the download item.</td> 93 <td>Private method to adjust the size of the download item.</td>
77 </tr><tr> 94 </tr>
95 <tr>
78 <td><a href="#DownloadItem.__downloadProgress">__downloadProgress</a></td> 96 <td><a href="#DownloadItem.__downloadProgress">__downloadProgress</a></td>
79 <td>Private method to show the download progress.</td> 97 <td>Private method to show the download progress.</td>
80 </tr><tr> 98 </tr>
99 <tr>
81 <td><a href="#DownloadItem.__finished">__finished</a></td> 100 <td><a href="#DownloadItem.__finished">__finished</a></td>
82 <td>Private slot to handle the download finished.</td> 101 <td>Private slot to handle the download finished.</td>
83 </tr><tr> 102 </tr>
103 <tr>
84 <td><a href="#DownloadItem.__getFileName">__getFileName</a></td> 104 <td><a href="#DownloadItem.__getFileName">__getFileName</a></td>
85 <td>Private method to get the file name to save to from the user.</td> 105 <td>Private method to get the file name to save to from the user.</td>
86 </tr><tr> 106 </tr>
107 <tr>
87 <td><a href="#DownloadItem.__initialize">__initialize</a></td> 108 <td><a href="#DownloadItem.__initialize">__initialize</a></td>
88 <td>Private method to initialize the widget.</td> 109 <td>Private method to initialize the widget.</td>
89 </tr><tr> 110 </tr>
111 <tr>
90 <td><a href="#DownloadItem.__saveFileName">__saveFileName</a></td> 112 <td><a href="#DownloadItem.__saveFileName">__saveFileName</a></td>
91 <td>Private method to calculate a name for the file to download.</td> 113 <td>Private method to calculate a name for the file to download.</td>
92 </tr><tr> 114 </tr>
115 <tr>
93 <td><a href="#DownloadItem.__setDateTime">__setDateTime</a></td> 116 <td><a href="#DownloadItem.__setDateTime">__setDateTime</a></td>
94 <td>Private method to set the download date and time.</td> 117 <td>Private method to set the download date and time.</td>
95 </tr><tr> 118 </tr>
119 <tr>
96 <td><a href="#DownloadItem.__setFileName">__setFileName</a></td> 120 <td><a href="#DownloadItem.__setFileName">__setFileName</a></td>
97 <td>Private method to set the file name to save the download into.</td> 121 <td>Private method to set the file name to save the download into.</td>
98 </tr><tr> 122 </tr>
123 <tr>
99 <td><a href="#DownloadItem.__updateInfoLabel">__updateInfoLabel</a></td> 124 <td><a href="#DownloadItem.__updateInfoLabel">__updateInfoLabel</a></td>
100 <td>Private method to update the info label.</td> 125 <td>Private method to update the info label.</td>
101 </tr><tr> 126 </tr>
127 <tr>
102 <td><a href="#DownloadItem.absoluteFilePath">absoluteFilePath</a></td> 128 <td><a href="#DownloadItem.absoluteFilePath">absoluteFilePath</a></td>
103 <td>Public method to get the absolute path of the output file.</td> 129 <td>Public method to get the absolute path of the output file.</td>
104 </tr><tr> 130 </tr>
131 <tr>
105 <td><a href="#DownloadItem.bytesReceived">bytesReceived</a></td> 132 <td><a href="#DownloadItem.bytesReceived">bytesReceived</a></td>
106 <td>Public method to get the number of bytes received.</td> 133 <td>Public method to get the number of bytes received.</td>
107 </tr><tr> 134 </tr>
135 <tr>
108 <td><a href="#DownloadItem.bytesTotal">bytesTotal</a></td> 136 <td><a href="#DownloadItem.bytesTotal">bytesTotal</a></td>
109 <td>Public method to get the total number of bytes of the download.</td> 137 <td>Public method to get the total number of bytes of the download.</td>
110 </tr><tr> 138 </tr>
139 <tr>
111 <td><a href="#DownloadItem.cancelDownload">cancelDownload</a></td> 140 <td><a href="#DownloadItem.cancelDownload">cancelDownload</a></td>
112 <td>Public slot to stop the download.</td> 141 <td>Public slot to stop the download.</td>
113 </tr><tr> 142 </tr>
143 <tr>
114 <td><a href="#DownloadItem.canceledFileSelect">canceledFileSelect</a></td> 144 <td><a href="#DownloadItem.canceledFileSelect">canceledFileSelect</a></td>
115 <td>Public method to check, if the user canceled the file selection.</td> 145 <td>Public method to check, if the user canceled the file selection.</td>
116 </tr><tr> 146 </tr>
147 <tr>
117 <td><a href="#DownloadItem.currentSpeed">currentSpeed</a></td> 148 <td><a href="#DownloadItem.currentSpeed">currentSpeed</a></td>
118 <td>Public method to get an estimation for the download speed.</td> 149 <td>Public method to get an estimation for the download speed.</td>
119 </tr><tr> 150 </tr>
151 <tr>
120 <td><a href="#DownloadItem.downloadCanceled">downloadCanceled</a></td> 152 <td><a href="#DownloadItem.downloadCanceled">downloadCanceled</a></td>
121 <td>Public method to check, if the download was cancelled.</td> 153 <td>Public method to check, if the download was cancelled.</td>
122 </tr><tr> 154 </tr>
155 <tr>
123 <td><a href="#DownloadItem.downloadProgress">downloadProgress</a></td> 156 <td><a href="#DownloadItem.downloadProgress">downloadProgress</a></td>
124 <td>Public method to get the download progress.</td> 157 <td>Public method to get the download progress.</td>
125 </tr><tr> 158 </tr>
159 <tr>
126 <td><a href="#DownloadItem.downloadedSuccessfully">downloadedSuccessfully</a></td> 160 <td><a href="#DownloadItem.downloadedSuccessfully">downloadedSuccessfully</a></td>
127 <td>Public method to check for a successful download.</td> 161 <td>Public method to check for a successful download.</td>
128 </tr><tr> 162 </tr>
163 <tr>
129 <td><a href="#DownloadItem.downloading">downloading</a></td> 164 <td><a href="#DownloadItem.downloading">downloading</a></td>
130 <td>Public method to determine, if a download is in progress.</td> 165 <td>Public method to determine, if a download is in progress.</td>
131 </tr><tr> 166 </tr>
167 <tr>
132 <td><a href="#DownloadItem.fileName">fileName</a></td> 168 <td><a href="#DownloadItem.fileName">fileName</a></td>
133 <td>Public method to get the name of the output file.</td> 169 <td>Public method to get the name of the output file.</td>
134 </tr><tr> 170 </tr>
171 <tr>
135 <td><a href="#DownloadItem.getData">getData</a></td> 172 <td><a href="#DownloadItem.getData">getData</a></td>
136 <td>Public method to get the relevant download data.</td> 173 <td>Public method to get the relevant download data.</td>
137 </tr><tr> 174 </tr>
175 <tr>
138 <td><a href="#DownloadItem.getInfoData">getInfoData</a></td> 176 <td><a href="#DownloadItem.getInfoData">getInfoData</a></td>
139 <td>Public method to get the text of the info label.</td> 177 <td>Public method to get the text of the info label.</td>
140 </tr><tr> 178 </tr>
179 <tr>
141 <td><a href="#DownloadItem.getPageUrl">getPageUrl</a></td> 180 <td><a href="#DownloadItem.getPageUrl">getPageUrl</a></td>
142 <td>Public method to get the URL of the download page.</td> 181 <td>Public method to get the URL of the download page.</td>
143 </tr><tr> 182 </tr>
183 <tr>
144 <td><a href="#DownloadItem.on_openButton_clicked">on_openButton_clicked</a></td> 184 <td><a href="#DownloadItem.on_openButton_clicked">on_openButton_clicked</a></td>
145 <td>Private slot to open the downloaded file.</td> 185 <td>Private slot to open the downloaded file.</td>
146 </tr><tr> 186 </tr>
187 <tr>
147 <td><a href="#DownloadItem.on_pauseButton_clicked">on_pauseButton_clicked</a></td> 188 <td><a href="#DownloadItem.on_pauseButton_clicked">on_pauseButton_clicked</a></td>
148 <td>Private slot to pause the download.</td> 189 <td>Private slot to pause the download.</td>
149 </tr><tr> 190 </tr>
191 <tr>
150 <td><a href="#DownloadItem.on_stopButton_clicked">on_stopButton_clicked</a></td> 192 <td><a href="#DownloadItem.on_stopButton_clicked">on_stopButton_clicked</a></td>
151 <td>Private slot to stop the download.</td> 193 <td>Private slot to stop the download.</td>
152 </tr><tr> 194 </tr>
195 <tr>
153 <td><a href="#DownloadItem.openFile">openFile</a></td> 196 <td><a href="#DownloadItem.openFile">openFile</a></td>
154 <td>Public slot to open the downloaded file.</td> 197 <td>Public slot to open the downloaded file.</td>
155 </tr><tr> 198 </tr>
199 <tr>
156 <td><a href="#DownloadItem.openFolder">openFolder</a></td> 200 <td><a href="#DownloadItem.openFolder">openFolder</a></td>
157 <td>Public slot to open the folder containing the downloaded file.</td> 201 <td>Public slot to open the folder containing the downloaded file.</td>
158 </tr><tr> 202 </tr>
203 <tr>
159 <td><a href="#DownloadItem.remainingTime">remainingTime</a></td> 204 <td><a href="#DownloadItem.remainingTime">remainingTime</a></td>
160 <td>Public method to get an estimation for the remaining time.</td> 205 <td>Public method to get an estimation for the remaining time.</td>
161 </tr><tr> 206 </tr>
207 <tr>
162 <td><a href="#DownloadItem.setData">setData</a></td> 208 <td><a href="#DownloadItem.setData">setData</a></td>
163 <td>Public method to set the relevant download data.</td> 209 <td>Public method to set the relevant download data.</td>
164 </tr><tr> 210 </tr>
211 <tr>
165 <td><a href="#DownloadItem.setIcon">setIcon</a></td> 212 <td><a href="#DownloadItem.setIcon">setIcon</a></td>
166 <td>Public method to set the download icon.</td> 213 <td>Public method to set the download icon.</td>
167 </tr> 214 </tr>
168 </table> 215 </table>
169 <h3>Static Methods</h3> 216 <h3>Static Methods</h3>
217
170 <table> 218 <table>
171 <tr><td>None</td></tr> 219 <tr><td>None</td></tr>
172 </table> 220 </table>
221
173 <a NAME="DownloadItem.__init__" ID="DownloadItem.__init__"></a> 222 <a NAME="DownloadItem.__init__" ID="DownloadItem.__init__"></a>
174 <h4>DownloadItem (Constructor)</h4> 223 <h4>DownloadItem (Constructor)</h4>
175 <b>DownloadItem</b>(<i>downloadItem=None, pageUrl=None, parent=None</i>) 224 <b>DownloadItem</b>(<i>downloadItem=None, pageUrl=None, parent=None</i>)
225
176 <p> 226 <p>
177 Constructor 227 Constructor
178 </p><dl> 228 </p>
229 <dl>
230
179 <dt><i>downloadItem</i> (QWebEngineDownloadItem)</dt> 231 <dt><i>downloadItem</i> (QWebEngineDownloadItem)</dt>
180 <dd> 232 <dd>
181 reference to the download object containing the 233 reference to the download object containing the
182 download data. 234 download data.
183 </dd><dt><i>pageUrl</i> (QUrl)</dt> 235 </dd>
236 <dt><i>pageUrl</i> (QUrl)</dt>
184 <dd> 237 <dd>
185 URL of the calling page 238 URL of the calling page
186 </dd><dt><i>parent</i> (QWidget)</dt> 239 </dd>
240 <dt><i>parent</i> (QWidget)</dt>
187 <dd> 241 <dd>
188 reference to the parent widget 242 reference to the parent widget
189 </dd> 243 </dd>
190 </dl><a NAME="DownloadItem.__adjustSize" ID="DownloadItem.__adjustSize"></a> 244 </dl>
245 <a NAME="DownloadItem.__adjustSize" ID="DownloadItem.__adjustSize"></a>
191 <h4>DownloadItem.__adjustSize</h4> 246 <h4>DownloadItem.__adjustSize</h4>
192 <b>__adjustSize</b>(<i></i>) 247 <b>__adjustSize</b>(<i></i>)
248
193 <p> 249 <p>
194 Private method to adjust the size of the download item. 250 Private method to adjust the size of the download item.
195 </p><a NAME="DownloadItem.__downloadProgress" ID="DownloadItem.__downloadProgress"></a> 251 </p>
252 <a NAME="DownloadItem.__downloadProgress" ID="DownloadItem.__downloadProgress"></a>
196 <h4>DownloadItem.__downloadProgress</h4> 253 <h4>DownloadItem.__downloadProgress</h4>
197 <b>__downloadProgress</b>(<i>bytesReceived, bytesTotal</i>) 254 <b>__downloadProgress</b>(<i>bytesReceived, bytesTotal</i>)
255
198 <p> 256 <p>
199 Private method to show the download progress. 257 Private method to show the download progress.
200 </p><dl> 258 </p>
259 <dl>
260
201 <dt><i>bytesReceived</i></dt> 261 <dt><i>bytesReceived</i></dt>
202 <dd> 262 <dd>
203 number of bytes received (integer) 263 number of bytes received (integer)
204 </dd><dt><i>bytesTotal</i></dt> 264 </dd>
265 <dt><i>bytesTotal</i></dt>
205 <dd> 266 <dd>
206 number of total bytes (integer) 267 number of total bytes (integer)
207 </dd> 268 </dd>
208 </dl><a NAME="DownloadItem.__finished" ID="DownloadItem.__finished"></a> 269 </dl>
270 <a NAME="DownloadItem.__finished" ID="DownloadItem.__finished"></a>
209 <h4>DownloadItem.__finished</h4> 271 <h4>DownloadItem.__finished</h4>
210 <b>__finished</b>(<i></i>) 272 <b>__finished</b>(<i></i>)
273
211 <p> 274 <p>
212 Private slot to handle the download finished. 275 Private slot to handle the download finished.
213 </p><a NAME="DownloadItem.__getFileName" ID="DownloadItem.__getFileName"></a> 276 </p>
277 <a NAME="DownloadItem.__getFileName" ID="DownloadItem.__getFileName"></a>
214 <h4>DownloadItem.__getFileName</h4> 278 <h4>DownloadItem.__getFileName</h4>
215 <b>__getFileName</b>(<i></i>) 279 <b>__getFileName</b>(<i></i>)
280
216 <p> 281 <p>
217 Private method to get the file name to save to from the user. 282 Private method to get the file name to save to from the user.
218 </p><a NAME="DownloadItem.__initialize" ID="DownloadItem.__initialize"></a> 283 </p>
284 <a NAME="DownloadItem.__initialize" ID="DownloadItem.__initialize"></a>
219 <h4>DownloadItem.__initialize</h4> 285 <h4>DownloadItem.__initialize</h4>
220 <b>__initialize</b>(<i></i>) 286 <b>__initialize</b>(<i></i>)
287
221 <p> 288 <p>
222 Private method to initialize the widget. 289 Private method to initialize the widget.
223 </p><a NAME="DownloadItem.__saveFileName" ID="DownloadItem.__saveFileName"></a> 290 </p>
291 <a NAME="DownloadItem.__saveFileName" ID="DownloadItem.__saveFileName"></a>
224 <h4>DownloadItem.__saveFileName</h4> 292 <h4>DownloadItem.__saveFileName</h4>
225 <b>__saveFileName</b>(<i>directory</i>) 293 <b>__saveFileName</b>(<i>directory</i>)
294
226 <p> 295 <p>
227 Private method to calculate a name for the file to download. 296 Private method to calculate a name for the file to download.
228 </p><dl> 297 </p>
298 <dl>
299
229 <dt><i>directory</i></dt> 300 <dt><i>directory</i></dt>
230 <dd> 301 <dd>
231 name of the directory to store the file into (string) 302 name of the directory to store the file into (string)
232 </dd> 303 </dd>
233 </dl><dl> 304 </dl>
305 <dl>
234 <dt>Returns:</dt> 306 <dt>Returns:</dt>
235 <dd> 307 <dd>
236 proposed filename and original filename (string, string) 308 proposed filename and original filename (string, string)
237 </dd> 309 </dd>
238 </dl><a NAME="DownloadItem.__setDateTime" ID="DownloadItem.__setDateTime"></a> 310 </dl>
311 <a NAME="DownloadItem.__setDateTime" ID="DownloadItem.__setDateTime"></a>
239 <h4>DownloadItem.__setDateTime</h4> 312 <h4>DownloadItem.__setDateTime</h4>
240 <b>__setDateTime</b>(<i>dateTime=None</i>) 313 <b>__setDateTime</b>(<i>dateTime=None</i>)
314
241 <p> 315 <p>
242 Private method to set the download date and time. 316 Private method to set the download date and time.
243 </p><dl> 317 </p>
318 <dl>
319
244 <dt><i>dateTime</i> (QDateTime)</dt> 320 <dt><i>dateTime</i> (QDateTime)</dt>
245 <dd> 321 <dd>
246 date and time to be set 322 date and time to be set
247 </dd> 323 </dd>
248 </dl><a NAME="DownloadItem.__setFileName" ID="DownloadItem.__setFileName"></a> 324 </dl>
325 <a NAME="DownloadItem.__setFileName" ID="DownloadItem.__setFileName"></a>
249 <h4>DownloadItem.__setFileName</h4> 326 <h4>DownloadItem.__setFileName</h4>
250 <b>__setFileName</b>(<i>fileName</i>) 327 <b>__setFileName</b>(<i>fileName</i>)
328
251 <p> 329 <p>
252 Private method to set the file name to save the download into. 330 Private method to set the file name to save the download into.
253 </p><dl> 331 </p>
332 <dl>
333
254 <dt><i>fileName</i> (str)</dt> 334 <dt><i>fileName</i> (str)</dt>
255 <dd> 335 <dd>
256 name of the file to save into 336 name of the file to save into
257 </dd> 337 </dd>
258 </dl><a NAME="DownloadItem.__updateInfoLabel" ID="DownloadItem.__updateInfoLabel"></a> 338 </dl>
339 <a NAME="DownloadItem.__updateInfoLabel" ID="DownloadItem.__updateInfoLabel"></a>
259 <h4>DownloadItem.__updateInfoLabel</h4> 340 <h4>DownloadItem.__updateInfoLabel</h4>
260 <b>__updateInfoLabel</b>(<i></i>) 341 <b>__updateInfoLabel</b>(<i></i>)
342
261 <p> 343 <p>
262 Private method to update the info label. 344 Private method to update the info label.
263 </p><a NAME="DownloadItem.absoluteFilePath" ID="DownloadItem.absoluteFilePath"></a> 345 </p>
346 <a NAME="DownloadItem.absoluteFilePath" ID="DownloadItem.absoluteFilePath"></a>
264 <h4>DownloadItem.absoluteFilePath</h4> 347 <h4>DownloadItem.absoluteFilePath</h4>
265 <b>absoluteFilePath</b>(<i></i>) 348 <b>absoluteFilePath</b>(<i></i>)
349
266 <p> 350 <p>
267 Public method to get the absolute path of the output file. 351 Public method to get the absolute path of the output file.
268 </p><dl> 352 </p>
353 <dl>
269 <dt>Returns:</dt> 354 <dt>Returns:</dt>
270 <dd> 355 <dd>
271 absolute path of the output file (string) 356 absolute path of the output file (string)
272 </dd> 357 </dd>
273 </dl><a NAME="DownloadItem.bytesReceived" ID="DownloadItem.bytesReceived"></a> 358 </dl>
359 <a NAME="DownloadItem.bytesReceived" ID="DownloadItem.bytesReceived"></a>
274 <h4>DownloadItem.bytesReceived</h4> 360 <h4>DownloadItem.bytesReceived</h4>
275 <b>bytesReceived</b>(<i></i>) 361 <b>bytesReceived</b>(<i></i>)
362
276 <p> 363 <p>
277 Public method to get the number of bytes received. 364 Public method to get the number of bytes received.
278 </p><dl> 365 </p>
366 <dl>
279 <dt>Returns:</dt> 367 <dt>Returns:</dt>
280 <dd> 368 <dd>
281 number of bytes received (integer) 369 number of bytes received (integer)
282 </dd> 370 </dd>
283 </dl><a NAME="DownloadItem.bytesTotal" ID="DownloadItem.bytesTotal"></a> 371 </dl>
372 <a NAME="DownloadItem.bytesTotal" ID="DownloadItem.bytesTotal"></a>
284 <h4>DownloadItem.bytesTotal</h4> 373 <h4>DownloadItem.bytesTotal</h4>
285 <b>bytesTotal</b>(<i></i>) 374 <b>bytesTotal</b>(<i></i>)
375
286 <p> 376 <p>
287 Public method to get the total number of bytes of the download. 377 Public method to get the total number of bytes of the download.
288 </p><dl> 378 </p>
379 <dl>
289 <dt>Returns:</dt> 380 <dt>Returns:</dt>
290 <dd> 381 <dd>
291 total number of bytes (integer) 382 total number of bytes (integer)
292 </dd> 383 </dd>
293 </dl><a NAME="DownloadItem.cancelDownload" ID="DownloadItem.cancelDownload"></a> 384 </dl>
385 <a NAME="DownloadItem.cancelDownload" ID="DownloadItem.cancelDownload"></a>
294 <h4>DownloadItem.cancelDownload</h4> 386 <h4>DownloadItem.cancelDownload</h4>
295 <b>cancelDownload</b>(<i></i>) 387 <b>cancelDownload</b>(<i></i>)
388
296 <p> 389 <p>
297 Public slot to stop the download. 390 Public slot to stop the download.
298 </p><a NAME="DownloadItem.canceledFileSelect" ID="DownloadItem.canceledFileSelect"></a> 391 </p>
392 <a NAME="DownloadItem.canceledFileSelect" ID="DownloadItem.canceledFileSelect"></a>
299 <h4>DownloadItem.canceledFileSelect</h4> 393 <h4>DownloadItem.canceledFileSelect</h4>
300 <b>canceledFileSelect</b>(<i></i>) 394 <b>canceledFileSelect</b>(<i></i>)
395
301 <p> 396 <p>
302 Public method to check, if the user canceled the file selection. 397 Public method to check, if the user canceled the file selection.
303 </p><dl> 398 </p>
399 <dl>
304 <dt>Returns:</dt> 400 <dt>Returns:</dt>
305 <dd> 401 <dd>
306 flag indicating cancellation (boolean) 402 flag indicating cancellation (boolean)
307 </dd> 403 </dd>
308 </dl><a NAME="DownloadItem.currentSpeed" ID="DownloadItem.currentSpeed"></a> 404 </dl>
405 <a NAME="DownloadItem.currentSpeed" ID="DownloadItem.currentSpeed"></a>
309 <h4>DownloadItem.currentSpeed</h4> 406 <h4>DownloadItem.currentSpeed</h4>
310 <b>currentSpeed</b>(<i></i>) 407 <b>currentSpeed</b>(<i></i>)
408
311 <p> 409 <p>
312 Public method to get an estimation for the download speed. 410 Public method to get an estimation for the download speed.
313 </p><dl> 411 </p>
412 <dl>
314 <dt>Returns:</dt> 413 <dt>Returns:</dt>
315 <dd> 414 <dd>
316 estimation for the download speed (float) 415 estimation for the download speed (float)
317 </dd> 416 </dd>
318 </dl><a NAME="DownloadItem.downloadCanceled" ID="DownloadItem.downloadCanceled"></a> 417 </dl>
418 <a NAME="DownloadItem.downloadCanceled" ID="DownloadItem.downloadCanceled"></a>
319 <h4>DownloadItem.downloadCanceled</h4> 419 <h4>DownloadItem.downloadCanceled</h4>
320 <b>downloadCanceled</b>(<i></i>) 420 <b>downloadCanceled</b>(<i></i>)
421
321 <p> 422 <p>
322 Public method to check, if the download was cancelled. 423 Public method to check, if the download was cancelled.
323 </p><dl> 424 </p>
425 <dl>
324 <dt>Returns:</dt> 426 <dt>Returns:</dt>
325 <dd> 427 <dd>
326 flag indicating a canceled download (boolean) 428 flag indicating a canceled download (boolean)
327 </dd> 429 </dd>
328 </dl><a NAME="DownloadItem.downloadProgress" ID="DownloadItem.downloadProgress"></a> 430 </dl>
431 <a NAME="DownloadItem.downloadProgress" ID="DownloadItem.downloadProgress"></a>
329 <h4>DownloadItem.downloadProgress</h4> 432 <h4>DownloadItem.downloadProgress</h4>
330 <b>downloadProgress</b>(<i></i>) 433 <b>downloadProgress</b>(<i></i>)
434
331 <p> 435 <p>
332 Public method to get the download progress. 436 Public method to get the download progress.
333 </p><dl> 437 </p>
438 <dl>
334 <dt>Returns:</dt> 439 <dt>Returns:</dt>
335 <dd> 440 <dd>
336 current download progress 441 current download progress
337 </dd> 442 </dd>
338 </dl><dl> 443 </dl>
444 <dl>
339 <dt>Return Type:</dt> 445 <dt>Return Type:</dt>
340 <dd> 446 <dd>
341 int 447 int
342 </dd> 448 </dd>
343 </dl><a NAME="DownloadItem.downloadedSuccessfully" ID="DownloadItem.downloadedSuccessfully"></a> 449 </dl>
450 <a NAME="DownloadItem.downloadedSuccessfully" ID="DownloadItem.downloadedSuccessfully"></a>
344 <h4>DownloadItem.downloadedSuccessfully</h4> 451 <h4>DownloadItem.downloadedSuccessfully</h4>
345 <b>downloadedSuccessfully</b>(<i></i>) 452 <b>downloadedSuccessfully</b>(<i></i>)
453
346 <p> 454 <p>
347 Public method to check for a successful download. 455 Public method to check for a successful download.
348 </p><dl> 456 </p>
457 <dl>
349 <dt>Returns:</dt> 458 <dt>Returns:</dt>
350 <dd> 459 <dd>
351 flag indicating a successful download (boolean) 460 flag indicating a successful download (boolean)
352 </dd> 461 </dd>
353 </dl><a NAME="DownloadItem.downloading" ID="DownloadItem.downloading"></a> 462 </dl>
463 <a NAME="DownloadItem.downloading" ID="DownloadItem.downloading"></a>
354 <h4>DownloadItem.downloading</h4> 464 <h4>DownloadItem.downloading</h4>
355 <b>downloading</b>(<i></i>) 465 <b>downloading</b>(<i></i>)
466
356 <p> 467 <p>
357 Public method to determine, if a download is in progress. 468 Public method to determine, if a download is in progress.
358 </p><dl> 469 </p>
470 <dl>
359 <dt>Returns:</dt> 471 <dt>Returns:</dt>
360 <dd> 472 <dd>
361 flag indicating a download is in progress (boolean) 473 flag indicating a download is in progress (boolean)
362 </dd> 474 </dd>
363 </dl><a NAME="DownloadItem.fileName" ID="DownloadItem.fileName"></a> 475 </dl>
476 <a NAME="DownloadItem.fileName" ID="DownloadItem.fileName"></a>
364 <h4>DownloadItem.fileName</h4> 477 <h4>DownloadItem.fileName</h4>
365 <b>fileName</b>(<i></i>) 478 <b>fileName</b>(<i></i>)
479
366 <p> 480 <p>
367 Public method to get the name of the output file. 481 Public method to get the name of the output file.
368 </p><dl> 482 </p>
483 <dl>
369 <dt>Returns:</dt> 484 <dt>Returns:</dt>
370 <dd> 485 <dd>
371 name of the output file (string) 486 name of the output file (string)
372 </dd> 487 </dd>
373 </dl><a NAME="DownloadItem.getData" ID="DownloadItem.getData"></a> 488 </dl>
489 <a NAME="DownloadItem.getData" ID="DownloadItem.getData"></a>
374 <h4>DownloadItem.getData</h4> 490 <h4>DownloadItem.getData</h4>
375 <b>getData</b>(<i></i>) 491 <b>getData</b>(<i></i>)
492
376 <p> 493 <p>
377 Public method to get the relevant download data. 494 Public method to get the relevant download data.
378 </p><dl> 495 </p>
496 <dl>
379 <dt>Returns:</dt> 497 <dt>Returns:</dt>
380 <dd> 498 <dd>
381 dictionary containing the URL, save location, done flag, 499 dictionary containing the URL, save location, done flag,
382 the URL of the related web page and the date and time of the 500 the URL of the related web page and the date and time of the
383 download 501 download
384 </dd> 502 </dd>
385 </dl><dl> 503 </dl>
504 <dl>
386 <dt>Return Type:</dt> 505 <dt>Return Type:</dt>
387 <dd> 506 <dd>
388 dict of {"URL": QUrl, "Location": str, "Done": bool, 507 dict of {"URL": QUrl, "Location": str, "Done": bool,
389 "PageURL": QUrl, "Downloaded": QDateTime} 508 "PageURL": QUrl, "Downloaded": QDateTime}
390 </dd> 509 </dd>
391 </dl><a NAME="DownloadItem.getInfoData" ID="DownloadItem.getInfoData"></a> 510 </dl>
511 <a NAME="DownloadItem.getInfoData" ID="DownloadItem.getInfoData"></a>
392 <h4>DownloadItem.getInfoData</h4> 512 <h4>DownloadItem.getInfoData</h4>
393 <b>getInfoData</b>(<i></i>) 513 <b>getInfoData</b>(<i></i>)
514
394 <p> 515 <p>
395 Public method to get the text of the info label. 516 Public method to get the text of the info label.
396 </p><dl> 517 </p>
518 <dl>
397 <dt>Returns:</dt> 519 <dt>Returns:</dt>
398 <dd> 520 <dd>
399 text of the info label (string) 521 text of the info label (string)
400 </dd> 522 </dd>
401 </dl><a NAME="DownloadItem.getPageUrl" ID="DownloadItem.getPageUrl"></a> 523 </dl>
524 <a NAME="DownloadItem.getPageUrl" ID="DownloadItem.getPageUrl"></a>
402 <h4>DownloadItem.getPageUrl</h4> 525 <h4>DownloadItem.getPageUrl</h4>
403 <b>getPageUrl</b>(<i></i>) 526 <b>getPageUrl</b>(<i></i>)
527
404 <p> 528 <p>
405 Public method to get the URL of the download page. 529 Public method to get the URL of the download page.
406 </p><dl> 530 </p>
531 <dl>
407 <dt>Returns:</dt> 532 <dt>Returns:</dt>
408 <dd> 533 <dd>
409 URL of the download page (QUrl) 534 URL of the download page (QUrl)
410 </dd> 535 </dd>
411 </dl><a NAME="DownloadItem.on_openButton_clicked" ID="DownloadItem.on_openButton_clicked"></a> 536 </dl>
537 <a NAME="DownloadItem.on_openButton_clicked" ID="DownloadItem.on_openButton_clicked"></a>
412 <h4>DownloadItem.on_openButton_clicked</h4> 538 <h4>DownloadItem.on_openButton_clicked</h4>
413 <b>on_openButton_clicked</b>(<i></i>) 539 <b>on_openButton_clicked</b>(<i></i>)
540
414 <p> 541 <p>
415 Private slot to open the downloaded file. 542 Private slot to open the downloaded file.
416 </p><a NAME="DownloadItem.on_pauseButton_clicked" ID="DownloadItem.on_pauseButton_clicked"></a> 543 </p>
544 <a NAME="DownloadItem.on_pauseButton_clicked" ID="DownloadItem.on_pauseButton_clicked"></a>
417 <h4>DownloadItem.on_pauseButton_clicked</h4> 545 <h4>DownloadItem.on_pauseButton_clicked</h4>
418 <b>on_pauseButton_clicked</b>(<i>checked</i>) 546 <b>on_pauseButton_clicked</b>(<i>checked</i>)
547
419 <p> 548 <p>
420 Private slot to pause the download. 549 Private slot to pause the download.
421 </p><dl> 550 </p>
551 <dl>
552
422 <dt><i>checked</i> (bool)</dt> 553 <dt><i>checked</i> (bool)</dt>
423 <dd> 554 <dd>
424 flag indicating the state of the button 555 flag indicating the state of the button
425 </dd> 556 </dd>
426 </dl><a NAME="DownloadItem.on_stopButton_clicked" ID="DownloadItem.on_stopButton_clicked"></a> 557 </dl>
558 <a NAME="DownloadItem.on_stopButton_clicked" ID="DownloadItem.on_stopButton_clicked"></a>
427 <h4>DownloadItem.on_stopButton_clicked</h4> 559 <h4>DownloadItem.on_stopButton_clicked</h4>
428 <b>on_stopButton_clicked</b>(<i></i>) 560 <b>on_stopButton_clicked</b>(<i></i>)
561
429 <p> 562 <p>
430 Private slot to stop the download. 563 Private slot to stop the download.
431 </p><a NAME="DownloadItem.openFile" ID="DownloadItem.openFile"></a> 564 </p>
565 <a NAME="DownloadItem.openFile" ID="DownloadItem.openFile"></a>
432 <h4>DownloadItem.openFile</h4> 566 <h4>DownloadItem.openFile</h4>
433 <b>openFile</b>(<i></i>) 567 <b>openFile</b>(<i></i>)
568
434 <p> 569 <p>
435 Public slot to open the downloaded file. 570 Public slot to open the downloaded file.
436 </p><a NAME="DownloadItem.openFolder" ID="DownloadItem.openFolder"></a> 571 </p>
572 <a NAME="DownloadItem.openFolder" ID="DownloadItem.openFolder"></a>
437 <h4>DownloadItem.openFolder</h4> 573 <h4>DownloadItem.openFolder</h4>
438 <b>openFolder</b>(<i></i>) 574 <b>openFolder</b>(<i></i>)
575
439 <p> 576 <p>
440 Public slot to open the folder containing the downloaded file. 577 Public slot to open the folder containing the downloaded file.
441 </p><a NAME="DownloadItem.remainingTime" ID="DownloadItem.remainingTime"></a> 578 </p>
579 <a NAME="DownloadItem.remainingTime" ID="DownloadItem.remainingTime"></a>
442 <h4>DownloadItem.remainingTime</h4> 580 <h4>DownloadItem.remainingTime</h4>
443 <b>remainingTime</b>(<i></i>) 581 <b>remainingTime</b>(<i></i>)
582
444 <p> 583 <p>
445 Public method to get an estimation for the remaining time. 584 Public method to get an estimation for the remaining time.
446 </p><dl> 585 </p>
586 <dl>
447 <dt>Returns:</dt> 587 <dt>Returns:</dt>
448 <dd> 588 <dd>
449 estimation for the remaining time (float) 589 estimation for the remaining time (float)
450 </dd> 590 </dd>
451 </dl><a NAME="DownloadItem.setData" ID="DownloadItem.setData"></a> 591 </dl>
592 <a NAME="DownloadItem.setData" ID="DownloadItem.setData"></a>
452 <h4>DownloadItem.setData</h4> 593 <h4>DownloadItem.setData</h4>
453 <b>setData</b>(<i>data</i>) 594 <b>setData</b>(<i>data</i>)
595
454 <p> 596 <p>
455 Public method to set the relevant download data. 597 Public method to set the relevant download data.
456 </p><dl> 598 </p>
599 <dl>
600
457 <dt><i>data</i> (dict of {"URL": QUrl, "Location": str, "Done": bool,)</dt> 601 <dt><i>data</i> (dict of {"URL": QUrl, "Location": str, "Done": bool,)</dt>
458 <dd> 602 <dd>
459 dictionary containing the URL, save location, done flag, 603 dictionary containing the URL, save location, done flag,
460 the URL of the related web page and the date and time of the 604 the URL of the related web page and the date and time of the
461 download 605 download
462 "PageURL": QUrl, "Downloaded": QDateTime} 606 "PageURL": QUrl, "Downloaded": QDateTime}
463 </dd> 607 </dd>
464 </dl><a NAME="DownloadItem.setIcon" ID="DownloadItem.setIcon"></a> 608 </dl>
609 <a NAME="DownloadItem.setIcon" ID="DownloadItem.setIcon"></a>
465 <h4>DownloadItem.setIcon</h4> 610 <h4>DownloadItem.setIcon</h4>
466 <b>setIcon</b>(<i>icon</i>) 611 <b>setIcon</b>(<i>icon</i>)
612
467 <p> 613 <p>
468 Public method to set the download icon. 614 Public method to set the download icon.
469 </p><dl> 615 </p>
616 <dl>
617
470 <dt><i>icon</i></dt> 618 <dt><i>icon</i></dt>
471 <dd> 619 <dd>
472 reference to the icon to be set (QIcon) 620 reference to the icon to be set (QIcon)
473 </dd> 621 </dd>
474 </dl> 622 </dl>

eric ide

mercurial