Changeset 80249 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Aug 13, 2019 11:43:59 AM (5 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime/information
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIPerformanceMonitor.cpp
r80247 r80249 801 801 { 802 802 QString strInfo; 803 QString strReceiveColor; 803 804 if (m_infoLabels[m_strNetMetricName]->isEnabled()) 804 strInfo = QString("<b>%1</b></b><br/><font color=\"#FF0000\">%2: %3</font><br/><font color=\"#0000FF\">%4: %5</font><br/>%6: %7").arg(m_strNetInfoLabelTitle) 805 strInfo = QString("<b>%1</b></b><br/><font color=\"%2\">%3: %4</font><br/><font color=\"%5\">%6: %7</font><br/>%8: %9") 806 .arg(m_strNetInfoLabelTitle) 807 .arg(dataColorString(m_strNetMetricName, 0)) 805 808 .arg(m_strNetInfoLabelReceived).arg(uiCommon().formatSize((quint64)iReceiveRate, iDecimalCount)) 809 .arg(dataColorString(m_strNetMetricName, 1)) 806 810 .arg(m_strNetInfoLabelTransmitted).arg(uiCommon().formatSize((quint64)iTransmitRate, iDecimalCount)) 807 811 .arg(m_strNetInfoLabelMaximum).arg(uiCommon().formatSize((quint64)iMaximum, iDecimalCount)); … … 815 819 } 816 820 821 QString UIPerformanceMonitor::dataColorString(const QString &strChartName, int iDataIndex) 822 { 823 if (!m_charts.contains(strChartName)) 824 return QColor(Qt::red).name(QColor::HexRgb); 825 UIChart *pChart = m_charts[strChartName]; 826 if (!pChart) 827 return QColor(Qt::red).name(QColor::HexRgb); 828 return pChart->dataSeriesColor(iDataIndex).name(QColor::HexRgb); 829 } 817 830 #include "UIPerformanceMonitor.moc" -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIPerformanceMonitor.h
r80243 r80249 110 110 void updateRAMGraphsAndMetric(quint64 iTotalRAM, quint64 iFreeRAM); 111 111 void updateNewGraphsAndMetric(ULONG iReceiveRate, ULONG iTransmitRate); 112 QString dataColorString(const QString &strChartName, int iDataIndex); 112 113 113 114 bool m_fGuestAdditionsAvailable;
Note:
See TracChangeset
for help on using the changeset viewer.