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