00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef QTS_DOWNLOADDIALOG_H
00010 #define QTS_DOWNLOADDIALOG_H
00011
00012 #include <qvariant.h>
00013 #include <qdialog.h>
00014 #include <qfile.h>
00015 #include <qnetwork.h>
00016 #include <qnetworkprotocol.h>
00017 #include <qurloperator.h>
00018 #include "rs_debug.h"
00019 class QVBoxLayout;
00020 class QHBoxLayout;
00021 class QGridLayout;
00022 class QGroupBox;
00023 class QLabel;
00024 class QPushButton;
00025
00026 class QTS_DownloadDialog : public QDialog
00027 {
00028 Q_OBJECT
00029
00030 public:
00031 QTS_DownloadDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
00032 ~QTS_DownloadDialog();
00033
00034 QGroupBox* gbProgress;
00035 QLabel* lProgress;
00036 QLabel* lBytes;
00037 QPushButton* bCancel;
00038
00039
00040 public slots:
00041 virtual void init();
00042 virtual void destroy();
00043 virtual void startDownload( const QString & url, const QString & fileName );
00044 virtual void slotStart( QNetworkOperation * );
00045 virtual void slotFinished( QNetworkOperation * );
00046 virtual void slotDataTransferProgress( int, int, QNetworkOperation * );
00047 virtual void slotData( const QByteArray & data, QNetworkOperation * );
00048 virtual void cancelled();
00049
00050 protected:
00051
00052 int bytes;
00053 QUrlOperator* urlOperator;
00054 QFile* file;
00055 };
00056
00057 #endif // QTS_DOWNLOADDIALOG_H