mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-13 15:49:04 -05:00
added checkbox to toggle logscale in statistics
This commit is contained in:
parent
63b88ecf68
commit
8296fa9f22
4 changed files with 24 additions and 14 deletions
|
|
@ -22,6 +22,8 @@ BandwidthStatsWidget::BandwidthStatsWidget(QWidget *parent)
|
|||
|
||||
ui.unit_CB->addItem(tr("KB/s")) ;
|
||||
ui.unit_CB->addItem(tr("Count")) ;
|
||||
|
||||
ui.logScale_CB->setChecked(true) ;
|
||||
|
||||
ui.bwgraph_BW->source()->setSelector(BWGraphSource::SELECTOR_TYPE_FRIEND,BWGraphSource::GRAPH_TYPE_SUM) ;
|
||||
ui.bwgraph_BW->source()->setSelector(BWGraphSource::SELECTOR_TYPE_SERVICE,BWGraphSource::GRAPH_TYPE_SUM) ;
|
||||
|
|
@ -33,6 +35,7 @@ BandwidthStatsWidget::BandwidthStatsWidget(QWidget *parent)
|
|||
QObject::connect(ui.updn_CB ,SIGNAL(currentIndexChanged(int)),this, SLOT( updateUpDownSelection(int))) ;
|
||||
QObject::connect(ui.unit_CB ,SIGNAL(currentIndexChanged(int)),this, SLOT( updateUnitSelection(int))) ;
|
||||
QObject::connect(ui.service_CB,SIGNAL(currentIndexChanged(int)),this, SLOT(updateServiceSelection(int))) ;
|
||||
QObject::connect(ui.logScale_CB,SIGNAL(toggled(bool)),this, SLOT(toggleLogScale(bool))) ;
|
||||
|
||||
// setup one timer for auto-update
|
||||
|
||||
|
|
@ -42,6 +45,13 @@ BandwidthStatsWidget::BandwidthStatsWidget(QWidget *parent)
|
|||
mTimer->start(2000) ;
|
||||
}
|
||||
|
||||
void BandwidthStatsWidget::toggleLogScale(bool b)
|
||||
{
|
||||
if(b)
|
||||
ui.bwgraph_BW->setFlags(RSGraphWidget::RSGRAPH_FLAGS_LOG_SCALE_Y) ;
|
||||
else
|
||||
ui.bwgraph_BW->resetFlags(RSGraphWidget::RSGRAPH_FLAGS_LOG_SCALE_Y) ;
|
||||
}
|
||||
void BandwidthStatsWidget::updateComboBoxes()
|
||||
{
|
||||
if(!isVisible())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue