|
Isis 3.0 Application Source Code Reference |
Home |
00001 #ifndef FTPGET_H 00002 #define FTPGET_H 00003 00004 #include <QFile> 00005 #include <QFtp> 00006 #include "Progress.h" 00007 00008 class QUrl; 00009 namespace Isis { 00010 /** 00011 * @author ????-??-?? Unknown 00012 * 00013 * @internal 00014 */ 00015 class FtpGet : public QObject { 00016 Q_OBJECT 00017 00018 public: 00019 FtpGet(QObject *parent = 0); 00020 00021 bool getFile(const QUrl &url, QString topath); 00022 00023 bool error() const { 00024 return p_error; 00025 }; 00026 00027 00028 00029 signals: 00030 void done(); 00031 00032 private slots: 00033 void ftpDone(bool error); 00034 void ftpProgress(qint64 done, qint64 total); 00035 00036 private: 00037 QFtp p_ftp; 00038 QFile p_file; 00039 bool p_error; 00040 int p_lastDone; 00041 Progress p_progress; 00042 00043 }; 00044 } 00045 #endif