mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-13 16:39:43 -05:00
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:
parent
8d992ec817
commit
741948acff
@ -504,7 +504,7 @@ void MainWindow::updateStatus()
|
|||||||
rsicontrol -> ConfigGetDataRates(downKb, upKb);
|
rsicontrol -> ConfigGetDataRates(downKb, upKb);
|
||||||
|
|
||||||
if (ratesstatus)
|
if (ratesstatus)
|
||||||
ratesstatus->getRatesStatus();
|
ratesstatus->getRatesStatus(downKb, upKb);
|
||||||
|
|
||||||
if (peerstatus)
|
if (peerstatus)
|
||||||
peerstatus->getPeerStatus(nFriendCount, nOnlineCount);
|
peerstatus->getPeerStatus(nFriendCount, nOnlineCount);
|
||||||
|
@ -47,12 +47,9 @@ RatesStatus::RatesStatus(QWidget *parent)
|
|||||||
setLayout(hbox);
|
setLayout(hbox);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RatesStatus::getRatesStatus()
|
void RatesStatus::getRatesStatus(float downKb, float upKb)
|
||||||
{
|
{
|
||||||
/* set users/friends/network */
|
/* set users/friends/network */
|
||||||
float downKb = 0;
|
|
||||||
float upKb = 0;
|
|
||||||
rsicontrol -> ConfigGetDataRates(downKb, upKb);
|
|
||||||
|
|
||||||
std::ostringstream out;
|
std::ostringstream out;
|
||||||
out << std::setprecision(2) << std::fixed << downKb ;
|
out << std::setprecision(2) << std::fixed << downKb ;
|
||||||
|
@ -32,7 +32,7 @@ class RatesStatus : public QWidget
|
|||||||
public:
|
public:
|
||||||
RatesStatus(QWidget *parent = 0);
|
RatesStatus(QWidget *parent = 0);
|
||||||
|
|
||||||
void getRatesStatus( );
|
void getRatesStatus(float downKb, float upKb);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QLabel *iconLabel, *statusRates;
|
QLabel *iconLabel, *statusRates;
|
||||||
|
Loading…
Reference in New Issue
Block a user