VirtualBox

Changeset 102903 in vbox for trunk/src


Ignore:
Timestamp:
Jan 16, 2024 3:37:33 PM (13 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10501. Some more cleaning.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/activity/vmactivity
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/activity/vmactivity/UIVMActivityMonitor.cpp

    r102901 r102903  
    979979*********************************************************************************************************************************/
    980980
    981 UIMetric::UIMetric(const QString &strName, const QString &strUnit, int iMaximumQueueSize)
    982     : m_strName(strName)
    983     , m_strUnit(strUnit)
     981UIMetric::UIMetric(const QString &strUnit, int iMaximumQueueSize)
     982    : m_strUnit(strUnit)
    984983    , m_iMaximum(0)
    985984    , m_fRequiresGuestAdditions(false)
     
    1000999}
    10011000
    1002 const QString &UIMetric::name() const
    1003 {
    1004     return m_strName;
    1005 }
    1006 
    10071001void UIMetric::setMaximum(quint64 iMaximum)
    10081002{
     
    11531147void UIMetric::toFile(QTextStream &stream) const
    11541148{
    1155     stream << "Metric Name: " << m_strName << "\n";
    11561149    stream << "Unit: " << m_strUnit << "\n";
    11571150    stream << "Maximum: " << m_iMaximum << "\n";
     
    16521645                if (strName.contains("RAM", Qt::CaseInsensitive) && strName.contains("Free", Qt::CaseInsensitive))
    16531646                {
    1654                     UIMetric ramMetric("", metrics[i].GetUnit(), m_iMaximumQueueSize);
     1647                    UIMetric ramMetric(metrics[i].GetUnit(), m_iMaximumQueueSize);
    16551648                    ramMetric.setDataSeriesName(0, "Free");
    16561649                    ramMetric.setDataSeriesName(1, "Used");
     
    16631656
    16641657    /* CPU Metric: */
    1665     UIMetric cpuMetric("", "%", m_iMaximumQueueSize);
     1658    UIMetric cpuMetric("%", m_iMaximumQueueSize);
    16661659    cpuMetric.setDataSeriesName(0, "Guest Load");
    16671660    cpuMetric.setDataSeriesName(1, "VMM Load");
     
    16691662
    16701663    /* Network metric: */
    1671     UIMetric networkMetric("", "B", m_iMaximumQueueSize);
     1664    UIMetric networkMetric("B", m_iMaximumQueueSize);
    16721665    networkMetric.setDataSeriesName(0, "Receive Rate");
    16731666    networkMetric.setDataSeriesName(1, "Transmit Rate");
     
    16761669
    16771670    /* Disk IO metric */
    1678     UIMetric diskIOMetric("", "B", m_iMaximumQueueSize);
     1671    UIMetric diskIOMetric("B", m_iMaximumQueueSize);
    16791672    diskIOMetric.setDataSeriesName(0, "Write Rate");
    16801673    diskIOMetric.setDataSeriesName(1, "Read Rate");
     
    16831676
    16841677    /* VM exits metric */
    1685     UIMetric VMExitsMetric("", "times", m_iMaximumQueueSize);
     1678    UIMetric VMExitsMetric("times", m_iMaximumQueueSize);
    16861679    VMExitsMetric.setAutoUpdateMaximum(true);
    16871680    m_metrics.insert(Metric_Type_VM_Exits, VMExitsMetric);
     
    23812374    if (m_iTotalRAM != 0)
    23822375    {
    2383         UIMetric ramMetric("", "kb", m_iMaximumQueueSize);
     2376        UIMetric ramMetric("kb", m_iMaximumQueueSize);
    23842377        ramMetric.setDataSeriesName(0, "Used");
    23852378        m_metrics.insert(Metric_Type_RAM, ramMetric);
     
    23872380
    23882381    /* CPU Metric: */
    2389     UIMetric cpuMetric("", "%", m_iMaximumQueueSize);
     2382    UIMetric cpuMetric("%", m_iMaximumQueueSize);
    23902383    cpuMetric.setDataSeriesName(0, "CPU Utilization");
    23912384    m_metrics.insert(Metric_Type_CPU, cpuMetric);
    23922385
    23932386    /* Network in metric: */
    2394     UIMetric networkInMetric("", "B", m_iMaximumQueueSize);
     2387    UIMetric networkInMetric("B", m_iMaximumQueueSize);
    23952388    networkInMetric.setDataSeriesName(0, "Receive Rate");
    23962389    networkInMetric.setAutoUpdateMaximum(true);
     
    23982391
    23992392    /* Network out metric: */
    2400     UIMetric networkOutMetric("", "B", m_iMaximumQueueSize);
     2393    UIMetric networkOutMetric("B", m_iMaximumQueueSize);
    24012394    networkOutMetric.setDataSeriesName(0, "Transmit Rate");
    24022395    networkOutMetric.setAutoUpdateMaximum(true);
     
    24042397
    24052398    /* Disk write metric */
    2406     UIMetric diskIOWrittenMetric("", "B", m_iMaximumQueueSize);
     2399    UIMetric diskIOWrittenMetric("B", m_iMaximumQueueSize);
    24072400    diskIOWrittenMetric.setDataSeriesName(0, "Write Rate");
    24082401    diskIOWrittenMetric.setAutoUpdateMaximum(true);
     
    24102403
    24112404    /* Disk read metric */
    2412     UIMetric diskIOReadMetric("", "B", m_iMaximumQueueSize);
     2405    UIMetric diskIOReadMetric("B", m_iMaximumQueueSize);
    24132406    diskIOReadMetric.setDataSeriesName(0, "Read Rate");
    24142407    diskIOReadMetric.setAutoUpdateMaximum(true);
  • trunk/src/VBox/Frontends/VirtualBox/src/activity/vmactivity/UIVMActivityMonitor.h

    r102901 r102903  
    8585public:
    8686
    87     UIMetric(const QString &strName, const QString &strUnit, int iMaximumQueueSize);
     87    UIMetric(const QString &strUnit, int iMaximumQueueSize);
    8888    UIMetric();
    89     const QString &name() const;
    9089
    9190    void setMaximum(quint64 iMaximum);
     
    126125    void updateMax();
    127126
    128     QString m_strName;
    129127    QString m_strUnit;
    130128    QString m_strDataSeriesName[DATA_SERIES_SIZE];
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette