|
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.DownloadDialog</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.DownloadDialog</h1> |
|
24 <p> |
|
25 Module implementing the download 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="#DownloadDialog">DownloadDialog</a></td> |
|
35 <td>Class implementing the download 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="DownloadDialog" ID="DownloadDialog"></a> |
|
44 <h2>DownloadDialog</h2> |
|
45 <p> |
|
46 Class implementing the download dialog. |
|
47 </p><h4>Signals</h4> |
|
48 <dl> |
|
49 <dt>done()</dt> |
|
50 <dd> |
|
51 emitted just before the dialog is closed |
|
52 </dd> |
|
53 </dl> |
|
54 <h3>Derived from</h3> |
|
55 QWidget, Ui_DownloadDialog |
|
56 <h3>Class Attributes</h3> |
|
57 <table> |
|
58 <tr><td>done</td></tr> |
|
59 </table> |
|
60 <h3>Methods</h3> |
|
61 <table> |
|
62 <tr> |
|
63 <td><a href="#DownloadDialog.__init__">DownloadDialog</a></td> |
|
64 <td>Constructor</td> |
|
65 </tr><tr> |
|
66 <td><a href="#DownloadDialog.__dataString">__dataString</a></td> |
|
67 <td>Private method to generate a formatted data string.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#DownloadDialog.__downloadProgress">__downloadProgress</a></td> |
|
70 <td>Private method show the download progress.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#DownloadDialog.__downloadedSuccessfully">__downloadedSuccessfully</a></td> |
|
73 <td>Private method to determine the download status.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#DownloadDialog.__downloading">__downloading</a></td> |
|
76 <td>Private method to determine, if a download is in progress.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#DownloadDialog.__finished">__finished</a></td> |
|
79 <td>Private slot to handle the download finished.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#DownloadDialog.__getFileName">__getFileName</a></td> |
|
82 <td>Private method to get the filename to save to from the user.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#DownloadDialog.__initialize">__initialize</a></td> |
|
85 <td>Private method to (re)initialize the dialog.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#DownloadDialog.__metaDataChanged">__metaDataChanged</a></td> |
|
88 <td>Private slot to handle a change of the meta data.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#DownloadDialog.__networkError">__networkError</a></td> |
|
91 <td>Private slot to handle a network error.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#DownloadDialog.__open">__open</a></td> |
|
94 <td>Private slot to open the downloaded file.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#DownloadDialog.__readyRead">__readyRead</a></td> |
|
97 <td>Private slot to read the available data.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#DownloadDialog.__saveFileName">__saveFileName</a></td> |
|
100 <td>Private method to calculate a name for the file to download.</td> |
|
101 </tr><tr> |
|
102 <td><a href="#DownloadDialog.__stop">__stop</a></td> |
|
103 <td>Private slot to stop the download.</td> |
|
104 </tr><tr> |
|
105 <td><a href="#DownloadDialog.__tryAgain">__tryAgain</a></td> |
|
106 <td>Private slot to retry the download.</td> |
|
107 </tr><tr> |
|
108 <td><a href="#DownloadDialog.__updateInfoLabel">__updateInfoLabel</a></td> |
|
109 <td>Private method to update the info label.</td> |
|
110 </tr><tr> |
|
111 <td><a href="#DownloadDialog.closeEvent">closeEvent</a></td> |
|
112 <td>Protected method called when the dialog is closed.</td> |
|
113 </tr><tr> |
|
114 <td><a href="#DownloadDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> |
|
115 <td>Private slot called by a button of the button box clicked.</td> |
|
116 </tr> |
|
117 </table> |
|
118 <a NAME="DownloadDialog.__init__" ID="DownloadDialog.__init__"></a> |
|
119 <h4>DownloadDialog (Constructor)</h4> |
|
120 <b>DownloadDialog</b>(<i>reply = None, requestFilename = False, webPage = None, download = False, parent = None</i>) |
|
121 <p> |
|
122 Constructor |
|
123 </p><dl> |
|
124 <dt><i>reply</i></dt> |
|
125 <dd> |
|
126 reference to the network reply object (QNetworkReply) |
|
127 </dd><dt><i>requestFilename</i></dt> |
|
128 <dd> |
|
129 flag indicating to ask the user for a filename (boolean) |
|
130 </dd><dt><i>webPage</i></dt> |
|
131 <dd> |
|
132 reference to the web page object the download originated |
|
133 from (QWebPage) |
|
134 </dd><dt><i>download</i></dt> |
|
135 <dd> |
|
136 flag indicating a download operation (boolean) |
|
137 </dd><dt><i>parent</i></dt> |
|
138 <dd> |
|
139 reference to the parent widget (QWidget) |
|
140 </dd> |
|
141 </dl><a NAME="DownloadDialog.__dataString" ID="DownloadDialog.__dataString"></a> |
|
142 <h4>DownloadDialog.__dataString</h4> |
|
143 <b>__dataString</b>(<i>size</i>) |
|
144 <p> |
|
145 Private method to generate a formatted data string. |
|
146 </p><dl> |
|
147 <dt><i>size</i></dt> |
|
148 <dd> |
|
149 size to be formatted (integer) |
|
150 </dd> |
|
151 </dl><dl> |
|
152 <dt>Returns:</dt> |
|
153 <dd> |
|
154 formatted data string (QString) |
|
155 </dd> |
|
156 </dl><a NAME="DownloadDialog.__downloadProgress" ID="DownloadDialog.__downloadProgress"></a> |
|
157 <h4>DownloadDialog.__downloadProgress</h4> |
|
158 <b>__downloadProgress</b>(<i>received, total</i>) |
|
159 <p> |
|
160 Private method show the download progress. |
|
161 </p><dl> |
|
162 <dt><i>received</i></dt> |
|
163 <dd> |
|
164 number of bytes received (integer) |
|
165 </dd><dt><i>total</i></dt> |
|
166 <dd> |
|
167 number of total bytes (integer) |
|
168 </dd> |
|
169 </dl><a NAME="DownloadDialog.__downloadedSuccessfully" ID="DownloadDialog.__downloadedSuccessfully"></a> |
|
170 <h4>DownloadDialog.__downloadedSuccessfully</h4> |
|
171 <b>__downloadedSuccessfully</b>(<i></i>) |
|
172 <p> |
|
173 Private method to determine the download status. |
|
174 </p><dl> |
|
175 <dt>Returns:</dt> |
|
176 <dd> |
|
177 download status (boolean) |
|
178 </dd> |
|
179 </dl><a NAME="DownloadDialog.__downloading" ID="DownloadDialog.__downloading"></a> |
|
180 <h4>DownloadDialog.__downloading</h4> |
|
181 <b>__downloading</b>(<i></i>) |
|
182 <p> |
|
183 Private method to determine, if a download is in progress. |
|
184 </p><dl> |
|
185 <dt>Returns:</dt> |
|
186 <dd> |
|
187 flag indicating a download is in progress (boolean) |
|
188 </dd> |
|
189 </dl><a NAME="DownloadDialog.__finished" ID="DownloadDialog.__finished"></a> |
|
190 <h4>DownloadDialog.__finished</h4> |
|
191 <b>__finished</b>(<i></i>) |
|
192 <p> |
|
193 Private slot to handle the download finished. |
|
194 </p><a NAME="DownloadDialog.__getFileName" ID="DownloadDialog.__getFileName"></a> |
|
195 <h4>DownloadDialog.__getFileName</h4> |
|
196 <b>__getFileName</b>(<i></i>) |
|
197 <p> |
|
198 Private method to get the filename to save to from the user. |
|
199 </p><a NAME="DownloadDialog.__initialize" ID="DownloadDialog.__initialize"></a> |
|
200 <h4>DownloadDialog.__initialize</h4> |
|
201 <b>__initialize</b>(<i></i>) |
|
202 <p> |
|
203 Private method to (re)initialize the dialog. |
|
204 </p><a NAME="DownloadDialog.__metaDataChanged" ID="DownloadDialog.__metaDataChanged"></a> |
|
205 <h4>DownloadDialog.__metaDataChanged</h4> |
|
206 <b>__metaDataChanged</b>(<i></i>) |
|
207 <p> |
|
208 Private slot to handle a change of the meta data. |
|
209 </p><a NAME="DownloadDialog.__networkError" ID="DownloadDialog.__networkError"></a> |
|
210 <h4>DownloadDialog.__networkError</h4> |
|
211 <b>__networkError</b>(<i></i>) |
|
212 <p> |
|
213 Private slot to handle a network error. |
|
214 </p><a NAME="DownloadDialog.__open" ID="DownloadDialog.__open"></a> |
|
215 <h4>DownloadDialog.__open</h4> |
|
216 <b>__open</b>(<i></i>) |
|
217 <p> |
|
218 Private slot to open the downloaded file. |
|
219 </p><a NAME="DownloadDialog.__readyRead" ID="DownloadDialog.__readyRead"></a> |
|
220 <h4>DownloadDialog.__readyRead</h4> |
|
221 <b>__readyRead</b>(<i></i>) |
|
222 <p> |
|
223 Private slot to read the available data. |
|
224 </p><a NAME="DownloadDialog.__saveFileName" ID="DownloadDialog.__saveFileName"></a> |
|
225 <h4>DownloadDialog.__saveFileName</h4> |
|
226 <b>__saveFileName</b>(<i>directory</i>) |
|
227 <p> |
|
228 Private method to calculate a name for the file to download. |
|
229 </p><dl> |
|
230 <dt><i>directory</i></dt> |
|
231 <dd> |
|
232 name of the directory to store the file into (string) |
|
233 </dd> |
|
234 </dl><dl> |
|
235 <dt>Returns:</dt> |
|
236 <dd> |
|
237 proposed filename (string) |
|
238 </dd> |
|
239 </dl><a NAME="DownloadDialog.__stop" ID="DownloadDialog.__stop"></a> |
|
240 <h4>DownloadDialog.__stop</h4> |
|
241 <b>__stop</b>(<i></i>) |
|
242 <p> |
|
243 Private slot to stop the download. |
|
244 </p><a NAME="DownloadDialog.__tryAgain" ID="DownloadDialog.__tryAgain"></a> |
|
245 <h4>DownloadDialog.__tryAgain</h4> |
|
246 <b>__tryAgain</b>(<i></i>) |
|
247 <p> |
|
248 Private slot to retry the download. |
|
249 </p><a NAME="DownloadDialog.__updateInfoLabel" ID="DownloadDialog.__updateInfoLabel"></a> |
|
250 <h4>DownloadDialog.__updateInfoLabel</h4> |
|
251 <b>__updateInfoLabel</b>(<i></i>) |
|
252 <p> |
|
253 Private method to update the info label. |
|
254 </p><a NAME="DownloadDialog.closeEvent" ID="DownloadDialog.closeEvent"></a> |
|
255 <h4>DownloadDialog.closeEvent</h4> |
|
256 <b>closeEvent</b>(<i>evt</i>) |
|
257 <p> |
|
258 Protected method called when the dialog is closed. |
|
259 </p><a NAME="DownloadDialog.on_buttonBox_clicked" ID="DownloadDialog.on_buttonBox_clicked"></a> |
|
260 <h4>DownloadDialog.on_buttonBox_clicked</h4> |
|
261 <b>on_buttonBox_clicked</b>(<i>button</i>) |
|
262 <p> |
|
263 Private slot called by a button of the button box clicked. |
|
264 </p><dl> |
|
265 <dt><i>button</i></dt> |
|
266 <dd> |
|
267 button that was clicked (QAbstractButton) |
|
268 </dd> |
|
269 </dl> |
|
270 <div align="right"><a href="#top">Up</a></div> |
|
271 <hr /> |
|
272 </body></html> |