Download a resource (file) from the web to a location on the disk. More...
#include <DownloadDialog.h>
Public Slots | |
| void | cancel_download () |
| void | read_response_header (const QHttpResponseHeader &response_header) |
| void | request_finished (int, bool) |
| void | update_progress (int read_bytes, int total_bytes) |
Signals | |
| void | download_finished (DownloadDialog *d, bool ok, QString s, QString p, QString e) |
Public Member Functions | |
| DownloadDialog (QUrl url, QString s, QString p=QString()) | |
| QByteArray | return_data () |
| ~DownloadDialog () | |
Public Attributes | |
| QByteArray | ba |
| QString | path |
| QString | purpose |
| bool | stopped |
| QUrl | url |
Protected Member Functions | |
| void | closeEvent (QCloseEvent *e) |
Protected Attributes | |
| QBuffer * | buffer |
| QHttp * | http |
| int | http_request_id |
Download a resource (file) from the web to a location on the disk.
Definition at line 44 of file DownloadDialog.h.
| DownloadDialog::DownloadDialog | ( | QUrl | url, | |
| QString | s, | |||
| QString | p = QString() | |||
| ) |
Definition at line 34 of file DownloadDialog.cpp.
References ba, buffer, cancel_download(), draftlibs::fcgeo::connect(), http, http_request_id, path, purpose, read_response_header(), request_finished(), stopped, update_progress(), and url.
| DownloadDialog::~DownloadDialog | ( | ) |
Definition at line 90 of file DownloadDialog.cpp.
| void DownloadDialog::cancel_download | ( | ) | [slot] |
Definition at line 148 of file DownloadDialog.cpp.
References buffer, http, and stopped.
Referenced by DownloadDialog().
| void DownloadDialog::closeEvent | ( | QCloseEvent * | e | ) | [protected] |
Definition at line 157 of file DownloadDialog.cpp.
| void Gui::Dialog::DownloadDialog::download_finished | ( | DownloadDialog * | d, | |
| bool | ok, | |||
| QString | s, | |||
| QString | p, | |||
| QString | e | |||
| ) | [signal] |
Referenced by read_response_header(), and request_finished().
| void DownloadDialog::read_response_header | ( | const QHttpResponseHeader & | response_header | ) | [slot] |
Definition at line 119 of file DownloadDialog.cpp.
References download_finished(), http, path, purpose, and stopped.
Referenced by DownloadDialog().
| void DownloadDialog::request_finished | ( | int | request_id, | |
| bool | request_error | |||
| ) | [slot] |
Definition at line 94 of file DownloadDialog.cpp.
References buffer, download_finished(), http, http_request_id, path, purpose, and stopped.
Referenced by DownloadDialog().
| QByteArray DownloadDialog::return_data | ( | ) |
Definition at line 133 of file DownloadDialog.cpp.
References ba.
| void DownloadDialog::update_progress | ( | int | read_bytes, | |
| int | total_bytes | |||
| ) | [slot] |
Definition at line 138 of file DownloadDialog.cpp.
References stopped.
Referenced by DownloadDialog().
| QByteArray Gui::Dialog::DownloadDialog::ba |
Definition at line 55 of file DownloadDialog.h.
Referenced by DownloadDialog(), and return_data().
QBuffer* Gui::Dialog::DownloadDialog::buffer [protected] |
Definition at line 79 of file DownloadDialog.h.
Referenced by cancel_download(), closeEvent(), DownloadDialog(), and request_finished().
QHttp* Gui::Dialog::DownloadDialog::http [protected] |
Definition at line 77 of file DownloadDialog.h.
Referenced by cancel_download(), closeEvent(), DownloadDialog(), read_response_header(), and request_finished().
int Gui::Dialog::DownloadDialog::http_request_id [protected] |
Definition at line 78 of file DownloadDialog.h.
Referenced by DownloadDialog(), and request_finished().
Definition at line 54 of file DownloadDialog.h.
Referenced by DownloadDialog(), read_response_header(), and request_finished().
Definition at line 53 of file DownloadDialog.h.
Referenced by DownloadDialog(), read_response_header(), and request_finished().
Definition at line 56 of file DownloadDialog.h.
Referenced by cancel_download(), closeEvent(), DownloadDialog(), read_response_header(), request_finished(), and update_progress().
Definition at line 52 of file DownloadDialog.h.
Referenced by DownloadDialog().
1.6.1