Subversion Repositories svn1-original

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
297 david 1
#ifndef HTTPWINDOW_H
2
#define HTTPWINDOW_H
3
 
4
#include <QDialog>
5
#include <QNetworkAccessManager>
6
#include <QUrl>
7
 
8
QT_BEGIN_NAMESPACE
9
class QDialogButtonBox;
10
class QFile;
11
class QLabel;
12
class QLineEdit;
13
class QProgressDialog;
14
class QPushButton;
15
class QSslError;
16
class QAuthenticator;
17
class QNetworkReply;
18
 
19
 
20
QT_END_NAMESPACE
21
 
22
class Qmhttppath : public QDialog
23
{
24
    Q_OBJECT
25
 
26
public:
27
    Qmhttppath(QWidget *parent = 0);
28
 
29
    void startRequest(QUrl url);
30
 
31
    QByteArray allData;
32
    QLineEdit *urlLineEdit;
33
 
34
private slots:
35
    void downloadFile();
36
    void cancelDownload();
37
    void httpFinished();
38
    void httpReadyRead();
39
    void updateDataReadProgress(qint64 bytesRead, qint64 totalBytes);
40
    void enableDownloadButton();
41
    void slotAuthenticationRequired(QNetworkReply*,QAuthenticator *);
42
#ifndef QT_NO_OPENSSL
43
    void sslErrors(QNetworkReply*,const QList<QSslError> &errors);
44
#endif
45
 
46
private:
47
    QLabel *statusLabel;
48
    QLabel *urlLabel;
49
 
50
    QProgressDialog *progressDialog;
51
    QPushButton *downloadButton;
52
    QPushButton *quitButton;
53
    QDialogButtonBox *buttonBox;
54
 
55
    QUrl url;
56
    QNetworkAccessManager qnam;
57
    QNetworkReply *reply;
58
    //QFile *file;
59
    int httpGetId;
60
    bool httpRequestAborted;
61
};
62
 
63
#endif