VirtualBox

Changeset 88071 in vbox


Ignore:
Timestamp:
Mar 10, 2021 3:10:39 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9510. Remaming performance monitor to vm activity monitor

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
16 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk

    r87916 r88071  
    830830        src/logviewer/UIVMLogViewerTextEdit.h \
    831831        src/logviewer/UIVMLogViewerWidget.h \
    832         src/monitor/performance/UIPerformanceMonitor.h \
     832        src/monitor/performance/UIVMActivityMonitor.h \
    833833        src/medium/UIFDCreationDialog.h \
    834834        src/medium/UIMediumEnumerator.h \
     
    10071007        src/logviewer/UIVMLogViewerFilterPanel.cpp \
    10081008        src/logviewer/UIVMLogViewerTextEdit.cpp \
    1009         src/monitor/performance/UIPerformanceMonitor.cpp \
     1009        src/monitor/performance/UIVMActivityMonitor.cpp \
    10101010        src/medium/UIMediumEnumerator.cpp \
    10111011        src/medium/viso/UIVisoContentBrowser.cpp \
     
    13641364        src/logviewer/UIVMLogViewerWidget.cpp \
    13651365        src/monitor/UIMonitorCommon.cpp \
    1366         src/monitor/performance/UIPerformanceMonitor.cpp \
     1366        src/monitor/performance/UIVMActivityMonitor.cpp \
    13671367        src/medium/UIFDCreationDialog.cpp \
    13681368        src/medium/UIMedium.cpp \
  • trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp

    r87475 r88071  
    15221522        case UIToolType_Snapshots:    strResult = "Snapshots"; break;
    15231523        case UIToolType_Logs:         strResult = "Logs"; break;
    1524         case UIToolType_Performance:  strResult = "Performance"; break;
     1524        case UIToolType_VMActivity:   strResult = "Performance"; break;
    15251525        default:
    15261526        {
     
    15481548    keys << "Snapshots";    values << UIToolType_Snapshots;
    15491549    keys << "Logs";         values << UIToolType_Logs;
    1550     keys << "Performance";  values << UIToolType_Performance;
     1550    keys << "Performance";  values << UIToolType_VMActivity;
    15511551    /* Invalid type for unknown words: */
    15521552    if (!keys.contains(strToolType, Qt::CaseInsensitive))
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp

    r87475 r88071  
    285285                case UIToolType_Snapshots:
    286286                case UIToolType_Logs:
    287                 case UIToolType_Performance:
     287                case UIToolType_VMActivity:
    288288                    return true;
    289289                default:
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h

    r87475 r88071  
    903903    UIToolType_Snapshots,
    904904    UIToolType_Logs,
    905     UIToolType_Performance,
     905    UIToolType_VMActivity,
    906906};
    907907Q_DECLARE_METATYPE(UIToolType);
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp

    r87101 r88071  
    22192219    virtual QString shortcutExtraDataID() const /* override */
    22202220    {
    2221         return QString("PerformanceMonitorMenu");
     2221        return QString("VMActivityMonitorMenu");
    22222222    }
    22232223
     
    25892589    m_menuUpdateHandlers[UIActionIndex_M_LogWindow].ptf = &UIActionPool::updateMenuLogViewerWindow;
    25902590    m_menuUpdateHandlers[UIActionIndex_M_Log].ptf = &UIActionPool::updateMenuLogViewer;
    2591     m_menuUpdateHandlers[UIActionIndex_M_Performance].ptf = &UIActionPool::updateMenuPerformanceMonitor;
     2591    m_menuUpdateHandlers[UIActionIndex_M_Performance].ptf = &UIActionPool::updateMenuVMActivityMonitor;
    25922592    m_menuUpdateHandlers[UIActionIndex_M_FileManager].ptf = &UIActionPool::updateMenuFileManager;
    25932593
     
    29652965}
    29662966
    2967 void UIActionPool::updateMenuPerformanceMonitor()
     2967void UIActionPool::updateMenuVMActivityMonitor()
    29682968{
    29692969    /* Get corresponding menu: */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h

    r87101 r88071  
    588588    void updateMenuLogViewerWrapper(UIMenu *pMenu);
    589589    /** Updates 'Performance Monitor' menu. */
    590     void updateMenuPerformanceMonitor();
     590    void updateMenuVMActivityMonitor();
    591591    /** Updates 'File Manager' menu. */
    592592    void updateMenuFileManager();
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolManager.cpp

    r87516 r88071  
    18831883        : UIActionToggle(pParent)
    18841884    {
    1885         setProperty("UIToolType", QVariant::fromValue(UIToolType_Performance));
     1885        setProperty("UIToolType", QVariant::fromValue(UIToolType_VMActivity));
    18861886        /// @todo use icons with check-boxes
    18871887        setIcon(UIIconPool::iconSetFull(":/performance_monitor_32px.png", ":/performance_monitor_16px.png",
     
    18941894    virtual QString shortcutExtraDataID() const /* override */
    18951895    {
    1896         return QString("ToolsMachinePerformanceMonitor");
     1896        return QString("ToolsMachineVMActivityMonitor");
    18971897    }
    18981898
     
    38003800    /* 'Performance' menu: */
    38013801    addMenu(m_mainMenus, action(UIActionIndex_M_Performance));
    3802     updateMenuPerformanceMonitor();
     3802    updateMenuVMActivityMonitor();
    38033803
    38043804    /* 'Help' menu: */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneMachine.cpp

    r87101 r88071  
    2828#include "UIDetails.h"
    2929#include "UIIconPool.h"
    30 #include "UIPerformanceMonitor.h"
     30#include "UIVMActivityMonitor.h"
    3131#include "UISnapshotPane.h"
    3232#include "UIToolPaneMachine.h"
     
    4747    , m_pPaneSnapshots(0)
    4848    , m_pPaneLogViewer(0)
    49     , m_pPanePerformanceMonitor(0)
     49    , m_pPaneVMActivityMonitor(0)
    5050    , m_fActive(false)
    5151{
     
    191191                break;
    192192            }
    193             case UIToolType_Performance:
    194             {
    195                 m_pPanePerformanceMonitor = new UIPerformanceMonitor(EmbedTo_Stack, 0,
     193            case UIToolType_VMActivity:
     194            {
     195                m_pPaneVMActivityMonitor = new UIVMActivityMonitor(EmbedTo_Stack, 0,
    196196                                                                     m_comMachine, m_pActionPool, false /* Show toolbar */);
    197                 AssertPtrReturnVoid(m_pPanePerformanceMonitor);
     197                AssertPtrReturnVoid(m_pPaneVMActivityMonitor);
    198198#ifndef VBOX_WS_MAC
    199199                const int iMargin = qApp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin) / 4;
    200                 m_pPanePerformanceMonitor->setContentsMargins(iMargin, 0, iMargin, 0);
     200                m_pPaneVMActivityMonitor->setContentsMargins(iMargin, 0, iMargin, 0);
    201201#endif
    202202
    203203                /* Configure pane: */
    204                 m_pPanePerformanceMonitor->setProperty("ToolType", QVariant::fromValue(UIToolType_Performance));
     204                m_pPaneVMActivityMonitor->setProperty("ToolType", QVariant::fromValue(UIToolType_VMActivity));
    205205
    206206                /* Add into layout: */
    207                 m_pLayout->addWidget(m_pPanePerformanceMonitor);
    208                 m_pLayout->setCurrentWidget(m_pPanePerformanceMonitor);
    209 
    210                 connect(m_pPanePerformanceMonitor, &UIPerformanceMonitor::sigSwitchToResourcesPane,
     207                m_pLayout->addWidget(m_pPaneVMActivityMonitor);
     208                m_pLayout->setCurrentWidget(m_pPaneVMActivityMonitor);
     209
     210                connect(m_pPaneVMActivityMonitor, &UIVMActivityMonitor::sigSwitchToResourcesPane,
    211211                        this, &UIToolPaneMachine::sigSwitchToResourcesPane);
    212212                break;
     
    239239            case UIToolType_Snapshots:   m_pPaneSnapshots = 0; break;
    240240            case UIToolType_Logs:        m_pPaneLogViewer = 0; break;
    241             case UIToolType_Performance: m_pPanePerformanceMonitor = 0; break;
     241            case UIToolType_VMActivity: m_pPaneVMActivityMonitor = 0; break;
    242242            default: break;
    243243        }
     
    299299    }
    300300    /* Update performance monitor pane is it is open: */
    301     if (isToolOpened(UIToolType_Performance))
    302     {
    303         AssertPtrReturnVoid(m_pPanePerformanceMonitor);
    304         m_pPanePerformanceMonitor->setMachine(m_comMachine);
     301    if (isToolOpened(UIToolType_VMActivity))
     302    {
     303        AssertPtrReturnVoid(m_pPaneVMActivityMonitor);
     304        m_pPaneVMActivityMonitor->setMachine(m_comMachine);
    305305    }
    306306}
     
    330330            pCurrentToolWidget = m_pPaneLogViewer;
    331331            break;
    332         case UIToolType_Performance:
    333             pCurrentToolWidget = m_pPanePerformanceMonitor;
     332        case UIToolType_VMActivity:
     333            pCurrentToolWidget = m_pPaneVMActivityMonitor;
    334334            break;
    335335        default:
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneMachine.h

    r87101 r88071  
    3939class UIDetails;
    4040class UIErrorPane;
    41 class UIPerformanceMonitor;
     41class UIVMActivityMonitor;
    4242class UISnapshotPane;
    4343class UIVirtualMachineItem;
     
    133133    UIVMLogViewerWidget *m_pPaneLogViewer;
    134134    /** Holds the Performance Monitor pane instance. */
    135     UIPerformanceMonitor *m_pPanePerformanceMonitor;
     135    UIVMActivityMonitor *m_pPaneVMActivityMonitor;
    136136
    137137    /** Holds whether this pane is active. */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp

    r87516 r88071  
    711711            sltCloseLogViewerWindow();
    712712            break;
    713         case UIToolType_Performance:
    714             sltClosePerformanceMonitorWindow();
     713        case UIToolType_VMActivity:
    715714            break;
    716715        default:
     
    20502049}
    20512050
    2052 void UIVirtualBoxManager::sltOpenPerformanceMonitorWindow()
    2053 {
    2054 }
    2055 
    2056 void UIVirtualBoxManager::sltClosePerformanceMonitorWindow()
    2057 {
    2058 }
    20592051
    20602052void UIVirtualBoxManager::sltPerformRefreshMachine()
     
    31323124    /* Determine whether Performance menu should be visible: */
    31333125    const bool fPerformanceMenuShown = (fMachineMenuShown || fGroupMenuShown) &&
    3134                                        m_pWidget->currentMachineTool() == UIToolType_Performance;
     3126                                       m_pWidget->currentMachineTool() == UIToolType_VMActivity;
    31353127    actionPool()->action(UIActionIndex_M_Performance)->setVisible(fPerformanceMenuShown);
    31363128
     
    33053297                break;
    33063298            }
    3307             case UIToolType_Performance:
     3299            case UIToolType_VMActivity:
    33083300            {
    33093301                actionPool()->action(UIActionIndexMN_M_Group_M_Tools_T_Performance)->setChecked(true);
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.h

    r87516 r88071  
    280280        /** Handles call to close machine Log Viewer window. */
    281281        void sltCloseLogViewerWindow();
    282 
    283         /** Handles call to open machine Performance Monitor window. */
    284         void sltOpenPerformanceMonitorWindow();
    285 
    286         /** Handles call to close machine Performance Monitor window. */
    287         void sltClosePerformanceMonitorWindow();
    288282
    289283        /** Handles call to refresh machine. */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp

    r87516 r88071  
    511511    AssertPtrReturnVoid(m_pPaneTools);
    512512    m_pPaneChooser->setCurrentMachine(uMachineId);
    513     m_pPaneTools->setToolsType(UIToolType_Performance);
     513    m_pPaneTools->setToolsType(UIToolType_VMActivity);
    514514}
    515515
     
    920920                    break;
    921921                }
    922                 case UIToolType_Performance:
     922                case UIToolType_VMActivity:
    923923                {
    924924                    m_pToolBar->addAction(actionPool()->action(UIActionIndex_M_Performance_S_Export));
     
    10421042    QList<UIToolType> retrictedTypes;
    10431043    if (pItem && pItem->itemType() != UIVirtualMachineItemType_Local)
    1044         retrictedTypes << UIToolType_Snapshots << UIToolType_Logs << UIToolType_Performance;
     1044        retrictedTypes << UIToolType_Snapshots << UIToolType_Logs << UIToolType_VMActivity;
    10451045    else if (pItem && !pItem->isItemStarted())
    1046         retrictedTypes << UIToolType_Performance;
     1046        retrictedTypes << UIToolType_VMActivity;
    10471047    if (retrictedTypes.contains(m_pPaneTools->toolsType()))
    10481048        m_pPaneTools->setToolsType(UIToolType_Details);
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsModel.cpp

    r87516 r88071  
    461461            case UIToolType_Snapshots:   pItem->reconfigure(tr("Snapshots")); break;
    462462            case UIToolType_Logs:        pItem->reconfigure(tr("Logs")); break;
    463             case UIToolType_Performance: pItem->reconfigure(tr("Performance")); break;
     463            case UIToolType_VMActivity: pItem->reconfigure(tr("Performance")); break;
    464464            default: break;
    465465        }
     
    536536
    537537    /* Performance: */
    538     m_items << new UIToolsItem(scene(), UIToolClass_Machine, UIToolType_Performance, QString(),
     538    m_items << new UIToolsItem(scene(), UIToolClass_Machine, UIToolType_VMActivity, QString(),
    539539                               UIIconPool::iconSet(":/performance_monitor_24px.png", ":/performance_monitor_disabled_24px.png"));
    540540}
  • trunk/src/VBox/Frontends/VirtualBox/src/monitor/performance/UIVMActivityMonitor.cpp

    r88070 r88071  
    11/* $Id$ */
    22/** @file
    3  * VBox Qt GUI - UIPerformanceMonitor class implementation.
     3 * VBox Qt GUI - UIVMActivityMonitor class implementation.
    44 */
    55
     
    3333#include "UICommon.h"
    3434#include "UIIconPool.h"
    35 #include "UIPerformanceMonitor.h"
     35#include "UIVMActivityMonitor.h"
    3636#include "QIToolBar.h"
    3737#include "UIVirtualBoxEventHandler.h"
     
    767767
    768768/*********************************************************************************************************************************
    769 *   UIPerformanceMonitor implementation.                                                                              *
     769*   UIVMActivityMonitor implementation.                                                                              *
    770770*********************************************************************************************************************************/
    771771
    772 UIPerformanceMonitor::UIPerformanceMonitor(EmbedTo enmEmbedding, QWidget *pParent,
     772UIVMActivityMonitor::UIVMActivityMonitor(EmbedTo enmEmbedding, QWidget *pParent,
    773773                                           const CMachine &machine, UIActionPool *pActionPool, bool fShowToolbar /* = false */)
    774774    : QIWithRetranslateUI<QWidget>(pParent)
     
    794794    prepareActions();
    795795    retranslateUi();
    796     connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigMachineStateChange, this, &UIPerformanceMonitor::sltMachineStateChange);
     796    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigMachineStateChange, this, &UIVMActivityMonitor::sltMachineStateChange);
    797797    setMachine(machine);
    798798    uiCommon().setHelpKeyword(this, "vm-session-information");
    799799    setContextMenuPolicy(Qt::CustomContextMenu);
    800     connect(this, &UIPerformanceMonitor::customContextMenuRequested,
    801             this, &UIPerformanceMonitor::sltCreateContextMenu);
    802 }
    803 
    804 UIPerformanceMonitor::~UIPerformanceMonitor()
     800    connect(this, &UIVMActivityMonitor::customContextMenuRequested,
     801            this, &UIVMActivityMonitor::sltCreateContextMenu);
     802}
     803
     804UIVMActivityMonitor::~UIVMActivityMonitor()
    805805{
    806806    if (!m_comSession.isNull())
     
    808808}
    809809
    810 void UIPerformanceMonitor::setMachine(const CMachine &comMachine)
     810void UIVMActivityMonitor::setMachine(const CMachine &comMachine)
    811811{
    812812    reset();
     
    827827}
    828828
    829 void UIPerformanceMonitor::openSession()
     829void UIVMActivityMonitor::openSession()
    830830{
    831831    m_comSession = uiCommon().openSession(m_comMachine.GetId(), KLockType_Shared);
     
    839839}
    840840
    841 void UIPerformanceMonitor::retranslateUi()
     841void UIVMActivityMonitor::retranslateUi()
    842842{
    843843    foreach (UIChart *pChart, m_charts)
     
    903903}
    904904
    905 void UIPerformanceMonitor::prepareWidgets()
     905void UIVMActivityMonitor::prepareWidgets()
    906906{
    907907    m_pMainLayout = new QVBoxLayout(this);
     
    918918    m_pTimer = new QTimer(this);
    919919    if (m_pTimer)
    920         connect(m_pTimer, &QTimer::timeout, this, &UIPerformanceMonitor::sltTimeout);
     920        connect(m_pTimer, &QTimer::timeout, this, &UIVMActivityMonitor::sltTimeout);
    921921
    922922    QScrollArea *pScrollArea = new QScrollArea(this);
     
    949949        UIChart *pChart = new UIChart(this, &(m_metrics[strMetricName]));
    950950        connect(pChart, &UIChart::sigExportMetricsToFile,
    951                 this, &UIPerformanceMonitor::sltExportMetricsToFile);
     951                this, &UIVMActivityMonitor::sltExportMetricsToFile);
    952952        m_charts.insert(strMetricName, pChart);
    953953        pChart->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
     
    970970}
    971971
    972 void UIPerformanceMonitor::sltTimeout()
    973 {
    974     if (m_performanceMonitor.isNull())
     972void UIVMActivityMonitor::sltTimeout()
     973{
     974    if (m_performanceCollector.isNull())
    975975        return;
    976976    ++m_iTimeStep;
     
    980980        quint64 iTotalRAM = 0;
    981981        quint64 iFreeRAM = 0;
    982         UIMonitorCommon::getRAMLoad(m_performanceMonitor, m_nameList, m_objectList, iTotalRAM, iFreeRAM);
     982        UIMonitorCommon::getRAMLoad(m_performanceCollector, m_nameList, m_objectList, iTotalRAM, iFreeRAM);
    983983        updateRAMGraphsAndMetric(iTotalRAM, iFreeRAM);
    984984    }
     
    10181018}
    10191019
    1020 void UIPerformanceMonitor::sltMachineStateChange(const QUuid &uId)
     1020void UIVMActivityMonitor::sltMachineStateChange(const QUuid &uId)
    10211021{
    10221022    if (m_comMachine.isNull())
     
    10331033}
    10341034
    1035 void UIPerformanceMonitor::sltExportMetricsToFile()
     1035void UIVMActivityMonitor::sltExportMetricsToFile()
    10361036{
    10371037    QString strStartFileName = QString("%1/%2_%3").
     
    10531053}
    10541054
    1055 void UIPerformanceMonitor::sltCreateContextMenu(const QPoint &point)
     1055void UIVMActivityMonitor::sltCreateContextMenu(const QPoint &point)
    10561056{
    10571057    QMenu menu;
     
    10591059        menu.addAction(QApplication::translate("UIVMInformationDialog", "Export"));
    10601060    pExportAction->setIcon(UIIconPool::iconSet(":/performance_monitor_export_16px.png"));
    1061     connect(pExportAction, &QAction::triggered, this, &UIPerformanceMonitor::sltExportMetricsToFile);
     1061    connect(pExportAction, &QAction::triggered, this, &UIVMActivityMonitor::sltExportMetricsToFile);
    10621062    menu.exec(mapToGlobal(point));
    10631063}
    10641064
    1065 void UIPerformanceMonitor::sltGuestAdditionsStateChange()
     1065void UIVMActivityMonitor::sltGuestAdditionsStateChange()
    10661066{
    10671067    bool fGuestAdditionsAvailable = guestAdditionsAvailable(6 /* minimum major version */);
     
    10721072}
    10731073
    1074 void UIPerformanceMonitor::prepareMetrics()
    1075 {
    1076     m_performanceMonitor = uiCommon().virtualBox().GetPerformanceCollector();
    1077     if (m_performanceMonitor.isNull())
     1074void UIVMActivityMonitor::prepareMetrics()
     1075{
     1076    m_performanceCollector = uiCommon().virtualBox().GetPerformanceCollector();
     1077    if (m_performanceCollector.isNull())
    10781078        return;
    10791079
    10801080    m_nameList << "Guest/RAM/Usage*";
    10811081    m_objectList = QVector<CUnknown>(m_nameList.size(), CUnknown());
    1082     m_performanceMonitor.SetupMetrics(m_nameList, m_objectList, g_iPeriod, g_iMetricSetupCount);
    1083     {
    1084         QVector<CPerformanceMetric> metrics = m_performanceMonitor.GetMetrics(m_nameList, m_objectList);
     1082    m_performanceCollector.SetupMetrics(m_nameList, m_objectList, g_iPeriod, g_iMetricSetupCount);
     1083    {
     1084        QVector<CPerformanceMetric> metrics = m_performanceCollector.GetMetrics(m_nameList, m_objectList);
    10851085        for (int i = 0; i < metrics.size(); ++i)
    10861086        {
     
    11231123}
    11241124
    1125 void UIPerformanceMonitor::prepareToolBar()
     1125void UIVMActivityMonitor::prepareToolBar()
    11261126{
    11271127    /* Create toolbar: */
     
    11481148}
    11491149
    1150 void UIPerformanceMonitor::prepareActions()
     1150void UIVMActivityMonitor::prepareActions()
    11511151{
    11521152    QAction *pExportAction =
    11531153        m_pActionPool->action(UIActionIndex_M_Performance_S_Export);
    11541154    if (pExportAction)
    1155         connect(pExportAction, &QAction::triggered, this, &UIPerformanceMonitor::sltExportMetricsToFile);
     1155        connect(pExportAction, &QAction::triggered, this, &UIVMActivityMonitor::sltExportMetricsToFile);
    11561156
    11571157    QAction *pToResourcesAction =
    11581158        m_pActionPool->action(UIActionIndex_M_Performance_S_ToResources);
    11591159    if (pToResourcesAction)
    1160         connect(pToResourcesAction, &QAction::triggered, this, &UIPerformanceMonitor::sigSwitchToResourcesPane);
    1161 }
    1162 
    1163 bool UIPerformanceMonitor::guestAdditionsAvailable(int iMinimumMajorVersion)
     1160        connect(pToResourcesAction, &QAction::triggered, this, &UIVMActivityMonitor::sigSwitchToResourcesPane);
     1161}
     1162
     1163bool UIVMActivityMonitor::guestAdditionsAvailable(int iMinimumMajorVersion)
    11641164{
    11651165    if (m_comGuest.isNull())
     
    11801180}
    11811181
    1182 void UIPerformanceMonitor::enableDisableGuestAdditionDependedWidgets(bool fEnable)
     1182void UIVMActivityMonitor::enableDisableGuestAdditionDependedWidgets(bool fEnable)
    11831183{
    11841184    for (QMap<QString, UIMetric>::const_iterator iterator =  m_metrics.begin();
     
    11971197}
    11981198
    1199 void UIPerformanceMonitor::updateCPUGraphsAndMetric(ULONG iExecutingPercentage, ULONG iOtherPercentage)
     1199void UIVMActivityMonitor::updateCPUGraphsAndMetric(ULONG iExecutingPercentage, ULONG iOtherPercentage)
    12001200{
    12011201    UIMetric &CPUMetric = m_metrics[m_strCPUMetricName];
     
    12201220}
    12211221
    1222 void UIPerformanceMonitor::updateRAMGraphsAndMetric(quint64 iTotalRAM, quint64 iFreeRAM)
     1222void UIVMActivityMonitor::updateRAMGraphsAndMetric(quint64 iTotalRAM, quint64 iFreeRAM)
    12231223{
    12241224    UIMetric &RAMMetric = m_metrics[m_strRAMMetricName];
     
    12371237}
    12381238
    1239 void UIPerformanceMonitor::updateNetworkGraphsAndMetric(quint64 iReceiveTotal, quint64 iTransmitTotal)
     1239void UIVMActivityMonitor::updateNetworkGraphsAndMetric(quint64 iReceiveTotal, quint64 iTransmitTotal)
    12401240{
    12411241    UIMetric &NetMetric = m_metrics[m_strNetworkMetricName];
     
    12731273}
    12741274
    1275 void UIPerformanceMonitor::resetCPUInfoLabel()
     1275void UIVMActivityMonitor::resetCPUInfoLabel()
    12761276{
    12771277    if (m_infoLabels.contains(m_strCPUMetricName)  && m_infoLabels[m_strCPUMetricName])
     
    12851285}
    12861286
    1287 void UIPerformanceMonitor::resetRAMInfoLabel()
     1287void UIVMActivityMonitor::resetRAMInfoLabel()
    12881288{
    12891289    if (m_infoLabels.contains(m_strRAMMetricName)  && m_infoLabels[m_strRAMMetricName])
     
    12971297}
    12981298
    1299 void UIPerformanceMonitor::resetNetworkInfoLabel()
     1299void UIVMActivityMonitor::resetNetworkInfoLabel()
    13001300{
    13011301    if (m_infoLabels.contains(m_strNetworkMetricName)  && m_infoLabels[m_strNetworkMetricName])
     
    13111311}
    13121312
    1313 void UIPerformanceMonitor::resetVMExitInfoLabel()
     1313void UIVMActivityMonitor::resetVMExitInfoLabel()
    13141314{
    13151315    if (m_infoLabels.contains(m_strVMExitMetricName)  && m_infoLabels[m_strVMExitMetricName])
     
    13251325}
    13261326
    1327 void UIPerformanceMonitor::resetDiskIOInfoLabel()
     1327void UIVMActivityMonitor::resetDiskIOInfoLabel()
    13281328{
    13291329    if (m_infoLabels.contains(m_strDiskIOMetricName)  && m_infoLabels[m_strDiskIOMetricName])
     
    13391339}
    13401340
    1341 void UIPerformanceMonitor::updateDiskIOGraphsAndMetric(quint64 uDiskIOTotalWritten, quint64 uDiskIOTotalRead)
     1341void UIVMActivityMonitor::updateDiskIOGraphsAndMetric(quint64 uDiskIOTotalWritten, quint64 uDiskIOTotalRead)
    13421342{
    13431343    UIMetric &diskMetric = m_metrics[m_strDiskIOMetricName];
     
    13741374}
    13751375
    1376 void UIPerformanceMonitor::updateVMExitMetric(quint64 uTotalVMExits)
     1376void UIVMActivityMonitor::updateVMExitMetric(quint64 uTotalVMExits)
    13771377{
    13781378    if (uTotalVMExits <= 0)
     
    14041404}
    14051405
    1406 QString UIPerformanceMonitor::dataColorString(const QString &strChartName, int iDataIndex)
     1406QString UIVMActivityMonitor::dataColorString(const QString &strChartName, int iDataIndex)
    14071407{
    14081408    if (!m_charts.contains(strChartName))
     
    14141414}
    14151415
    1416 void UIPerformanceMonitor::reset()
     1416void UIVMActivityMonitor::reset()
    14171417{
    14181418    m_fGuestAdditionsAvailable = false;
     
    14381438}
    14391439
    1440 void UIPerformanceMonitor::start()
     1440void UIVMActivityMonitor::start()
    14411441{
    14421442    if (m_comMachine.isNull() || m_comMachine.GetState() != KMachineState_Running)
     
    14501450
    14511451
    1452 #include "UIPerformanceMonitor.moc"
     1452#include "UIVMActivityMonitor.moc"
  • trunk/src/VBox/Frontends/VirtualBox/src/monitor/performance/UIVMActivityMonitor.h

    r88070 r88071  
    11/* $Id$ */
    22/** @file
    3  * VBox Qt GUI - UIPerformanceMonitor class declaration.
     3 * VBox Qt GUI - UIVMActivityMonitor class declaration.
    44 */
    55
     
    1616 */
    1717
    18 #ifndef FEQT_INCLUDED_SRC_monitor_performance_UIPerformanceMonitor_h
    19 #define FEQT_INCLUDED_SRC_monitor_performance_UIPerformanceMonitor_h
     18#ifndef FEQT_INCLUDED_SRC_monitor_performance_UIVMActivityMonitor_h
     19#define FEQT_INCLUDED_SRC_monitor_performance_UIVMActivityMonitor_h
    2020#ifndef RT_WITHOUT_PRAGMA_ONCE
    2121# pragma once
     
    106106};
    107107
    108 /** UIPerformanceMonitor class displays some high level performance metric of the guest system.
     108/** UIVMActivityMonitor class displays some high level performance metric of the guest system.
    109109  * The values are read in certain periods and cached in the GUI side. Currently we draw some line charts
    110110  * and pie charts (where applicable) alongside with some text. IPerformanceCollector and IMachineDebugger are
    111111  * two sources of the performance metrics. Unfortunately these two have very distinct APIs resulting a bit too much
    112112  * special casing etc.*/
    113 class  SHARED_LIBRARY_STUFF UIPerformanceMonitor : public QIWithRetranslateUI<QWidget>
     113class  SHARED_LIBRARY_STUFF UIVMActivityMonitor : public QIWithRetranslateUI<QWidget>
    114114{
    115115    Q_OBJECT;
     
    123123    /** Constructs information-tab passing @a pParent to the QWidget base-class constructor.
    124124      * @param machine is machine reference. */
    125     UIPerformanceMonitor(EmbedTo enmEmbedding, QWidget *pParent, const CMachine &machine,
     125    UIVMActivityMonitor(EmbedTo enmEmbedding, QWidget *pParent, const CMachine &machine,
    126126                         UIActionPool *pActionPool,bool fShowToolbar = false);
    127     ~UIPerformanceMonitor();
     127    ~UIVMActivityMonitor();
    128128    void setMachine(const CMachine &machine);
    129129
     
    191191    CGuest m_comGuest;
    192192
    193     CPerformanceCollector m_performanceMonitor;
     193    CPerformanceCollector m_performanceCollector;
    194194    CMachineDebugger      m_comMachineDebugger;
    195195    /** Holds the instance of layout we create. */
     
    253253};
    254254
    255 #endif /* !FEQT_INCLUDED_SRC_monitor_performance_UIPerformanceMonitor_h */
     255#endif /* !FEQT_INCLUDED_SRC_monitor_performance_UIVMActivityMonitor_h */
  • trunk/src/VBox/Frontends/VirtualBox/src/monitor/resource/UIResourceMonitor.cpp

    r87103 r88071  
    3838#include "UIExtraDataManager.h"
    3939#include "UIIconPool.h"
    40 #include "UIPerformanceMonitor.h"
     40#include "UIVMActivityMonitor.h"
    4141#include "UIResourceMonitor.h"
    4242#include "UIMessageCenter.h"
     
    327327    QVector<CUnknown> m_objectList;
    328328    /** @} */
    329     CPerformanceCollector m_performanceMonitor;
     329    CPerformanceCollector m_performanceCollector;
    330330    QMap<int, bool> m_columnVisible;
    331331    /** If true the table data and corresponding view is updated. Possibly set by host widget to true only
     
    11351135    const ULONG iPeriod = 1;
    11361136    const int iMetricSetupCount = 1;
    1137     if (m_performanceMonitor.isNull())
    1138         m_performanceMonitor = uiCommon().virtualBox().GetPerformanceCollector();
     1137    if (m_performanceCollector.isNull())
     1138        m_performanceCollector = uiCommon().virtualBox().GetPerformanceCollector();
    11391139    for (int i = 0; i < m_itemList.size(); ++i)
    11401140        m_nameList << "Guest/RAM/Usage*";
     
    11431143    m_nameList << "FS*";
    11441144    m_objectList = QVector<CUnknown>(m_nameList.size(), CUnknown());
    1145     m_performanceMonitor.SetupMetrics(m_nameList, m_objectList, iPeriod, iMetricSetupCount);
     1145    m_performanceCollector.SetupMetrics(m_nameList, m_objectList, iPeriod, iMetricSetupCount);
    11461146}
    11471147
     
    11561156    QVector<ULONG>  aReturnDataLengths;
    11571157
    1158     QVector<LONG> returnData = m_performanceMonitor.QueryMetricsData(m_nameList,
     1158    QVector<LONG> returnData = m_performanceCollector.QueryMetricsData(m_nameList,
    11591159                                                                     m_objectList,
    11601160                                                                     aReturnNames,
     
    12731273    , m_pColumnVisibilityToggleMenu(0)
    12741274    , m_pHostStatsWidget(0)
    1275     , m_pShowPerformanceMonitorAction(0)
     1275    , m_pVMActivityMonitorAction(0)
    12761276    , m_fIsCurrentTool(true)
    12771277    , m_iSortIndicatorWidth(0)
     
    13341334void UIResourceMonitorWidget::showEvent(QShowEvent *pEvent)
    13351335{
    1336     if (m_pShowPerformanceMonitorAction && m_pTableView)
    1337         m_pShowPerformanceMonitorAction->setEnabled(m_pTableView->hasSelection());
     1336    if (m_pVMActivityMonitorAction && m_pTableView)
     1337        m_pVMActivityMonitorAction->setEnabled(m_pTableView->hasSelection());
    13381338
    13391339    QIWithRetranslateUI<QWidget>::showEvent(pEvent);
     
    14381438{
    14391439    updateColumnsMenu();
    1440     m_pShowPerformanceMonitorAction =
     1440    m_pVMActivityMonitorAction =
    14411441        m_pActionPool->action(UIActionIndexMN_M_VMResourceMonitor_S_SwitchToMachinePerformance);
    14421442
    1443     if (m_pShowPerformanceMonitorAction)
    1444         connect(m_pShowPerformanceMonitorAction, &QAction::triggered, this, &UIResourceMonitorWidget::sltHandleShowPerformanceMonitor);
     1443    if (m_pVMActivityMonitorAction)
     1444        connect(m_pVMActivityMonitorAction, &QAction::triggered, this, &UIResourceMonitorWidget::sltHandleShowVMActivityMonitor);
    14451445}
    14461446
     
    15291529
    15301530    QMenu menu;
    1531     if (m_pShowPerformanceMonitorAction)
    1532         menu.addAction(m_pShowPerformanceMonitorAction);
     1531    if (m_pVMActivityMonitorAction)
     1532        menu.addAction(m_pVMActivityMonitorAction);
    15331533
    15341534    menu.exec(m_pTableView->mapToGlobal(pos));
     
    15381538{
    15391539    Q_UNUSED(deselected);
    1540     if (m_pShowPerformanceMonitorAction)
    1541         m_pShowPerformanceMonitorAction->setEnabled(!selected.isEmpty());
    1542 }
    1543 
    1544 void UIResourceMonitorWidget::sltHandleShowPerformanceMonitor()
     1540    if (m_pVMActivityMonitorAction)
     1541        m_pVMActivityMonitorAction->setEnabled(!selected.isEmpty());
     1542}
     1543
     1544void UIResourceMonitorWidget::sltHandleShowVMActivityMonitor()
    15451545{
    15461546    if (!m_pTableView || !m_pModel)
  • trunk/src/VBox/Frontends/VirtualBox/src/monitor/resource/UIResourceMonitor.h

    r86233 r88071  
    8484    void sltHandleHostStatsUpdate(const UIVMResourceMonitorHostStats &stats);
    8585    void sltHandleTableContextMenuRequest(const QPoint &pos);
    86     void sltHandleShowPerformanceMonitor();
     86    void sltHandleShowVMActivityMonitor();
    8787    void sltHandleTableSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
    8888
     
    126126        QMap<int, bool>                     m_columnVisible;
    127127        UIVMResourceMonitorHostStatsWidget *m_pHostStatsWidget;
    128         QAction                            *m_pShowPerformanceMonitorAction;
     128        QAction                            *m_pVMActivityMonitorAction;
    129129    /** @} */
    130130    /** Indicates if this widget's host tool is current tool. */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIVMInformationDialog.cpp

    r87103 r88071  
    3636#include "UIMachineWindow.h"
    3737#include "UIMessageCenter.h"
    38 #include "UIPerformanceMonitor.h"
     38#include "UIVMActivityMonitor.h"
    3939#include "UISession.h"
    4040#include "UIVMInformationDialog.h"
     
    114114    m_pTabWidget->setTabText(0, tr("Configuration &Details"));
    115115    m_pTabWidget->setTabText(1, tr("&Runtime Information"));
    116     m_pTabWidget->setTabText(2, tr("Performance &Monitor"));
     116    m_pTabWidget->setTabText(2, tr("VM &Activity"));
    117117    m_pTabWidget->setTabText(3, tr("&Guest Control"));
    118118
     
    214214
    215215        /* Create Performance Monitor tab: */
    216         UIPerformanceMonitor *pPerformanceMonitorWidget =
    217             new UIPerformanceMonitor(EmbedTo_Dialog, this, m_pMachineWindow->machine(),
     216        UIVMActivityMonitor *pVMActivityMonitorWidget =
     217            new UIVMActivityMonitor(EmbedTo_Dialog, this, m_pMachineWindow->machine(),
    218218                                     m_pMachineWindow->uisession()->actionPool());
    219         if (pPerformanceMonitorWidget)
     219        if (pVMActivityMonitorWidget)
    220220        {
    221221            connect(m_pMachineWindow->uisession(), &UISession::sigAdditionsStateChange,
    222                     pPerformanceMonitorWidget, &UIPerformanceMonitor::sltGuestAdditionsStateChange);
    223             m_tabs.insert(2, pPerformanceMonitorWidget);
     222                    pVMActivityMonitorWidget, &UIVMActivityMonitor::sltGuestAdditionsStateChange);
     223            m_tabs.insert(2, pVMActivityMonitorWidget);
    224224            m_pTabWidget->addTab(m_tabs.value(2), QString());
    225225        }
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