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