/******************************************************************************************************** * PROGRAM : FreeGo4 * DATE - TIME : dimanche 06 août 2006 - 19h15 * AUTHOR : Azevedo Filipe aka Nox PasNox ( pasnox at gmail dot com ) * FILENAME : UIRate.h * LICENSE : GPL * COMMENTARY : ********************************************************************************************************/ #ifndef UIRATE_H #define UIRATE_H // #include "ui_UIRate.h" // #include <QPointer> #include <QUrl> #include <QHttp> #include <QDateTime> #include <QBuffer> #include <QTimer> #include <QTime> // class UIRate : public fgDialog, public Ui::UIRate { Q_OBJECT // public: static UIRate* self( QWidget* = 0 ); explicit UIRate( QWidget* = 0 ); ~UIRate(); // private slots: void printServer( int, bool ); void printResultGet( bool ); void printResultSend(); void getServer(); void getData(); void sendData(); void updateProgressBar( int, int ); void bytesWritten ( qint64 ); void timeout(); void abortSend(); // private: static QPointer<UIRate> mSelf; int requestServerId; bool mErrorGet; bool mErrorSend; QUrl mServer; QHttp mHttp; QTime mGetTime; QTime mSendTime; QBuffer mBuffer; qint64 mReceive, mSend; QTimer mTimer; float dDl, dUl; QTcpSocket* mSendSocket; enum Phase { None, GetServerPhase, GetPhase, SendPhase } mPhase; // }; // #endif // UIRATE_H