diff --git a/retroshare-gui/src/gui/statistics/BWGraph.h b/retroshare-gui/src/gui/statistics/BWGraph.h index dbab1ed14..92187913f 100644 --- a/retroshare-gui/src/gui/statistics/BWGraph.h +++ b/retroshare-gui/src/gui/statistics/BWGraph.h @@ -25,7 +25,6 @@ public: virtual void getValues(std::map& values) const; virtual QString displayValue(float v) const; -// virtual QString displayName(int i) const; virtual QString legend(int i,float v) const; virtual void update(); QString unitName() const ; diff --git a/retroshare-gui/src/gui/statistics/BandwidthStatsWidget.cpp b/retroshare-gui/src/gui/statistics/BandwidthStatsWidget.cpp index 5d411c120..5ef4a9d68 100644 --- a/retroshare-gui/src/gui/statistics/BandwidthStatsWidget.cpp +++ b/retroshare-gui/src/gui/statistics/BandwidthStatsWidget.cpp @@ -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()) diff --git a/retroshare-gui/src/gui/statistics/BandwidthStatsWidget.h b/retroshare-gui/src/gui/statistics/BandwidthStatsWidget.h index b3fc1e57f..9a835fc57 100644 --- a/retroshare-gui/src/gui/statistics/BandwidthStatsWidget.h +++ b/retroshare-gui/src/gui/statistics/BandwidthStatsWidget.h @@ -14,7 +14,8 @@ protected slots: void updateComboBoxes() ; void updateUpDownSelection(int n); void updateUnitSelection(int n); - + void toggleLogScale(bool b); + private: Ui::BwStatsWidget ui; diff --git a/retroshare-gui/src/gui/statistics/BandwidthStatsWidget.ui b/retroshare-gui/src/gui/statistics/BandwidthStatsWidget.ui index 3ed54ef4e..e99058ac3 100644 --- a/retroshare-gui/src/gui/statistics/BandwidthStatsWidget.ui +++ b/retroshare-gui/src/gui/statistics/BandwidthStatsWidget.ui @@ -6,8 +6,8 @@ 0 0 - 812 - 349 + 1128 + 385 @@ -18,14 +18,7 @@ 0 - - - QFrame::StyledPanel - - - QFrame::Raised - - + @@ -110,6 +103,13 @@ + + + + Log scale + + + @@ -131,8 +131,8 @@ BWGraph - QFrame -
gui/statistics/BWGraph.h
+ QWidget +
gui/statistics/BWGraph.h
1