Call RsControl::ConfigGetDataRates only once a second in the QTimer in MainWindow.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3707 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-10-28 10:41:19 +00:00
parent 8d992ec817
commit 741948acff
3 changed files with 3 additions and 6 deletions

View File

@ -504,7 +504,7 @@ void MainWindow::updateStatus()
rsicontrol -> ConfigGetDataRates(downKb, upKb);
if (ratesstatus)
ratesstatus->getRatesStatus();
ratesstatus->getRatesStatus(downKb, upKb);
if (peerstatus)
peerstatus->getPeerStatus(nFriendCount, nOnlineCount);

View File

@ -47,12 +47,9 @@ RatesStatus::RatesStatus(QWidget *parent)
setLayout(hbox);
}
void RatesStatus::getRatesStatus()
void RatesStatus::getRatesStatus(float downKb, float upKb)
{
/* set users/friends/network */
float downKb = 0;
float upKb = 0;
rsicontrol -> ConfigGetDataRates(downKb, upKb);
std::ostringstream out;
out << std::setprecision(2) << std::fixed << downKb ;

View File

@ -32,7 +32,7 @@ class RatesStatus : public QWidget
public:
RatesStatus(QWidget *parent = 0);
void getRatesStatus( );
void getRatesStatus(float downKb, float upKb);
private:
QLabel *iconLabel, *statusRates;