Sophie

Sophie

distrib > Mandriva > 2011.0 > i586 > media > contrib-release-debug > by-pkgid > a682ed06b7e9c8d5c3b6ae729da2d8d5 > files > 119

freego-debug-4.5-1mdv2011.0.i586.rpm

/********************************************************************************************************
 * 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