associated changes for the GUI. move all datarate reference to use rsConfig.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5890 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2012-11-25 20:26:32 +00:00
parent de80f2aa3e
commit 4561752c45
5 changed files with 21 additions and 24 deletions

View File

@ -580,7 +580,7 @@ void MainWindow::updateStatus()
float downKb = 0;
float upKb = 0;
rsicontrol -> ConfigGetDataRates(downKb, upKb);
rsConfig->GetCurrentDataRates(downKb, upKb);
if (ratesstatus)
ratesstatus->getRatesStatus(downKb, upKb);

View File

@ -29,7 +29,7 @@
#include <QHeaderView>
#include <retroshare/rsfiles.h>
#include <retroshare/rsiface.h>
#include <retroshare/rsconfig.h>
#include <retroshare/rspeers.h>
#include <retroshare/rstypes.h>
#include "settings/rsharesettings.h"
@ -149,7 +149,7 @@ void QuickStartWizard::on_pushButtonConnectionNext_clicked()
{
rsPeers->setVisState(rsPeers->getOwnId(), visState);
}
rsicontrol->ConfigSetDataRates( ui.doubleSpinBoxDownloadSpeed->value(), ui.doubleSpinBoxUploadSpeed->value() );
rsConfig->SetMaxDataRates( ui.doubleSpinBoxDownloadSpeed->value(), ui.doubleSpinBoxUploadSpeed->value() );
ui.pagesWizard->setCurrentIndex(2);
}
@ -450,12 +450,12 @@ void QuickStartWizard::loadNetwork()
ui.discoveryComboBox->setCurrentIndex(netIndex);
rsiface->lockData(); /* Lock Interface */
int dlrate = 0;
int ulrate = 0;
rsConfig->GetMaxDataRates(dlrate, ulrate);
ui.doubleSpinBoxDownloadSpeed->setValue(dlrate);
ui.doubleSpinBoxUploadSpeed->setValue(ulrate);
ui.doubleSpinBoxDownloadSpeed->setValue(rsiface->getConfig().maxDownloadDataRate);
ui.doubleSpinBoxUploadSpeed->setValue(rsiface->getConfig().maxUploadDataRate);
rsiface->unlockData(); /* UnLock Interface */
}
void QuickStartWizard::saveChanges()
@ -528,7 +528,7 @@ void QuickStartWizard::saveChanges()
rsPeers->setExtAddress(rsPeers->getOwnId(), ui.extAddress->text().toStdString(), ui.extPort->value());
}*/
rsicontrol->ConfigSetDataRates( ui.doubleSpinBoxDownloadSpeed->value(), ui.doubleSpinBoxUploadSpeed->value() );
rsConfig->SetMaxDataRates( ui.doubleSpinBoxDownloadSpeed->value(), ui.doubleSpinBoxUploadSpeed->value() );
loadNetwork();
}

View File

@ -25,7 +25,7 @@
#include <control/bandwidthevent.h>
#include "bwgraph.h"
#include <retroshare-gui/RsAutoUpdatePage.h>
#include <retroshare/rsiface.h>
#include <retroshare/rsconfig.h>
#include <iomanip>
#include <unistd.h>
@ -110,7 +110,7 @@ BandwidthGraph::timerEvent( QTimerEvent * )
/* set users/friends/network */
/*float downKb = 0;
float upKb = 0;
rsicontrol -> ConfigGetDataRates(downKb, upKb);
rsConfig->GetCurrentDataRates(downKb, upKb);
updateGraph(downKb,upKb);*/
@ -125,7 +125,7 @@ BandwidthGraph::updategraphstatus( )
/* set users/friends/network */
float downKb = 0;
float upKb = 0;
rsicontrol -> ConfigGetDataRates(downKb, upKb);
rsConfig->GetCurrentDataRates(downKb, upKb);
updateGraph(downKb,upKb);

View File

@ -27,7 +27,7 @@
#include <iostream>
#include <retroshare/rsiface.h>
#include <retroshare/rsconfig.h>
#include <retroshare/rspeers.h>
#include <retroshare/rsturtle.h>
@ -170,13 +170,11 @@ void ServerPage::load()
ui.discComboBox->setCurrentIndex(netIndex);
rsiface->lockData(); /* Lock Interface */
ui.totalDownloadRate->setValue(rsiface->getConfig().maxDownloadDataRate);
ui.totalUploadRate->setValue(rsiface->getConfig().maxUploadDataRate);
rsiface->unlockData(); /* UnLock Interface */
int dlrate = 0;
int ulrate = 0;
rsConfig->GetMaxDataRates(dlrate, ulrate);
ui.totalDownloadRate->setValue(dlrate);
ui.totalUploadRate->setValue(ulrate);
toggleUPnP();
@ -317,8 +315,7 @@ void ServerPage::saveAddresses()
}
rsPeers->setDynDNS(ownId, ui.dynDNS->text().toStdString());
rsicontrol->ConfigSetDataRates( ui.totalDownloadRate->value(), ui.totalUploadRate->value() );
rsConfig->SetMaxDataRates( ui.totalDownloadRate->value(), ui.totalUploadRate->value() );
load();
}

View File

@ -23,7 +23,7 @@
#include "StatisticDialog.h"
#include <control/bandwidthevent.h>
#include <retroshare/rsiface.h>
#include <retroshare/rsconfig.h>
#include <QTime>
#include <QHeaderView>
@ -121,7 +121,7 @@ void StatisticDialog::timerEvent( QTimerEvent * )
/* set users/friends/network */
float downKb = 0;
float upKb = 0;
rsicontrol -> ConfigGetDataRates(downKb, upKb);
rsConfig->GetCurrentDataRates(downKb, upKb);
updateGraph(downKb,upKb);
//