VirtualBox

Changeset 88082 in vbox


Ignore:
Timestamp:
Mar 11, 2021 10:57:36 AM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9510. More refactoring

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackend.h

    r86978 r88082  
    125125template<> SHARED_LIBRARY_STUFF bool canConvert<UIMediumFormat>();
    126126template<> SHARED_LIBRARY_STUFF bool canConvert<UISettingsDefs::RecordingMode>();
    127 template<> SHARED_LIBRARY_STUFF bool canConvert<VMResourceMonitorColumn>();
     127template<> SHARED_LIBRARY_STUFF bool canConvert<VMActivityOverviewColumn>();
    128128
    129129/* Declare COM canConvert specializations: */
     
    270270template<> SHARED_LIBRARY_STUFF QString toString(const UISettingsDefs::RecordingMode &enmRecordingMode);
    271271template<> SHARED_LIBRARY_STUFF UISettingsDefs::RecordingMode fromString<UISettingsDefs::RecordingMode>(const QString &enmRecordingMode);
    272 template<> SHARED_LIBRARY_STUFF QString toInternalString(const VMResourceMonitorColumn &enmVMResourceMonitorColumn);
    273 template<> SHARED_LIBRARY_STUFF VMResourceMonitorColumn fromInternalString<VMResourceMonitorColumn>(const QString &strVMResourceMonitorColumn);
     272template<> SHARED_LIBRARY_STUFF QString toInternalString(const VMActivityOverviewColumn &enmVMActivityOverviewColumn);
     273template<> SHARED_LIBRARY_STUFF VMActivityOverviewColumn fromInternalString<VMActivityOverviewColumn>(const QString &strVMActivityOverviewColumn);
    274274
    275275/* Declare COM conversion specializations: */
  • trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp

    r88074 r88082  
    7979template<> bool canConvert<UIMediumFormat>() { return true; }
    8080template<> bool canConvert<UISettingsDefs::RecordingMode>() { return true; }
    81 template<> bool canConvert<VMResourceMonitorColumn>(){ return true; };
     81template<> bool canConvert<VMActivityOverviewColumn>(){ return true; };
    8282
    8383
     
    26052605}
    26062606
    2607 template<> QString toInternalString(const VMResourceMonitorColumn &enmVMResourceMonitorColumn)
    2608 {
    2609     QString strResult;
    2610     switch (enmVMResourceMonitorColumn)
    2611     {
    2612         case VMResourceMonitorColumn_Name:              strResult = "VMName"; break;
    2613         case VMResourceMonitorColumn_CPUGuestLoad:      strResult = "CPUGuestLoad"; break;
    2614         case VMResourceMonitorColumn_CPUVMMLoad:        strResult = "CPUVMMLoad"; break;
    2615         case VMResourceMonitorColumn_RAMUsedAndTotal:   strResult = "RAMUsedAndTotal"; break;
    2616         case VMResourceMonitorColumn_RAMUsedPercentage: strResult = "RAMUsedPercentage"; break;
    2617         case VMResourceMonitorColumn_NetworkUpRate:     strResult = "NetworkUpRate"; break;
    2618         case VMResourceMonitorColumn_NetworkDownRate:   strResult = "NetworkDownRate"; break;
    2619         case VMResourceMonitorColumn_NetworkUpTotal:    strResult = "NetworkUpTotal"; break;
    2620         case VMResourceMonitorColumn_NetworkDownTotal:  strResult = "NetworkDownTotal"; break;
    2621         case VMResourceMonitorColumn_DiskIOReadRate:    strResult = "DiskIOReadRate"; break;
    2622         case VMResourceMonitorColumn_DiskIOWriteRate:   strResult = "DiskIOWriteRate"; break;
    2623         case VMResourceMonitorColumn_DiskIOReadTotal:   strResult = "DiskIOReadTotal"; break;
    2624         case VMResourceMonitorColumn_DiskIOWriteTotal:  strResult = "DiskIOWriteTotal"; break;
    2625         case VMResourceMonitorColumn_VMExits:           strResult = "VMExits"; break;
     2607template<> QString toInternalString(const VMActivityOverviewColumn &enmVMActivityOverviewColumn)
     2608{
     2609    QString strResult;
     2610    switch (enmVMActivityOverviewColumn)
     2611    {
     2612        case VMActivityOverviewColumn_Name:              strResult = "VMName"; break;
     2613        case VMActivityOverviewColumn_CPUGuestLoad:      strResult = "CPUGuestLoad"; break;
     2614        case VMActivityOverviewColumn_CPUVMMLoad:        strResult = "CPUVMMLoad"; break;
     2615        case VMActivityOverviewColumn_RAMUsedAndTotal:   strResult = "RAMUsedAndTotal"; break;
     2616        case VMActivityOverviewColumn_RAMUsedPercentage: strResult = "RAMUsedPercentage"; break;
     2617        case VMActivityOverviewColumn_NetworkUpRate:     strResult = "NetworkUpRate"; break;
     2618        case VMActivityOverviewColumn_NetworkDownRate:   strResult = "NetworkDownRate"; break;
     2619        case VMActivityOverviewColumn_NetworkUpTotal:    strResult = "NetworkUpTotal"; break;
     2620        case VMActivityOverviewColumn_NetworkDownTotal:  strResult = "NetworkDownTotal"; break;
     2621        case VMActivityOverviewColumn_DiskIOReadRate:    strResult = "DiskIOReadRate"; break;
     2622        case VMActivityOverviewColumn_DiskIOWriteRate:   strResult = "DiskIOWriteRate"; break;
     2623        case VMActivityOverviewColumn_DiskIOReadTotal:   strResult = "DiskIOReadTotal"; break;
     2624        case VMActivityOverviewColumn_DiskIOWriteTotal:  strResult = "DiskIOWriteTotal"; break;
     2625        case VMActivityOverviewColumn_VMExits:           strResult = "VMExits"; break;
    26262626        default:
    26272627            {
    2628                 AssertMsgFailed(("No text for VM Resource Monitor Column=%d", enmVMResourceMonitorColumn));
     2628                AssertMsgFailed(("No text for VM Resource Monitor Column=%d", enmVMActivityOverviewColumn));
    26292629                break;
    26302630            }
     
    26332633}
    26342634
    2635 template<> VMResourceMonitorColumn fromInternalString<VMResourceMonitorColumn>(const QString &strVMResourceMonitorColumn)
    2636 {
    2637     QStringList keys;    QList<VMResourceMonitorColumn> values;
    2638     keys << "VMName";             values << VMResourceMonitorColumn_Name;
    2639     keys << "CPUGuestLoad";       values << VMResourceMonitorColumn_CPUGuestLoad;
    2640     keys << "CPUVMMLoad";         values << VMResourceMonitorColumn_CPUVMMLoad;
    2641     keys << "RAMUsedAndTotal";    values << VMResourceMonitorColumn_RAMUsedAndTotal;
    2642     keys << "RAMUsedPercentage";  values << VMResourceMonitorColumn_RAMUsedPercentage;
    2643     keys << "NetworkUpRate";      values << VMResourceMonitorColumn_NetworkUpRate;
    2644     keys << "NetworkDownRate";    values << VMResourceMonitorColumn_NetworkDownRate;
    2645     keys << "NetworkUpTotal";     values << VMResourceMonitorColumn_NetworkUpTotal;
    2646     keys << "NetworkDownTotal";   values << VMResourceMonitorColumn_NetworkDownTotal;
    2647     keys << "DiskIOReadRate";     values << VMResourceMonitorColumn_DiskIOReadRate;
    2648     keys << "DiskIOWriteRate";    values << VMResourceMonitorColumn_DiskIOWriteRate;
    2649     keys << "DiskIOReadTotal";    values << VMResourceMonitorColumn_DiskIOReadTotal;
    2650     keys << "DiskIOWriteTotal";   values << VMResourceMonitorColumn_DiskIOWriteTotal;
    2651     keys << "VMExits";            values << VMResourceMonitorColumn_VMExits;
    2652     if (!keys.contains(strVMResourceMonitorColumn, Qt::CaseInsensitive))
    2653         return VMResourceMonitorColumn_Max;
     2635template<> VMActivityOverviewColumn fromInternalString<VMActivityOverviewColumn>(const QString &strVMActivityOverviewColumn)
     2636{
     2637    QStringList keys;    QList<VMActivityOverviewColumn> values;
     2638    keys << "VMName";             values << VMActivityOverviewColumn_Name;
     2639    keys << "CPUGuestLoad";       values << VMActivityOverviewColumn_CPUGuestLoad;
     2640    keys << "CPUVMMLoad";         values << VMActivityOverviewColumn_CPUVMMLoad;
     2641    keys << "RAMUsedAndTotal";    values << VMActivityOverviewColumn_RAMUsedAndTotal;
     2642    keys << "RAMUsedPercentage";  values << VMActivityOverviewColumn_RAMUsedPercentage;
     2643    keys << "NetworkUpRate";      values << VMActivityOverviewColumn_NetworkUpRate;
     2644    keys << "NetworkDownRate";    values << VMActivityOverviewColumn_NetworkDownRate;
     2645    keys << "NetworkUpTotal";     values << VMActivityOverviewColumn_NetworkUpTotal;
     2646    keys << "NetworkDownTotal";   values << VMActivityOverviewColumn_NetworkDownTotal;
     2647    keys << "DiskIOReadRate";     values << VMActivityOverviewColumn_DiskIOReadRate;
     2648    keys << "DiskIOWriteRate";    values << VMActivityOverviewColumn_DiskIOWriteRate;
     2649    keys << "DiskIOReadTotal";    values << VMActivityOverviewColumn_DiskIOReadTotal;
     2650    keys << "DiskIOWriteTotal";   values << VMActivityOverviewColumn_DiskIOWriteTotal;
     2651    keys << "VMExits";            values << VMActivityOverviewColumn_VMExits;
     2652    if (!keys.contains(strVMActivityOverviewColumn, Qt::CaseInsensitive))
     2653        return VMActivityOverviewColumn_Max;
    26542654    /* Corresponding format for known words: */
    2655     return values.at(keys.indexOf(QRegExp(strVMResourceMonitorColumn, Qt::CaseInsensitive)));
    2656 }
     2655    return values.at(keys.indexOf(QRegExp(strVMActivityOverviewColumn, Qt::CaseInsensitive)));
     2656}
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h

    r88074 r88082  
    10741074
    10751075
    1076 /** Manager UI: VM resource Monitor Column types.
     1076/** Manager UI: VM Activity Overview Column types.
    10771077  * @note The first element must be 0 and the rest must be consecutive */
    1078 enum VMResourceMonitorColumn
    1079 {
    1080     VMResourceMonitorColumn_Name = 0,
    1081     VMResourceMonitorColumn_CPUGuestLoad,
    1082     VMResourceMonitorColumn_CPUVMMLoad,
    1083     VMResourceMonitorColumn_RAMUsedAndTotal,
    1084     VMResourceMonitorColumn_RAMUsedPercentage,
    1085     VMResourceMonitorColumn_NetworkUpRate,
    1086     VMResourceMonitorColumn_NetworkDownRate,
    1087     VMResourceMonitorColumn_NetworkUpTotal,
    1088     VMResourceMonitorColumn_NetworkDownTotal,
    1089     VMResourceMonitorColumn_DiskIOReadRate,
    1090     VMResourceMonitorColumn_DiskIOWriteRate,
    1091     VMResourceMonitorColumn_DiskIOReadTotal,
    1092     VMResourceMonitorColumn_DiskIOWriteTotal,
    1093     VMResourceMonitorColumn_VMExits,
    1094     VMResourceMonitorColumn_Max
     1078enum VMActivityOverviewColumn
     1079{
     1080    VMActivityOverviewColumn_Name = 0,
     1081    VMActivityOverviewColumn_CPUGuestLoad,
     1082    VMActivityOverviewColumn_CPUVMMLoad,
     1083    VMActivityOverviewColumn_RAMUsedAndTotal,
     1084    VMActivityOverviewColumn_RAMUsedPercentage,
     1085    VMActivityOverviewColumn_NetworkUpRate,
     1086    VMActivityOverviewColumn_NetworkDownRate,
     1087    VMActivityOverviewColumn_NetworkUpTotal,
     1088    VMActivityOverviewColumn_NetworkDownTotal,
     1089    VMActivityOverviewColumn_DiskIOReadRate,
     1090    VMActivityOverviewColumn_DiskIOWriteRate,
     1091    VMActivityOverviewColumn_DiskIOReadTotal,
     1092    VMActivityOverviewColumn_DiskIOWriteTotal,
     1093    VMActivityOverviewColumn_VMExits,
     1094    VMActivityOverviewColumn_Max
    10951095};
    10961096
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp

    r86977 r88082  
    46444644}
    46454645
    4646 void UIExtraDataManager::setVMResourceMonitorHiddenColumnList(const QStringList &hiddenColumnList)
     4646void UIExtraDataManager::setVMActivityOverviewHiddenColumnList(const QStringList &hiddenColumnList)
    46474647{
    46484648    setExtraDataStringList(GUI_VMResourceManager_HiddenColumns, hiddenColumnList);
    46494649}
    46504650
    4651 QStringList UIExtraDataManager::VMResourceMonitorHiddenColumnList()
     4651QStringList UIExtraDataManager::VMActivityOverviewHiddenColumnList()
    46524652{
    46534653    return extraDataStringList(GUI_VMResourceManager_HiddenColumns);
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h

    r86977 r88082  
    798798    /** @name Manager UI: VM Resource Monitor
    799799      * @{ */
    800         void setVMResourceMonitorHiddenColumnList(const QStringList &hiddenColumnList);
    801         QStringList VMResourceMonitorHiddenColumnList();
     800        void setVMActivityOverviewHiddenColumnList(const QStringList &hiddenColumnList);
     801        QStringList VMActivityOverviewHiddenColumnList();
    802802    /** @} */
    803803
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolManager.cpp

    r88074 r88082  
    355355
    356356/** Simple action extension, used as 'Show VM Resource Monitor' action class. */
    357 class UIActionToggleManagerToolsGlobalShowVMResourceMonitor : public UIActionToggle
    358 {
    359     Q_OBJECT;
    360 
    361 public:
    362 
    363     /** Constructs action passing @a pParent to the base-class. */
    364     UIActionToggleManagerToolsGlobalShowVMResourceMonitor(UIActionPool *pParent)
     357class UIActionToggleManagerToolsGlobalShowVMActivityOverview : public UIActionToggle
     358{
     359    Q_OBJECT;
     360
     361public:
     362
     363    /** Constructs action passing @a pParent to the base-class. */
     364    UIActionToggleManagerToolsGlobalShowVMActivityOverview(UIActionPool *pParent)
    365365        : UIActionToggle(pParent)
    366366    {
     
    376376    virtual QString shortcutExtraDataID() const /* override */
    377377    {
    378         return QString("ToolsGlobalVMResourceMonitor");
     378        return QString("ToolsGlobalVMActivityOverview");
    379379    }
    380380
     
    33853385
    33863386/** Menu action extension, used as 'Resources' menu class. */
    3387 class UIActionMenuVMResourceMonitor : public UIActionMenu
    3388 {
    3389     Q_OBJECT;
    3390 
    3391 public:
    3392 
    3393     /** Constructs action passing @a pParent to the base-class. */
    3394     UIActionMenuVMResourceMonitor(UIActionPool *pParent)
     3387class UIActionMenuVMActivityOverview : public UIActionMenu
     3388{
     3389    Q_OBJECT;
     3390
     3391public:
     3392
     3393    /** Constructs action passing @a pParent to the base-class. */
     3394    UIActionMenuVMActivityOverview(UIActionPool *pParent)
    33953395        : UIActionMenu(pParent)
    33963396    {}
     
    34013401    virtual QString shortcutExtraDataID() const /* override */
    34023402    {
    3403         return QString("VMResourceMonitorMenu");
     3403        return QString("VMActivityOverviewMenu");
    34043404    }
    34053405
     
    34123412
    34133413/** Menu action extension, used as 'Columns' menu class. */
    3414 class UIActionMenuManagerVMResourceMonitorColumns : public UIActionMenu
    3415 {
    3416     Q_OBJECT;
    3417 
    3418 public:
    3419 
    3420     /** Constructs action passing @a pParent to the base-class. */
    3421     UIActionMenuManagerVMResourceMonitorColumns(UIActionPool *pParent)
     3414class UIActionMenuManagerVMActivityOverviewColumns : public UIActionMenu
     3415{
     3416    Q_OBJECT;
     3417
     3418public:
     3419
     3420    /** Constructs action passing @a pParent to the base-class. */
     3421    UIActionMenuManagerVMActivityOverviewColumns(UIActionPool *pParent)
    34223422        : UIActionMenu(pParent,
    34233423                       ":/resources_monitor_columns_32px.png", ":/resources_monitor_columns_16px.png",
     
    34323432    virtual QString shortcutExtraDataID() const /* override */
    34333433    {
    3434         return QString("VMResourceMonitorColumns");
     3434        return QString("VMActivityOverviewColumns");
    34353435    }
    34363436
     
    34473447
    34483448/** Simple action extension, used as 'Switch to Machine Performance' action class. */
    3449 class UIActionMenuManagerVMResourceMonitorSwitchToMachinePerformance : public UIActionSimple
    3450 {
    3451     Q_OBJECT;
    3452 
    3453 public:
    3454 
    3455     /** Constructs action passing @a pParent to the base-class. */
    3456     UIActionMenuManagerVMResourceMonitorSwitchToMachinePerformance(UIActionPool *pParent)
     3449class UIActionMenuManagerVMActivityOverviewSwitchToMachinePerformance : public UIActionSimple
     3450{
     3451    Q_OBJECT;
     3452
     3453public:
     3454
     3455    /** Constructs action passing @a pParent to the base-class. */
     3456    UIActionMenuManagerVMActivityOverviewSwitchToMachinePerformance(UIActionPool *pParent)
    34573457        : UIActionSimple(pParent,
    34583458                         ":/resources_monitor_jump_to_vm_32px.png",          ":/resources_monitor_jump_to_vm_16px.png",
     
    34673467    virtual QString shortcutExtraDataID() const /* override */
    34683468    {
    3469         return QString("VMResourceMonitorSwitchToMachinePerformance");
     3469        return QString("VMActivityOverviewSwitchToMachinePerformance");
    34703470    }
    34713471
     
    35033503    m_pool[UIActionIndexMN_M_File_M_Tools_T_NetworkManager] = new UIActionToggleManagerToolsGlobalShowNetworkManager(this);
    35043504    m_pool[UIActionIndexMN_M_File_M_Tools_T_CloudProfileManager] = new UIActionToggleManagerToolsGlobalShowCloudProfileManager(this);
    3505     m_pool[UIActionIndexMN_M_File_M_Tools_T_VMResourceMonitor] = new UIActionToggleManagerToolsGlobalShowVMResourceMonitor(this);
     3505    m_pool[UIActionIndexMN_M_File_M_Tools_T_VMActivityOverview] = new UIActionToggleManagerToolsGlobalShowVMActivityOverview(this);
    35063506#ifdef VBOX_GUI_WITH_EXTRADATA_MANAGER_UI
    35073507    m_pool[UIActionIndexMN_M_File_S_ShowExtraDataManager] = new UIActionSimpleManagerFileShowExtraDataManager(this);
     
    36503650
    36513651    /* VM resource Monitor actions: */
    3652     m_pool[UIActionIndexMN_M_VMResourceMonitor] = new UIActionMenuVMResourceMonitor(this);
    3653     m_pool[UIActionIndexMN_M_VMResourceMonitor_M_Columns] = new UIActionMenuManagerVMResourceMonitorColumns(this);
    3654     m_pool[UIActionIndexMN_M_VMResourceMonitor_S_SwitchToMachinePerformance] = new UIActionMenuManagerVMResourceMonitorSwitchToMachinePerformance(this);
     3652    m_pool[UIActionIndexMN_M_VMActivityOverview] = new UIActionMenuVMActivityOverview(this);
     3653    m_pool[UIActionIndexMN_M_VMActivityOverview_M_Columns] = new UIActionMenuManagerVMActivityOverviewColumns(this);
     3654    m_pool[UIActionIndexMN_M_VMActivityOverview_S_SwitchToMachinePerformance] = new UIActionMenuManagerVMActivityOverviewSwitchToMachinePerformance(this);
    36553655
    36563656    /* 'File' action groups: */
     
    36613661    m_groupPool[UIActionIndexMN_M_File_M_Tools]->addAction(m_pool.value(UIActionIndexMN_M_File_M_Tools_T_NetworkManager));
    36623662    m_groupPool[UIActionIndexMN_M_File_M_Tools]->addAction(m_pool.value(UIActionIndexMN_M_File_M_Tools_T_CloudProfileManager));
    3663     m_groupPool[UIActionIndexMN_M_File_M_Tools]->addAction(m_pool.value(UIActionIndexMN_M_File_M_Tools_T_VMResourceMonitor));
     3663    m_groupPool[UIActionIndexMN_M_File_M_Tools]->addAction(m_pool.value(UIActionIndexMN_M_File_M_Tools_T_VMActivityOverview));
    36643664
    36653665    /* 'Group' action groups: */
     
    37033703    m_menuUpdateHandlers[UIActionIndexMN_M_CloudConsoleWindow].ptfm =    &UIActionPoolManager::updateMenuCloudConsoleWindow;
    37043704    m_menuUpdateHandlers[UIActionIndexMN_M_CloudConsole].ptfm =          &UIActionPoolManager::updateMenuCloudConsole;
    3705     m_menuUpdateHandlers[UIActionIndexMN_M_VMResourceMonitor].ptfm =     &UIActionPoolManager::updateMenuVMResourceMonitor;
     3705    m_menuUpdateHandlers[UIActionIndexMN_M_VMActivityOverview].ptfm =     &UIActionPoolManager::updateMenuVMActivityOverview;
    37063706    m_menuUpdateHandlers[UIActionIndexMN_M_Snapshot].ptfm =              &UIActionPoolManager::updateMenuSnapshot;
    37073707
     
    37883788    updateMenuCloud();
    37893789    /* 'VM Resource Monitor' menu: */
    3790     addMenu(m_mainMenus, action(UIActionIndexMN_M_VMResourceMonitor));
    3791     updateMenuVMResourceMonitor();
     3790    addMenu(m_mainMenus, action(UIActionIndexMN_M_VMActivityOverview));
     3791    updateMenuVMActivityOverview();
    37923792
    37933793    /* 'Snapshot' menu: */
     
    40154015    pMenu->addAction(action(UIActionIndexMN_M_File_M_Tools_T_NetworkManager));
    40164016    pMenu->addAction(action(UIActionIndexMN_M_File_M_Tools_T_CloudProfileManager));
    4017     pMenu->addAction(action(UIActionIndexMN_M_File_M_Tools_T_VMResourceMonitor));
     4017    pMenu->addAction(action(UIActionIndexMN_M_File_M_Tools_T_VMActivityOverview));
    40184018
    40194019    /* Mark menu as valid: */
     
    44824482}
    44834483
    4484 void UIActionPoolManager::updateMenuVMResourceMonitor()
     4484void UIActionPoolManager::updateMenuVMActivityOverview()
    44854485{
    44864486    /* Update corresponding menu: */
    4487     updateMenuVMResourceMonitorWrapper(action(UIActionIndexMN_M_VMResourceMonitor)->menu());
     4487    updateMenuVMActivityOverviewWrapper(action(UIActionIndexMN_M_VMActivityOverview)->menu());
    44884488
    44894489    /* Mark menu as valid: */
    4490     m_invalidations.remove(UIActionIndexMN_M_VMResourceMonitor);
     4490    m_invalidations.remove(UIActionIndexMN_M_VMActivityOverview);
    44914491}
    44924492
    4493 void UIActionPoolManager::updateMenuVMResourceMonitorWrapper(UIMenu *pMenu)
     4493void UIActionPoolManager::updateMenuVMActivityOverviewWrapper(UIMenu *pMenu)
    44944494{
    44954495    /* Clear contents: */
    44964496    pMenu->clear();
    4497     addAction(pMenu, action(UIActionIndexMN_M_VMResourceMonitor_M_Columns));
    4498     addAction(pMenu, action(UIActionIndexMN_M_VMResourceMonitor_S_SwitchToMachinePerformance));
     4497    addAction(pMenu, action(UIActionIndexMN_M_VMActivityOverview_M_Columns));
     4498    addAction(pMenu, action(UIActionIndexMN_M_VMActivityOverview_S_SwitchToMachinePerformance));
    44994499}
    45004500
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolManager.h

    r87516 r88082  
    4545    UIActionIndexMN_M_File_M_Tools_T_NetworkManager,
    4646    UIActionIndexMN_M_File_M_Tools_T_CloudProfileManager,
    47     UIActionIndexMN_M_File_M_Tools_T_VMResourceMonitor,
     47    UIActionIndexMN_M_File_M_Tools_T_VMActivityOverview,
    4848#ifdef VBOX_GUI_WITH_EXTRADATA_MANAGER_UI
    4949    UIActionIndexMN_M_File_S_ShowExtraDataManager,
     
    191191
    192192    /* VM Resource Monitor actions: */
    193     UIActionIndexMN_M_VMResourceMonitor,
    194     UIActionIndexMN_M_VMResourceMonitor_M_Columns,
    195     UIActionIndexMN_M_VMResourceMonitor_S_SwitchToMachinePerformance,
     193    UIActionIndexMN_M_VMActivityOverview,
     194    UIActionIndexMN_M_VMActivityOverview_M_Columns,
     195    UIActionIndexMN_M_VMActivityOverview_S_SwitchToMachinePerformance,
    196196
    197197    /* Maximum index: */
     
    299299
    300300    /** Updates 'VM Resource Monitor' menu. */
    301     void updateMenuVMResourceMonitor();
     301    void updateMenuVMActivityOverview();
    302302    /** Updates 'VM Resource Monitor' @a pMenu. */
    303     void updateMenuVMResourceMonitorWrapper(UIMenu *pMenu);
     303    void updateMenuVMActivityOverviewWrapper(UIMenu *pMenu);
    304304
    305305    /** Updates 'Snapshot' menu. */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneGlobal.cpp

    r88074 r88082  
    206206            {
    207207                /* Create VM Resource Monitor: */
    208                 m_pPaneResourceMonitor = new UIResourceMonitorWidget(EmbedTo_Stack, m_pActionPool, false /* show toolbar */);
     208                m_pPaneResourceMonitor = new UIVMActivityOverviewWidget(EmbedTo_Stack, m_pActionPool, false /* show toolbar */);
    209209                AssertPtrReturnVoid(m_pPaneResourceMonitor);
    210210                {
     
    216216                    /* Configure pane: */
    217217                    m_pPaneResourceMonitor->setProperty("ToolType", QVariant::fromValue(UIToolType_VMActivityOverview));
    218                     connect(m_pPaneResourceMonitor, &UIResourceMonitorWidget::sigSwitchToMachinePerformancePane,
     218                    connect(m_pPaneResourceMonitor, &UIVMActivityOverviewWidget::sigSwitchToMachinePerformancePane,
    219219                            this, &UIToolPaneGlobal::sigSwitchToMachinePerformancePane);
    220220
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneGlobal.h

    r87354 r88082  
    3737class UIMediumManagerWidget;
    3838class UINetworkManagerWidget;
    39 class UIResourceMonitorWidget;
     39class UIVMActivityOverviewWidget;
    4040class UIVirtualMachineItem;
    4141class UIWelcomePane;
     
    104104    UICloudProfileManagerWidget  *m_pPaneCloud;
    105105    /** Holds the VM Resource Monitor instance. */
    106     UIResourceMonitorWidget      *m_pPaneResourceMonitor;
     106    UIVMActivityOverviewWidget   *m_pPaneResourceMonitor;
    107107
    108108    /** Holds whether this pane is active. */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp

    r88074 r88082  
    31123112    /* Determine whether Resources menu should be visible: */
    31133113    const bool fResourcesMenuShown = fGlobalMenuShown && m_pWidget->currentGlobalTool() == UIToolType_VMActivityOverview;
    3114     actionPool()->action(UIActionIndexMN_M_VMResourceMonitor)->setVisible(fResourcesMenuShown);
     3114    actionPool()->action(UIActionIndexMN_M_VMActivityOverview)->setVisible(fResourcesMenuShown);
    31153115
    31163116    /* Determine whether Snapshots menu should be visible: */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp

    r88074 r88082  
    843843                case UIToolType_VMActivityOverview:
    844844                {
    845                     m_pToolBar->addAction(actionPool()->action(UIActionIndexMN_M_VMResourceMonitor_M_Columns));
    846                     m_pToolBar->addAction(actionPool()->action(UIActionIndexMN_M_VMResourceMonitor_S_SwitchToMachinePerformance));
     845                    m_pToolBar->addAction(actionPool()->action(UIActionIndexMN_M_VMActivityOverview_M_Columns));
     846                    m_pToolBar->addAction(actionPool()->action(UIActionIndexMN_M_VMActivityOverview_S_SwitchToMachinePerformance));
    847847                    QToolButton *pButton =
    848                         qobject_cast<QToolButton*>(m_pToolBar->widgetForAction(actionPool()->action(UIActionIndexMN_M_VMResourceMonitor_M_Columns)));
     848                        qobject_cast<QToolButton*>(m_pToolBar->widgetForAction(actionPool()->action(UIActionIndexMN_M_VMActivityOverview_M_Columns)));
    849849                    if (pButton)
    850850                    {
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsModel.cpp

    r88074 r88082  
    248248    actions[UIToolType_Network] = actionPool()->action(UIActionIndexMN_M_File_M_Tools_T_NetworkManager);
    249249    actions[UIToolType_Cloud] = actionPool()->action(UIActionIndexMN_M_File_M_Tools_T_CloudProfileManager);
    250     actions[UIToolType_VMActivityOverview] = actionPool()->action(UIActionIndexMN_M_File_M_Tools_T_VMResourceMonitor);
     250    actions[UIToolType_VMActivityOverview] = actionPool()->action(UIActionIndexMN_M_File_M_Tools_T_VMActivityOverview);
    251251    if (actions.contains(enmType))
    252252        actions.value(enmType)->setChecked(true);
  • trunk/src/VBox/Frontends/VirtualBox/src/monitor/resource/UIResourceMonitor.cpp

    r88081 r88082  
    6767
    6868/*********************************************************************************************************************************
    69 *   Class UIVMResourceMonitorDoughnutChart definition.                                                                           *
     69*   Class UIVMActivityOverviewDoughnutChart definition.                                                                           *
    7070*********************************************************************************************************************************/
    7171
    72 class UIVMResourceMonitorDoughnutChart : public QWidget
     72class UIVMActivityOverviewDoughnutChart : public QWidget
    7373{
    7474
     
    7777public:
    7878
    79     UIVMResourceMonitorDoughnutChart(QWidget *pParent = 0);
     79    UIVMActivityOverviewDoughnutChart(QWidget *pParent = 0);
    8080    void updateData(quint64 iData0, quint64 iData1);
    8181    void setChartColors(const QColor &color0, const QColor &color1);
     
    103103
    104104/*********************************************************************************************************************************
    105 *   Class UIVMResourceMonitorHostStats definition.                                                                               *
     105*   Class UIVMActivityOverviewHostStats definition.                                                                               *
    106106*********************************************************************************************************************************/
    107107
    108 class UIVMResourceMonitorHostStats
     108class UIVMActivityOverviewHostStats
    109109{
    110110
    111111public:
    112112
    113     UIVMResourceMonitorHostStats();
     113    UIVMActivityOverviewHostStats();
    114114    quint64 m_iCPUUserLoad;
    115115    quint64 m_iCPUKernelLoad;
     
    125125
    126126/*********************************************************************************************************************************
    127 *   Class UIVMResourceMonitorHostStatsWidget definition.                                                                         *
     127*   Class UIVMActivityOverviewHostStatsWidget definition.                                                                         *
    128128*********************************************************************************************************************************/
    129129
    130 class UIVMResourceMonitorHostStatsWidget : public QIWithRetranslateUI<QWidget>
     130class UIVMActivityOverviewHostStatsWidget : public QIWithRetranslateUI<QWidget>
    131131{
    132132
     
    135135public:
    136136
    137     UIVMResourceMonitorHostStatsWidget(QWidget *pParent = 0);
    138     void setHostStats(const UIVMResourceMonitorHostStats &hostStats);
     137    UIVMActivityOverviewHostStatsWidget(QWidget *pParent = 0);
     138    void setHostStats(const UIVMActivityOverviewHostStats &hostStats);
    139139
    140140protected:
     
    148148    void updateLabels();
    149149
    150     UIVMResourceMonitorDoughnutChart   *m_pHostCPUChart;
    151     UIVMResourceMonitorDoughnutChart   *m_pHostRAMChart;
    152     UIVMResourceMonitorDoughnutChart   *m_pHostFSChart;
     150    UIVMActivityOverviewDoughnutChart   *m_pHostCPUChart;
     151    UIVMActivityOverviewDoughnutChart   *m_pHostRAMChart;
     152    UIVMActivityOverviewDoughnutChart   *m_pHostFSChart;
    153153    QLabel                             *m_pCPUTitleLabel;
    154154    QLabel                             *m_pCPUUserLabel;
     
    167167    QColor                              m_RAMFreeColor;
    168168    QColor                              m_RAMUsedColor;
    169     UIVMResourceMonitorHostStats        m_hostStats;
     169    UIVMActivityOverviewHostStats        m_hostStats;
    170170};
    171171
    172172
    173173/*********************************************************************************************************************************
    174 *   Class UIVMResourceMonitorTableView definition.                                                                               *
     174*   Class UIVMActivityOverviewTableView definition.                                                                               *
    175175*********************************************************************************************************************************/
    176176/** A QTableView extension so manage the column width a bit better than what Qt offers out of box. */
    177 class UIVMResourceMonitorTableView : public QTableView
     177class UIVMActivityOverviewTableView : public QTableView
    178178{
    179179    Q_OBJECT;
     
    185185public:
    186186
    187     UIVMResourceMonitorTableView(QWidget *pParent = 0);
     187    UIVMActivityOverviewTableView(QWidget *pParent = 0);
    188188    void setMinimumColumnWidths(const QMap<int, int>& widths);
    189189    void updateColumVisibility();
     
    209209};
    210210
    211 /** Each instance of UIVMResourceMonitorItem corresponds to a running vm whose stats are displayed.
     211/** Each instance of UIVMActivityOverviewItem corresponds to a running vm whose stats are displayed.
    212212  * they are owned my the model. */
    213213/*********************************************************************************************************************************
    214  *   Class UIVMResourceMonitorItem definition.                                                                           *
     214 *   Class UIVMActivityOverviewItem definition.                                                                           *
    215215 *********************************************************************************************************************************/
    216 class UIResourceMonitorItem
     216class UIActivityOverviewItem
    217217{
    218218public:
    219     UIResourceMonitorItem(const QUuid &uid, const QString &strVMName);
    220     UIResourceMonitorItem(const QUuid &uid);
    221     UIResourceMonitorItem();
    222     ~UIResourceMonitorItem();
    223     bool operator==(const UIResourceMonitorItem& other) const;
     219    UIActivityOverviewItem(const QUuid &uid, const QString &strVMName);
     220    UIActivityOverviewItem(const QUuid &uid);
     221    UIActivityOverviewItem();
     222    ~UIActivityOverviewItem();
     223    bool operator==(const UIActivityOverviewItem& other) const;
    224224    bool isWithGuestAdditions();
    225225
     
    259259};
    260260
    261 Q_DECLARE_METATYPE(UIResourceMonitorItem);
    262 
    263 
    264 /*********************************************************************************************************************************
    265 *   Class UIVMResourceMonitorProxyModel definition.                                                                              *
     261Q_DECLARE_METATYPE(UIActivityOverviewItem);
     262
     263
     264/*********************************************************************************************************************************
     265*   Class UIVMActivityOverviewProxyModel definition.                                                                              *
    266266*********************************************************************************************************************************/
    267 class UIResourceMonitorProxyModel : public QSortFilterProxyModel
     267class UIActivityOverviewProxyModel : public QSortFilterProxyModel
    268268{
    269269
     
    272272public:
    273273
    274     UIResourceMonitorProxyModel(QObject *parent = 0);
     274    UIActivityOverviewProxyModel(QObject *parent = 0);
    275275    void dataUpdate();
    276276};
     
    278278
    279279/*********************************************************************************************************************************
    280 *   Class UIResourceMonitorModel definition.                                                                                     *
     280*   Class UIActivityOverviewModel definition.                                                                                     *
    281281*********************************************************************************************************************************/
    282 class UIResourceMonitorModel : public QAbstractTableModel
     282class UIActivityOverviewModel : public QAbstractTableModel
    283283{
    284284    Q_OBJECT;
     
    287287
    288288    void sigDataUpdate();
    289     void sigHostStatsUpdate(const UIVMResourceMonitorHostStats &stats);
     289    void sigHostStatsUpdate(const UIVMActivityOverviewHostStats &stats);
    290290
    291291public:
    292292
    293     UIResourceMonitorModel(QObject *parent = 0);
     293    UIActivityOverviewModel(QObject *parent = 0);
    294294    int      rowCount(const QModelIndex &parent = QModelIndex()) const /* override */;
    295295    int      columnCount(const QModelIndex &parent = QModelIndex()) const /* override */;
     
    319319    void getHostRAMStats();
    320320
    321     QVector<UIResourceMonitorItem> m_itemList;
     321    QVector<UIActivityOverviewItem> m_itemList;
    322322    QMap<int, QString> m_columnTitles;
    323323    QTimer *m_pTimer;
     
    332332     *  when the widget is visible in the main UI. */
    333333    bool m_fShouldUpdate;
    334     UIVMResourceMonitorHostStats m_hostStats;
    335     /** Maximum length of string length of data displayed in column. Updated in UIResourceMonitorModel::data(..). */
     334    UIVMActivityOverviewHostStats m_hostStats;
     335    /** Maximum length of string length of data displayed in column. Updated in UIActivityOverviewModel::data(..). */
    336336    mutable QMap<int, int> m_columnDataMaxLength;
    337337};
     
    339339
    340340/*********************************************************************************************************************************
    341 *   UIVMResourceMonitorDelegate definition.                                                                                      *
     341*   UIVMActivityOverviewDelegate definition.                                                                                      *
    342342*********************************************************************************************************************************/
    343343/** A QItemDelegate child class to disable dashed lines drawn around selected cells in QTableViews */
    344 class UIVMResourceMonitorDelegate : public QItemDelegate
     344class UIVMActivityOverviewDelegate : public QItemDelegate
    345345{
    346346
     
    354354
    355355/*********************************************************************************************************************************
    356 *   Class UIVMResourceMonitorDoughnutChart implementation.                                                                       *
     356*   Class UIVMActivityOverviewDoughnutChart implementation.                                                                       *
    357357*********************************************************************************************************************************/
    358 UIVMResourceMonitorDoughnutChart::UIVMResourceMonitorDoughnutChart(QWidget *pParent /* = 0 */)
     358UIVMActivityOverviewDoughnutChart::UIVMActivityOverviewDoughnutChart(QWidget *pParent /* = 0 */)
    359359    :QWidget(pParent)
    360360    , m_iData0(0)
     
    365365}
    366366
    367 void UIVMResourceMonitorDoughnutChart::updateData(quint64 iData0, quint64 iData1)
     367void UIVMActivityOverviewDoughnutChart::updateData(quint64 iData0, quint64 iData1)
    368368{
    369369    m_iData0 = iData0;
     
    372372}
    373373
    374 void UIVMResourceMonitorDoughnutChart::setChartColors(const QColor &color0, const QColor &color1)
     374void UIVMActivityOverviewDoughnutChart::setChartColors(const QColor &color0, const QColor &color1)
    375375{
    376376    m_color0 = color0;
     
    378378}
    379379
    380 void UIVMResourceMonitorDoughnutChart::setChartCenterString(const QString &strCenter)
     380void UIVMActivityOverviewDoughnutChart::setChartCenterString(const QString &strCenter)
    381381{
    382382    m_strCenter = strCenter;
    383383}
    384384
    385 void UIVMResourceMonitorDoughnutChart::setDataMaximum(quint64 iMax)
     385void UIVMActivityOverviewDoughnutChart::setDataMaximum(quint64 iMax)
    386386{
    387387    m_iDataMaximum = iMax;
    388388}
    389389
    390 void UIVMResourceMonitorDoughnutChart::paintEvent(QPaintEvent *pEvent)
     390void UIVMActivityOverviewDoughnutChart::paintEvent(QPaintEvent *pEvent)
    391391{
    392392    QWidget::paintEvent(pEvent);
     
    413413
    414414/*********************************************************************************************************************************
    415 *   Class UIVMResourceMonitorHostStatsWidget implementation.                                                                     *
     415*   Class UIVMActivityOverviewHostStatsWidget implementation.                                                                     *
    416416*********************************************************************************************************************************/
    417417
    418 UIVMResourceMonitorHostStatsWidget::UIVMResourceMonitorHostStatsWidget(QWidget *pParent /* = 0 */)
     418UIVMActivityOverviewHostStatsWidget::UIVMActivityOverviewHostStatsWidget(QWidget *pParent /* = 0 */)
    419419    : QIWithRetranslateUI<QWidget>(pParent)
    420420    , m_pHostCPUChart(0)
     
    442442}
    443443
    444 void UIVMResourceMonitorHostStatsWidget::setHostStats(const UIVMResourceMonitorHostStats &hostStats)
     444void UIVMActivityOverviewHostStatsWidget::setHostStats(const UIVMActivityOverviewHostStats &hostStats)
    445445{
    446446    m_hostStats = hostStats;
     
    459459        {
    460460            quint64 iUsedRamPer = 100 * (iUsedRAM / (float) m_hostStats.m_iRAMTotal);
    461             QString strCenter = QString("%1%\n%2").arg(iUsedRamPer).arg(UIResourceMonitorWidget::tr("Used"));
     461            QString strCenter = QString("%1%\n%2").arg(iUsedRamPer).arg(UIVMActivityOverviewWidget::tr("Used"));
    462462            m_pHostRAMChart->setChartCenterString(strCenter);
    463463        }
     
    471471        {
    472472            quint64 iUsedFSPer = 100 * (iUsedFS / (float) m_hostStats.m_iFSTotal);
    473             QString strCenter = QString("%1%\n%2").arg(iUsedFSPer).arg(UIResourceMonitorWidget::tr("Used"));
     473            QString strCenter = QString("%1%\n%2").arg(iUsedFSPer).arg(UIVMActivityOverviewWidget::tr("Used"));
    474474            m_pHostFSChart->setChartCenterString(strCenter);
    475475        }
     
    479479}
    480480
    481 void UIVMResourceMonitorHostStatsWidget::retranslateUi()
     481void UIVMActivityOverviewHostStatsWidget::retranslateUi()
    482482{
    483483    updateLabels();
    484484}
    485485
    486 void UIVMResourceMonitorHostStatsWidget::addVerticalLine(QHBoxLayout *pLayout)
     486void UIVMActivityOverviewHostStatsWidget::addVerticalLine(QHBoxLayout *pLayout)
    487487{
    488488    QFrame *pLine = new QFrame;
     
    492492}
    493493
    494 void UIVMResourceMonitorHostStatsWidget::prepare()
     494void UIVMActivityOverviewHostStatsWidget::prepare()
    495495{
    496496    QHBoxLayout *pLayout = new QHBoxLayout;
     
    518518        pCPULabelsLayout->setSpacing(0);
    519519        /* Host CPU chart widget: */
    520         m_pHostCPUChart = new UIVMResourceMonitorDoughnutChart;
     520        m_pHostCPUChart = new UIVMActivityOverviewDoughnutChart;
    521521        if (m_pHostCPUChart)
    522522        {
     
    547547        pRAMLabelsLayout->addWidget(m_pRAMTotalLabel);
    548548
    549         m_pHostRAMChart = new UIVMResourceMonitorDoughnutChart;
     549        m_pHostRAMChart = new UIVMActivityOverviewDoughnutChart;
    550550        if (m_pHostRAMChart)
    551551        {
     
    574574        pFSLabelsLayout->addWidget(m_pFSTotalLabel);
    575575
    576         m_pHostFSChart = new UIVMResourceMonitorDoughnutChart;
     576        m_pHostFSChart = new UIVMActivityOverviewDoughnutChart;
    577577        if (m_pHostFSChart)
    578578        {
     
    586586}
    587587
    588 void UIVMResourceMonitorHostStatsWidget::updateLabels()
     588void UIVMActivityOverviewHostStatsWidget::updateLabels()
    589589{
    590590    if (m_pCPUTitleLabel)
    591         m_pCPUTitleLabel->setText(QString("<b>%1</b>").arg(UIResourceMonitorWidget::tr("Host CPU Load")));
     591        m_pCPUTitleLabel->setText(QString("<b>%1</b>").arg(UIVMActivityOverviewWidget::tr("Host CPU Load")));
    592592    if (m_pCPUUserLabel)
    593593    {
    594594        QString strColor = QColor(m_CPUUserColor).name(QColor::HexRgb);
    595         m_pCPUUserLabel->setText(QString("<font color=\"%1\">%2: %3%</font>").arg(strColor).arg(UIResourceMonitorWidget::tr("User")).arg(QString::number(m_hostStats.m_iCPUUserLoad)));
     595        m_pCPUUserLabel->setText(QString("<font color=\"%1\">%2: %3%</font>").arg(strColor).arg(UIVMActivityOverviewWidget::tr("User")).arg(QString::number(m_hostStats.m_iCPUUserLoad)));
    596596    }
    597597    if (m_pCPUKernelLabel)
    598598    {
    599599        QString strColor = QColor(m_CPUKernelColor).name(QColor::HexRgb);
    600         m_pCPUKernelLabel->setText(QString("<font color=\"%1\">%2: %3%</font>").arg(strColor).arg(UIResourceMonitorWidget::tr("Kernel")).arg(QString::number(m_hostStats.m_iCPUKernelLoad)));
     600        m_pCPUKernelLabel->setText(QString("<font color=\"%1\">%2: %3%</font>").arg(strColor).arg(UIVMActivityOverviewWidget::tr("Kernel")).arg(QString::number(m_hostStats.m_iCPUKernelLoad)));
    601601    }
    602602    if (m_pCPUTotalLabel)
    603         m_pCPUTotalLabel->setText(QString("%1: %2%").arg(UIResourceMonitorWidget::tr("Total")).arg(m_hostStats.m_iCPUUserLoad + m_hostStats.m_iCPUKernelLoad));
     603        m_pCPUTotalLabel->setText(QString("%1: %2%").arg(UIVMActivityOverviewWidget::tr("Total")).arg(m_hostStats.m_iCPUUserLoad + m_hostStats.m_iCPUKernelLoad));
    604604    if (m_pRAMTitleLabel)
    605         m_pRAMTitleLabel->setText(QString("<b>%1</b>").arg(UIResourceMonitorWidget::tr("Host RAM Usage")));
     605        m_pRAMTitleLabel->setText(QString("<b>%1</b>").arg(UIVMActivityOverviewWidget::tr("Host RAM Usage")));
    606606    if (m_pRAMFreeLabel)
    607607    {
    608608        QString strRAM = uiCommon().formatSize(m_hostStats.m_iRAMFree);
    609609        QString strColor = QColor(m_RAMFreeColor).name(QColor::HexRgb);
    610         m_pRAMFreeLabel->setText(QString("<font color=\"%1\">%2: %3</font>").arg(strColor).arg(UIResourceMonitorWidget::tr("Free")).arg(strRAM));
     610        m_pRAMFreeLabel->setText(QString("<font color=\"%1\">%2: %3</font>").arg(strColor).arg(UIVMActivityOverviewWidget::tr("Free")).arg(strRAM));
    611611    }
    612612    if (m_pRAMUsedLabel)
     
    614614        QString strRAM = uiCommon().formatSize(m_hostStats.m_iRAMTotal - m_hostStats.m_iRAMFree);
    615615        QString strColor = QColor(m_RAMUsedColor).name(QColor::HexRgb);
    616         m_pRAMUsedLabel->setText(QString("<font color=\"%1\">%2: %3</font>").arg(strColor).arg(UIResourceMonitorWidget::tr("Used")).arg(strRAM));
     616        m_pRAMUsedLabel->setText(QString("<font color=\"%1\">%2: %3</font>").arg(strColor).arg(UIVMActivityOverviewWidget::tr("Used")).arg(strRAM));
    617617    }
    618618    if (m_pRAMTotalLabel)
    619619    {
    620620        QString strRAM = uiCommon().formatSize(m_hostStats.m_iRAMTotal);
    621         m_pRAMTotalLabel->setText(QString("%1: %2").arg(UIResourceMonitorWidget::tr("Total")).arg(strRAM));
     621        m_pRAMTotalLabel->setText(QString("%1: %2").arg(UIVMActivityOverviewWidget::tr("Total")).arg(strRAM));
    622622    }
    623623    if (m_pFSTitleLabel)
    624         m_pFSTitleLabel->setText(QString("<b>%1</b>").arg(UIResourceMonitorWidget::tr("Host File System")));
     624        m_pFSTitleLabel->setText(QString("<b>%1</b>").arg(UIVMActivityOverviewWidget::tr("Host File System")));
    625625    if (m_pFSFreeLabel)
    626626    {
    627627        QString strFS = uiCommon().formatSize(m_hostStats.m_iFSFree);
    628628        QString strColor = QColor(m_RAMFreeColor).name(QColor::HexRgb);
    629         m_pFSFreeLabel->setText(QString("<font color=\"%1\">%2: %3</font>").arg(strColor).arg(UIResourceMonitorWidget::tr("Free")).arg(strFS));
     629        m_pFSFreeLabel->setText(QString("<font color=\"%1\">%2: %3</font>").arg(strColor).arg(UIVMActivityOverviewWidget::tr("Free")).arg(strFS));
    630630    }
    631631    if (m_pFSUsedLabel)
     
    633633        QString strFS = uiCommon().formatSize(m_hostStats.m_iFSTotal - m_hostStats.m_iFSFree);
    634634        QString strColor = QColor(m_RAMUsedColor).name(QColor::HexRgb);
    635         m_pFSUsedLabel->setText(QString("<font color=\"%1\">%2: %3</font>").arg(strColor).arg(UIResourceMonitorWidget::tr("Used")).arg(strFS));
     635        m_pFSUsedLabel->setText(QString("<font color=\"%1\">%2: %3</font>").arg(strColor).arg(UIVMActivityOverviewWidget::tr("Used")).arg(strFS));
    636636    }
    637637    if (m_pFSTotalLabel)
    638638    {
    639639        QString strFS = uiCommon().formatSize(m_hostStats.m_iFSTotal);
    640         m_pFSTotalLabel->setText(QString("%1: %2").arg(UIResourceMonitorWidget::tr("Total")).arg(strFS));
    641     }
    642 }
    643 
    644 
    645 
    646 /*********************************************************************************************************************************
    647 *   Class UIVMResourceMonitorTableView implementation.                                                                           *
     640        m_pFSTotalLabel->setText(QString("%1: %2").arg(UIVMActivityOverviewWidget::tr("Total")).arg(strFS));
     641    }
     642}
     643
     644
     645
     646/*********************************************************************************************************************************
     647*   Class UIVMActivityOverviewTableView implementation.                                                                           *
    648648*********************************************************************************************************************************/
    649649
    650 UIVMResourceMonitorTableView::UIVMResourceMonitorTableView(QWidget *pParent /* = 0 */)
     650UIVMActivityOverviewTableView::UIVMActivityOverviewTableView(QWidget *pParent /* = 0 */)
    651651    :QTableView(pParent)
    652652{
    653653}
    654654
    655 void UIVMResourceMonitorTableView::setMinimumColumnWidths(const QMap<int, int>& widths)
     655void UIVMActivityOverviewTableView::setMinimumColumnWidths(const QMap<int, int>& widths)
    656656{
    657657    m_minimumColumnWidths = widths;
     
    659659}
    660660
    661 void UIVMResourceMonitorTableView::updateColumVisibility()
    662 {
    663     UIResourceMonitorProxyModel *pProxyModel = qobject_cast<UIResourceMonitorProxyModel *>(model());
     661void UIVMActivityOverviewTableView::updateColumVisibility()
     662{
     663    UIActivityOverviewProxyModel *pProxyModel = qobject_cast<UIActivityOverviewProxyModel *>(model());
    664664    if (!pProxyModel)
    665665        return;
    666     UIResourceMonitorModel *pModel = qobject_cast<UIResourceMonitorModel *>(pProxyModel->sourceModel());
     666    UIActivityOverviewModel *pModel = qobject_cast<UIActivityOverviewModel *>(pProxyModel->sourceModel());
    667667    QHeaderView *pHeader = horizontalHeader();
    668668
    669669    if (!pModel || !pHeader)
    670670        return;
    671     for (int i = (int)VMResourceMonitorColumn_Name; i < (int)VMResourceMonitorColumn_Max; ++i)
     671    for (int i = (int)VMActivityOverviewColumn_Name; i < (int)VMActivityOverviewColumn_Max; ++i)
    672672    {
    673673        if (!pModel->columnVisible(i))
     
    679679}
    680680
    681 int UIVMResourceMonitorTableView::selectedItemIndex() const
    682 {
    683     UIResourceMonitorProxyModel *pModel = qobject_cast<UIResourceMonitorProxyModel*>(model());
     681int UIVMActivityOverviewTableView::selectedItemIndex() const
     682{
     683    UIActivityOverviewProxyModel *pModel = qobject_cast<UIActivityOverviewProxyModel*>(model());
    684684    if (!pModel)
    685685        return -1;
     
    700700}
    701701
    702 bool UIVMResourceMonitorTableView::hasSelection() const
     702bool UIVMActivityOverviewTableView::hasSelection() const
    703703{
    704704    if (!selectionModel())
     
    707707}
    708708
    709 void UIVMResourceMonitorTableView::resizeEvent(QResizeEvent *pEvent)
     709void UIVMActivityOverviewTableView::resizeEvent(QResizeEvent *pEvent)
    710710{
    711711    resizeHeaders();
     
    713713}
    714714
    715 void UIVMResourceMonitorTableView::selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
     715void UIVMActivityOverviewTableView::selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
    716716{
    717717    emit sigSelectionChanged(selected, deselected);
     
    719719}
    720720
    721 void UIVMResourceMonitorTableView::mousePressEvent(QMouseEvent *pEvent)
     721void UIVMActivityOverviewTableView::mousePressEvent(QMouseEvent *pEvent)
    722722{
    723723    if (!indexAt(pEvent->pos()).isValid())
     
    726726}
    727727
    728 void UIVMResourceMonitorTableView::resizeHeaders()
     728void UIVMActivityOverviewTableView::resizeHeaders()
    729729{
    730730    QHeaderView* pHeader = horizontalHeader();
     
    738738        if (pHeader->isSectionHidden(i))
    739739            continue;
    740         int iMinWidth = m_minimumColumnWidths.value((VMResourceMonitorColumn)i, 0);
     740        int iMinWidth = m_minimumColumnWidths.value((VMActivityOverviewColumn)i, 0);
    741741        pHeader->resizeSection(i, iWidth < iMinWidth ? iMinWidth : iWidth);
    742742    }
     
    745745
    746746/*********************************************************************************************************************************
    747  *   Class UIVMResourceMonitorItem implementation.                                                                           *
     747 *   Class UIVMActivityOverviewItem implementation.                                                                           *
    748748 *********************************************************************************************************************************/
    749 UIResourceMonitorItem::UIResourceMonitorItem(const QUuid &uid, const QString &strVMName)
     749UIActivityOverviewItem::UIActivityOverviewItem(const QUuid &uid, const QString &strVMName)
    750750    : m_VMuid(uid)
    751751    , m_strVMName(strVMName)
     
    779779}
    780780
    781 UIResourceMonitorItem::UIResourceMonitorItem()
     781UIActivityOverviewItem::UIActivityOverviewItem()
    782782    : m_VMuid(QUuid())
    783783    , m_uCPUGuestLoad(0)
     
    799799}
    800800
    801 UIResourceMonitorItem::UIResourceMonitorItem(const QUuid &uid)
     801UIActivityOverviewItem::UIActivityOverviewItem(const QUuid &uid)
    802802    : m_VMuid(uid)
    803803    , m_uCPUGuestLoad(0)
     
    819819}
    820820
    821 UIResourceMonitorItem::~UIResourceMonitorItem()
     821UIActivityOverviewItem::~UIActivityOverviewItem()
    822822{
    823823    if (!m_comSession.isNull())
     
    825825}
    826826
    827 bool UIResourceMonitorItem::operator==(const UIResourceMonitorItem& other) const
     827bool UIActivityOverviewItem::operator==(const UIActivityOverviewItem& other) const
    828828{
    829829    if (m_VMuid == other.m_VMuid)
     
    832832}
    833833
    834 bool UIResourceMonitorItem::isWithGuestAdditions()
     834bool UIActivityOverviewItem::isWithGuestAdditions()
    835835{
    836836    if (m_comGuest.isNull())
     
    841841
    842842/*********************************************************************************************************************************
    843 *   Class UIVMResourceMonitorHostStats implementation.                                                                           *
     843*   Class UIVMActivityOverviewHostStats implementation.                                                                           *
    844844*********************************************************************************************************************************/
    845845
    846 UIVMResourceMonitorHostStats::UIVMResourceMonitorHostStats()
     846UIVMActivityOverviewHostStats::UIVMActivityOverviewHostStats()
    847847    : m_iCPUUserLoad(0)
    848848    , m_iCPUKernelLoad(0)
     
    857857
    858858/*********************************************************************************************************************************
    859 *   Class UIVMResourceMonitorProxyModel implementation.                                                                          *
     859*   Class UIVMActivityOverviewProxyModel implementation.                                                                          *
    860860*********************************************************************************************************************************/
    861 UIResourceMonitorProxyModel::UIResourceMonitorProxyModel(QObject *parent /* = 0 */)
     861UIActivityOverviewProxyModel::UIActivityOverviewProxyModel(QObject *parent /* = 0 */)
    862862    :QSortFilterProxyModel(parent)
    863863{
    864864}
    865865
    866 void UIResourceMonitorProxyModel::dataUpdate()
     866void UIActivityOverviewProxyModel::dataUpdate()
    867867{
    868868    if (sourceModel())
     
    873873
    874874/*********************************************************************************************************************************
    875 *   Class UIResourceMonitorModel implementation.                                                                                 *
     875*   Class UIActivityOverviewModel implementation.                                                                                 *
    876876*********************************************************************************************************************************/
    877 UIResourceMonitorModel::UIResourceMonitorModel(QObject *parent /*= 0*/)
     877UIActivityOverviewModel::UIActivityOverviewModel(QObject *parent /*= 0*/)
    878878    :QAbstractTableModel(parent)
    879879    , m_pTimer(new QTimer(this))
     
    883883}
    884884
    885 void UIResourceMonitorModel::initialize()
    886 {
    887     for (int i = 0; i < (int)VMResourceMonitorColumn_Max; ++i)
     885void UIActivityOverviewModel::initialize()
     886{
     887    for (int i = 0; i < (int)VMActivityOverviewColumn_Max; ++i)
    888888        m_columnDataMaxLength[i] = 0;
    889889
    890890    initializeItems();
    891891    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigMachineStateChange,
    892             this, &UIResourceMonitorModel::sltMachineStateChanged);
     892            this, &UIActivityOverviewModel::sltMachineStateChanged);
    893893
    894894    if (m_pTimer)
    895895    {
    896         connect(m_pTimer, &QTimer::timeout, this, &UIResourceMonitorModel::sltTimeout);
     896        connect(m_pTimer, &QTimer::timeout, this, &UIActivityOverviewModel::sltTimeout);
    897897        m_pTimer->start(1000);
    898898    }
    899899}
    900900
    901 int UIResourceMonitorModel::rowCount(const QModelIndex &parent /* = QModelIndex() */) const
     901int UIActivityOverviewModel::rowCount(const QModelIndex &parent /* = QModelIndex() */) const
    902902{
    903903    Q_UNUSED(parent);
     
    905905}
    906906
    907 int UIResourceMonitorModel::columnCount(const QModelIndex &parent /* = QModelIndex() */) const
     907int UIActivityOverviewModel::columnCount(const QModelIndex &parent /* = QModelIndex() */) const
    908908{
    909909    Q_UNUSED(parent);
    910     return VMResourceMonitorColumn_Max;
    911 }
    912 
    913 void UIResourceMonitorModel::setShouldUpdate(bool fShouldUpdate)
     910    return VMActivityOverviewColumn_Max;
     911}
     912
     913void UIActivityOverviewModel::setShouldUpdate(bool fShouldUpdate)
    914914{
    915915    m_fShouldUpdate = fShouldUpdate;
    916916}
    917917
    918 const QMap<int, int> UIResourceMonitorModel::dataLengths() const
     918const QMap<int, int> UIActivityOverviewModel::dataLengths() const
    919919{
    920920    return m_columnDataMaxLength;
    921921}
    922922
    923 QUuid UIResourceMonitorModel::itemUid(int iIndex)
     923QUuid UIActivityOverviewModel::itemUid(int iIndex)
    924924{
    925925    if (iIndex >= m_itemList.size())
     
    928928}
    929929
    930 int UIResourceMonitorModel::itemIndex(const QUuid &uid)
     930int UIActivityOverviewModel::itemIndex(const QUuid &uid)
    931931{
    932932    for (int i = 0; i < m_itemList.size(); ++i)
     
    938938}
    939939
    940 QVariant UIResourceMonitorModel::data(const QModelIndex &index, int role) const
     940QVariant UIActivityOverviewModel::data(const QModelIndex &index, int role) const
    941941{
    942942    if (!index.isValid() || role != Qt::DisplayRole || index.row() >= rowCount())
     
    945945}
    946946
    947 QVariant UIResourceMonitorModel::headerData(int section, Qt::Orientation orientation, int role) const
     947QVariant UIActivityOverviewModel::headerData(int section, Qt::Orientation orientation, int role) const
    948948{
    949949    if (role == Qt::DisplayRole && orientation == Qt::Horizontal)
    950         return m_columnTitles.value((VMResourceMonitorColumn)section, QString());;
     950        return m_columnTitles.value((VMActivityOverviewColumn)section, QString());;
    951951    return QVariant();
    952952}
    953953
    954 void UIResourceMonitorModel::setColumnCaptions(const QMap<int, QString>& captions)
     954void UIActivityOverviewModel::setColumnCaptions(const QMap<int, QString>& captions)
    955955{
    956956    m_columnTitles = captions;
    957957}
    958958
    959 void UIResourceMonitorModel::initializeItems()
     959void UIActivityOverviewModel::initializeItems()
    960960{
    961961    foreach (const CMachine &comMachine, uiCommon().virtualBox().GetMachines())
     
    970970}
    971971
    972 void UIResourceMonitorModel::sltMachineStateChanged(const QUuid &uId, const KMachineState state)
     972void UIActivityOverviewModel::sltMachineStateChanged(const QUuid &uId, const KMachineState state)
    973973{
    974974    int iIndex = itemIndex(uId);
     
    995995}
    996996
    997 void UIResourceMonitorModel::getHostRAMStats()
     997void UIActivityOverviewModel::getHostRAMStats()
    998998{
    999999    CHost comHost = uiCommon().host();
     
    10021002}
    10031003
    1004 void UIResourceMonitorModel::sltTimeout()
     1004void UIActivityOverviewModel::sltTimeout()
    10051005{
    10061006    if (!m_fShouldUpdate)
     
    10101010    ULONG aPctVMM;
    10111011
    1012     bool fCPUColumns = columnVisible(VMResourceMonitorColumn_CPUVMMLoad) || columnVisible(VMResourceMonitorColumn_CPUGuestLoad);
    1013     bool fNetworkColumns = columnVisible(VMResourceMonitorColumn_NetworkUpRate)
    1014         || columnVisible(VMResourceMonitorColumn_NetworkDownRate)
    1015         || columnVisible(VMResourceMonitorColumn_NetworkUpTotal)
    1016         || columnVisible(VMResourceMonitorColumn_NetworkDownTotal);
    1017     bool fIOColumns = columnVisible(VMResourceMonitorColumn_DiskIOReadRate)
    1018         || columnVisible(VMResourceMonitorColumn_DiskIOWriteRate)
    1019         || columnVisible(VMResourceMonitorColumn_DiskIOReadTotal)
    1020         || columnVisible(VMResourceMonitorColumn_DiskIOWriteTotal);
    1021     bool fVMExitColumn = columnVisible(VMResourceMonitorColumn_VMExits);
     1012    bool fCPUColumns = columnVisible(VMActivityOverviewColumn_CPUVMMLoad) || columnVisible(VMActivityOverviewColumn_CPUGuestLoad);
     1013    bool fNetworkColumns = columnVisible(VMActivityOverviewColumn_NetworkUpRate)
     1014        || columnVisible(VMActivityOverviewColumn_NetworkDownRate)
     1015        || columnVisible(VMActivityOverviewColumn_NetworkUpTotal)
     1016        || columnVisible(VMActivityOverviewColumn_NetworkDownTotal);
     1017    bool fIOColumns = columnVisible(VMActivityOverviewColumn_DiskIOReadRate)
     1018        || columnVisible(VMActivityOverviewColumn_DiskIOWriteRate)
     1019        || columnVisible(VMActivityOverviewColumn_DiskIOReadTotal)
     1020        || columnVisible(VMActivityOverviewColumn_DiskIOWriteTotal);
     1021    bool fVMExitColumn = columnVisible(VMActivityOverviewColumn_VMExits);
    10221022
    10231023    /* Host's RAM usage is obtained from IHost not from IPerformanceCollectior: */
     
    10701070    for (int i = 0; i < m_itemList.size(); ++i)
    10711071    {
    1072         m_itemList[i].m_columnData[VMResourceMonitorColumn_Name] = m_itemList[i].m_strVMName;
    1073         m_itemList[i].m_columnData[VMResourceMonitorColumn_CPUGuestLoad] =
     1072        m_itemList[i].m_columnData[VMActivityOverviewColumn_Name] = m_itemList[i].m_strVMName;
     1073        m_itemList[i].m_columnData[VMActivityOverviewColumn_CPUGuestLoad] =
    10741074            QString("%1%").arg(QString::number(m_itemList[i].m_uCPUGuestLoad));
    1075         m_itemList[i].m_columnData[VMResourceMonitorColumn_CPUVMMLoad] =
     1075        m_itemList[i].m_columnData[VMActivityOverviewColumn_CPUVMMLoad] =
    10761076            QString("%1%").arg(QString::number(m_itemList[i].m_uCPUVMMLoad));
    10771077
    10781078        if (m_itemList[i].isWithGuestAdditions())
    1079             m_itemList[i].m_columnData[VMResourceMonitorColumn_RAMUsedAndTotal] =
     1079            m_itemList[i].m_columnData[VMActivityOverviewColumn_RAMUsedAndTotal] =
    10801080                QString("%1/%2").arg(uiCommon().formatSize(_1K * m_itemList[i].m_uUsedRAM, iDecimalCount)).
    10811081                arg(uiCommon().formatSize(_1K * m_itemList[i].m_uTotalRAM, iDecimalCount));
    10821082        else
    1083             m_itemList[i].m_columnData[VMResourceMonitorColumn_RAMUsedAndTotal] = UIResourceMonitorWidget::tr("N/A");
     1083            m_itemList[i].m_columnData[VMActivityOverviewColumn_RAMUsedAndTotal] = UIVMActivityOverviewWidget::tr("N/A");
    10841084
    10851085        if (m_itemList[i].isWithGuestAdditions())
    1086             m_itemList[i].m_columnData[VMResourceMonitorColumn_RAMUsedPercentage] =
     1086            m_itemList[i].m_columnData[VMActivityOverviewColumn_RAMUsedPercentage] =
    10871087                QString("%1%").arg(QString::number(m_itemList[i].m_fRAMUsagePercentage, 'f', 2));
    10881088        else
    1089             m_itemList[i].m_columnData[VMResourceMonitorColumn_RAMUsedPercentage] = UIResourceMonitorWidget::tr("N/A");
    1090 
    1091         m_itemList[i].m_columnData[VMResourceMonitorColumn_NetworkUpRate] =
     1089            m_itemList[i].m_columnData[VMActivityOverviewColumn_RAMUsedPercentage] = UIVMActivityOverviewWidget::tr("N/A");
     1090
     1091        m_itemList[i].m_columnData[VMActivityOverviewColumn_NetworkUpRate] =
    10921092            QString("%1").arg(uiCommon().formatSize(m_itemList[i].m_uNetworkUpRate, iDecimalCount));
    10931093
    1094         m_itemList[i].m_columnData[VMResourceMonitorColumn_NetworkDownRate] =
     1094        m_itemList[i].m_columnData[VMActivityOverviewColumn_NetworkDownRate] =
    10951095            QString("%1").arg(uiCommon().formatSize(m_itemList[i].m_uNetworkDownRate, iDecimalCount));
    10961096
    1097         m_itemList[i].m_columnData[VMResourceMonitorColumn_NetworkUpTotal] =
     1097        m_itemList[i].m_columnData[VMActivityOverviewColumn_NetworkUpTotal] =
    10981098            QString("%1").arg(uiCommon().formatSize(m_itemList[i].m_uNetworkUpTotal, iDecimalCount));
    10991099
    1100         m_itemList[i].m_columnData[VMResourceMonitorColumn_NetworkDownTotal] =
     1100        m_itemList[i].m_columnData[VMActivityOverviewColumn_NetworkDownTotal] =
    11011101            QString("%1").arg(uiCommon().formatSize(m_itemList[i].m_uNetworkDownTotal, iDecimalCount));
    11021102
    1103         m_itemList[i].m_columnData[VMResourceMonitorColumn_DiskIOReadRate] =
     1103        m_itemList[i].m_columnData[VMActivityOverviewColumn_DiskIOReadRate] =
    11041104            QString("%1").arg(uiCommon().formatSize(m_itemList[i].m_uDiskReadRate, iDecimalCount));
    11051105
    1106         m_itemList[i].m_columnData[VMResourceMonitorColumn_DiskIOWriteRate] =
     1106        m_itemList[i].m_columnData[VMActivityOverviewColumn_DiskIOWriteRate] =
    11071107            QString("%1").arg(uiCommon().formatSize(m_itemList[i].m_uDiskWriteRate, iDecimalCount));
    11081108
    1109         m_itemList[i].m_columnData[VMResourceMonitorColumn_DiskIOReadTotal] =
     1109        m_itemList[i].m_columnData[VMActivityOverviewColumn_DiskIOReadTotal] =
    11101110            QString("%1").arg(uiCommon().formatSize(m_itemList[i].m_uDiskReadTotal, iDecimalCount));
    11111111
    1112         m_itemList[i].m_columnData[VMResourceMonitorColumn_DiskIOWriteTotal] =
     1112        m_itemList[i].m_columnData[VMActivityOverviewColumn_DiskIOWriteTotal] =
    11131113            QString("%1").arg(uiCommon().formatSize(m_itemList[i].m_uDiskWriteTotal, iDecimalCount));
    11141114
    1115         m_itemList[i].m_columnData[VMResourceMonitorColumn_VMExits] =
     1115        m_itemList[i].m_columnData[VMActivityOverviewColumn_VMExits] =
    11161116            QString("%1/%2").arg(UICommon::addMetricSuffixToNumber(m_itemList[i].m_uVMExitRate)).
    11171117            arg(UICommon::addMetricSuffixToNumber(m_itemList[i].m_uVMExitTotal));
    11181118    }
    11191119
    1120     for (int i = 0; i < (int)VMResourceMonitorColumn_Max; ++i)
     1120    for (int i = 0; i < (int)VMActivityOverviewColumn_Max; ++i)
    11211121    {
    11221122        for (int j = 0; j < m_itemList.size(); ++j)
     
    11281128}
    11291129
    1130 void UIResourceMonitorModel::setupPerformanceCollector()
     1130void UIActivityOverviewModel::setupPerformanceCollector()
    11311131{
    11321132    m_nameList.clear();
     
    11461146}
    11471147
    1148 void UIResourceMonitorModel::queryPerformanceCollector()
     1148void UIActivityOverviewModel::queryPerformanceCollector()
    11491149{
    11501150    QVector<QString>  aReturnNames;
     
    12331233}
    12341234
    1235 void UIResourceMonitorModel::addItem(const QUuid& uMachineId, const QString& strMachineName)
    1236 {
    1237     m_itemList.append(UIResourceMonitorItem(uMachineId, strMachineName));
    1238 }
    1239 
    1240 void UIResourceMonitorModel::removeItem(const QUuid& uMachineId)
     1235void UIActivityOverviewModel::addItem(const QUuid& uMachineId, const QString& strMachineName)
     1236{
     1237    m_itemList.append(UIActivityOverviewItem(uMachineId, strMachineName));
     1238}
     1239
     1240void UIActivityOverviewModel::removeItem(const QUuid& uMachineId)
    12411241{
    12421242    int iIndex = itemIndex(uMachineId);
     
    12461246}
    12471247
    1248 void UIResourceMonitorModel::setColumnVisible(const QMap<int, bool>& columnVisible)
     1248void UIActivityOverviewModel::setColumnVisible(const QMap<int, bool>& columnVisible)
    12491249{
    12501250    m_columnVisible = columnVisible;
    12511251}
    12521252
    1253 bool UIResourceMonitorModel::columnVisible(int iColumnId) const
     1253bool UIActivityOverviewModel::columnVisible(int iColumnId) const
    12541254{
    12551255    return m_columnVisible.value(iColumnId, true);
     
    12581258
    12591259/*********************************************************************************************************************************
    1260 *   Class UIResourceMonitorWidget implementation.                                                                                *
     1260*   Class UIVMActivityOverviewWidget implementation.                                                                                *
    12611261*********************************************************************************************************************************/
    12621262
    1263 UIResourceMonitorWidget::UIResourceMonitorWidget(EmbedTo enmEmbedding, UIActionPool *pActionPool,
     1263UIVMActivityOverviewWidget::UIVMActivityOverviewWidget(EmbedTo enmEmbedding, UIActionPool *pActionPool,
    12641264                                                 bool fShowToolbar /* = true */, QWidget *pParent /* = 0 */)
    12651265    : QIWithRetranslateUI<QWidget>(pParent)
     
    12801280}
    12811281
    1282 UIResourceMonitorWidget::~UIResourceMonitorWidget()
     1282UIVMActivityOverviewWidget::~UIVMActivityOverviewWidget()
    12831283{
    12841284    saveSettings();
    12851285}
    12861286
    1287 QMenu *UIResourceMonitorWidget::menu() const
     1287QMenu *UIVMActivityOverviewWidget::menu() const
    12881288{
    12891289    return NULL;
    12901290}
    12911291
    1292 QMenu *UIResourceMonitorWidget::columnVisiblityToggleMenu() const
     1292QMenu *UIVMActivityOverviewWidget::columnVisiblityToggleMenu() const
    12931293{
    12941294    return m_pColumnVisibilityToggleMenu;
    12951295}
    12961296
    1297 bool UIResourceMonitorWidget::isCurrentTool() const
     1297bool UIVMActivityOverviewWidget::isCurrentTool() const
    12981298{
    12991299    return m_fIsCurrentTool;
    13001300}
    13011301
    1302 void UIResourceMonitorWidget::setIsCurrentTool(bool fIsCurrentTool)
     1302void UIVMActivityOverviewWidget::setIsCurrentTool(bool fIsCurrentTool)
    13031303{
    13041304    m_fIsCurrentTool = fIsCurrentTool;
     
    13071307}
    13081308
    1309 void UIResourceMonitorWidget::retranslateUi()
    1310 {
    1311     m_columnTitles[VMResourceMonitorColumn_Name] = UIResourceMonitorWidget::tr("VM Name");
    1312     m_columnTitles[VMResourceMonitorColumn_CPUGuestLoad] = UIResourceMonitorWidget::tr("CPU Guest");
    1313     m_columnTitles[VMResourceMonitorColumn_CPUVMMLoad] = UIResourceMonitorWidget::tr("CPU VMM");
    1314     m_columnTitles[VMResourceMonitorColumn_RAMUsedAndTotal] = UIResourceMonitorWidget::tr("RAM Used/Total");
    1315     m_columnTitles[VMResourceMonitorColumn_RAMUsedPercentage] = UIResourceMonitorWidget::tr("RAM %");
    1316     m_columnTitles[VMResourceMonitorColumn_NetworkUpRate] = UIResourceMonitorWidget::tr("Network Up Rate");
    1317     m_columnTitles[VMResourceMonitorColumn_NetworkDownRate] = UIResourceMonitorWidget::tr("Network Down Rate");
    1318     m_columnTitles[VMResourceMonitorColumn_NetworkUpTotal] = UIResourceMonitorWidget::tr("Network Up Total");
    1319     m_columnTitles[VMResourceMonitorColumn_NetworkDownTotal] = UIResourceMonitorWidget::tr("Network Down Total");
    1320     m_columnTitles[VMResourceMonitorColumn_DiskIOReadRate] = UIResourceMonitorWidget::tr("Disk Read Rate");
    1321     m_columnTitles[VMResourceMonitorColumn_DiskIOWriteRate] = UIResourceMonitorWidget::tr("Disk Write Rate");
    1322     m_columnTitles[VMResourceMonitorColumn_DiskIOReadTotal] = UIResourceMonitorWidget::tr("Disk Read Total");
    1323     m_columnTitles[VMResourceMonitorColumn_DiskIOWriteTotal] = UIResourceMonitorWidget::tr("Disk Write Total");
    1324     m_columnTitles[VMResourceMonitorColumn_VMExits] = UIResourceMonitorWidget::tr("VM Exits");
     1309void UIVMActivityOverviewWidget::retranslateUi()
     1310{
     1311    m_columnTitles[VMActivityOverviewColumn_Name] = UIVMActivityOverviewWidget::tr("VM Name");
     1312    m_columnTitles[VMActivityOverviewColumn_CPUGuestLoad] = UIVMActivityOverviewWidget::tr("CPU Guest");
     1313    m_columnTitles[VMActivityOverviewColumn_CPUVMMLoad] = UIVMActivityOverviewWidget::tr("CPU VMM");
     1314    m_columnTitles[VMActivityOverviewColumn_RAMUsedAndTotal] = UIVMActivityOverviewWidget::tr("RAM Used/Total");
     1315    m_columnTitles[VMActivityOverviewColumn_RAMUsedPercentage] = UIVMActivityOverviewWidget::tr("RAM %");
     1316    m_columnTitles[VMActivityOverviewColumn_NetworkUpRate] = UIVMActivityOverviewWidget::tr("Network Up Rate");
     1317    m_columnTitles[VMActivityOverviewColumn_NetworkDownRate] = UIVMActivityOverviewWidget::tr("Network Down Rate");
     1318    m_columnTitles[VMActivityOverviewColumn_NetworkUpTotal] = UIVMActivityOverviewWidget::tr("Network Up Total");
     1319    m_columnTitles[VMActivityOverviewColumn_NetworkDownTotal] = UIVMActivityOverviewWidget::tr("Network Down Total");
     1320    m_columnTitles[VMActivityOverviewColumn_DiskIOReadRate] = UIVMActivityOverviewWidget::tr("Disk Read Rate");
     1321    m_columnTitles[VMActivityOverviewColumn_DiskIOWriteRate] = UIVMActivityOverviewWidget::tr("Disk Write Rate");
     1322    m_columnTitles[VMActivityOverviewColumn_DiskIOReadTotal] = UIVMActivityOverviewWidget::tr("Disk Read Total");
     1323    m_columnTitles[VMActivityOverviewColumn_DiskIOWriteTotal] = UIVMActivityOverviewWidget::tr("Disk Write Total");
     1324    m_columnTitles[VMActivityOverviewColumn_VMExits] = UIVMActivityOverviewWidget::tr("VM Exits");
    13251325
    13261326    updateColumnsMenu();
     
    13321332}
    13331333
    1334 void UIResourceMonitorWidget::showEvent(QShowEvent *pEvent)
     1334void UIVMActivityOverviewWidget::showEvent(QShowEvent *pEvent)
    13351335{
    13361336    if (m_pVMActivityMonitorAction && m_pTableView)
     
    13401340}
    13411341
    1342 void UIResourceMonitorWidget::prepare()
     1342void UIVMActivityOverviewWidget::prepare()
    13431343{
    13441344    /* Try to guest the sort indicator's width: */
     
    13611361}
    13621362
    1363 void UIResourceMonitorWidget::prepareWidgets()
     1363void UIVMActivityOverviewWidget::prepareWidgets()
    13641364{
    13651365    /* Create main-layout: */
     
    13781378        prepareToolBar();
    13791379
    1380     m_pHostStatsWidget = new UIVMResourceMonitorHostStatsWidget;
     1380    m_pHostStatsWidget = new UIVMActivityOverviewHostStatsWidget;
    13811381    if (m_pHostStatsWidget)
    13821382        layout()->addWidget(m_pHostStatsWidget);
    13831383
    1384     m_pModel = new UIResourceMonitorModel(this);
    1385     m_pProxyModel = new UIResourceMonitorProxyModel(this);
    1386 
    1387     m_pTableView = new UIVMResourceMonitorTableView();
     1384    m_pModel = new UIActivityOverviewModel(this);
     1385    m_pProxyModel = new UIActivityOverviewProxyModel(this);
     1386
     1387    m_pTableView = new UIVMActivityOverviewTableView();
    13881388    if (m_pTableView && m_pModel && m_pProxyModel)
    13891389    {
     
    13911391        m_pProxyModel->setSourceModel(m_pModel);
    13921392        m_pTableView->setModel(m_pProxyModel);
    1393         m_pTableView->setItemDelegate(new UIVMResourceMonitorDelegate);
     1393        m_pTableView->setItemDelegate(new UIVMActivityOverviewDelegate);
    13941394        m_pTableView->setSelectionMode(QAbstractItemView::SingleSelection);
    13951395        m_pTableView->setSelectionBehavior(QAbstractItemView::SelectRows);
     
    14051405        m_pTableView->setSortingEnabled(true);
    14061406        m_pTableView->sortByColumn(0, Qt::AscendingOrder);
    1407         connect(m_pModel, &UIResourceMonitorModel::sigDataUpdate,
    1408                 this, &UIResourceMonitorWidget::sltHandleDataUpdate);
    1409         connect(m_pModel, &UIResourceMonitorModel::sigHostStatsUpdate,
    1410                 this, &UIResourceMonitorWidget::sltHandleHostStatsUpdate);
    1411         connect(m_pTableView, &UIVMResourceMonitorTableView::customContextMenuRequested,
    1412                 this, &UIResourceMonitorWidget::sltHandleTableContextMenuRequest);
    1413         connect(m_pTableView, &UIVMResourceMonitorTableView::sigSelectionChanged,
    1414                 this, &UIResourceMonitorWidget::sltHandleTableSelectionChanged);
     1407        connect(m_pModel, &UIActivityOverviewModel::sigDataUpdate,
     1408                this, &UIVMActivityOverviewWidget::sltHandleDataUpdate);
     1409        connect(m_pModel, &UIActivityOverviewModel::sigHostStatsUpdate,
     1410                this, &UIVMActivityOverviewWidget::sltHandleHostStatsUpdate);
     1411        connect(m_pTableView, &UIVMActivityOverviewTableView::customContextMenuRequested,
     1412                this, &UIVMActivityOverviewWidget::sltHandleTableContextMenuRequest);
     1413        connect(m_pTableView, &UIVMActivityOverviewTableView::sigSelectionChanged,
     1414                this, &UIVMActivityOverviewWidget::sltHandleTableSelectionChanged);
    14151415        updateModelColumVisibilityCache();
    14161416    }
    14171417}
    14181418
    1419 void UIResourceMonitorWidget::updateColumnsMenu()
    1420 {
    1421     UIMenu *pMenu = m_pActionPool->action(UIActionIndexMN_M_VMResourceMonitor_M_Columns)->menu();
     1419void UIVMActivityOverviewWidget::updateColumnsMenu()
     1420{
     1421    UIMenu *pMenu = m_pActionPool->action(UIActionIndexMN_M_VMActivityOverview_M_Columns)->menu();
    14221422    if (!pMenu)
    14231423        return;
    14241424    pMenu->clear();
    1425     for (int i = 0; i < VMResourceMonitorColumn_Max; ++i)
     1425    for (int i = 0; i < VMActivityOverviewColumn_Max; ++i)
    14261426    {
    14271427        QAction *pAction = pMenu->addAction(m_columnTitles[i]);
    14281428        pAction->setCheckable(true);
    1429         if (i == (int)VMResourceMonitorColumn_Name)
     1429        if (i == (int)VMActivityOverviewColumn_Name)
    14301430            pAction->setEnabled(false);
    14311431        pAction->setData(i);
    14321432        pAction->setChecked(columnVisible(i));
    1433         connect(pAction, &QAction::toggled, this, &UIResourceMonitorWidget::sltHandleColumnAction);
    1434     }
    1435 }
    1436 
    1437 void UIResourceMonitorWidget::prepareActions()
     1433        connect(pAction, &QAction::toggled, this, &UIVMActivityOverviewWidget::sltHandleColumnAction);
     1434    }
     1435}
     1436
     1437void UIVMActivityOverviewWidget::prepareActions()
    14381438{
    14391439    updateColumnsMenu();
    14401440    m_pVMActivityMonitorAction =
    1441         m_pActionPool->action(UIActionIndexMN_M_VMResourceMonitor_S_SwitchToMachinePerformance);
     1441        m_pActionPool->action(UIActionIndexMN_M_VMActivityOverview_S_SwitchToMachinePerformance);
    14421442
    14431443    if (m_pVMActivityMonitorAction)
    1444         connect(m_pVMActivityMonitorAction, &QAction::triggered, this, &UIResourceMonitorWidget::sltHandleShowVMActivityMonitor);
    1445 }
    1446 
    1447 void UIResourceMonitorWidget::prepareToolBar()
     1444        connect(m_pVMActivityMonitorAction, &QAction::triggered, this, &UIVMActivityOverviewWidget::sltHandleShowVMActivityMonitor);
     1445}
     1446
     1447void UIVMActivityOverviewWidget::prepareToolBar()
    14481448{
    14491449    /* Create toolbar: */
     
    14701470}
    14711471
    1472 void UIResourceMonitorWidget::loadSettings()
    1473 {
    1474 }
    1475 
    1476 void UIResourceMonitorWidget::loadHiddenColumnList()
    1477 {
    1478     QStringList hiddenColumnList = gEDataManager->VMResourceMonitorHiddenColumnList();
    1479     for (int i = (int)VMResourceMonitorColumn_Name; i < (int)VMResourceMonitorColumn_Max; ++i)
     1472void UIVMActivityOverviewWidget::loadSettings()
     1473{
     1474}
     1475
     1476void UIVMActivityOverviewWidget::loadHiddenColumnList()
     1477{
     1478    QStringList hiddenColumnList = gEDataManager->VMActivityOverviewHiddenColumnList();
     1479    for (int i = (int)VMActivityOverviewColumn_Name; i < (int)VMActivityOverviewColumn_Max; ++i)
    14801480        m_columnVisible[i] = true;
    14811481    foreach(const QString& strColumn, hiddenColumnList)
    1482         setColumnVisible((int)gpConverter->fromInternalString<VMResourceMonitorColumn>(strColumn), false);
    1483 }
    1484 
    1485 void UIResourceMonitorWidget::saveSettings()
     1482        setColumnVisible((int)gpConverter->fromInternalString<VMActivityOverviewColumn>(strColumn), false);
     1483}
     1484
     1485void UIVMActivityOverviewWidget::saveSettings()
    14861486{
    14871487    QStringList hiddenColumnList;
     
    14891489    {
    14901490        if (!columnVisible(i))
    1491             hiddenColumnList << gpConverter->toInternalString((VMResourceMonitorColumn) i);
    1492     }
    1493     gEDataManager->setVMResourceMonitorHiddenColumnList(hiddenColumnList);
    1494 }
    1495 
    1496 void UIResourceMonitorWidget::sltToggleColumnSelectionMenu(bool fChecked)
     1491            hiddenColumnList << gpConverter->toInternalString((VMActivityOverviewColumn) i);
     1492    }
     1493    gEDataManager->setVMActivityOverviewHiddenColumnList(hiddenColumnList);
     1494}
     1495
     1496void UIVMActivityOverviewWidget::sltToggleColumnSelectionMenu(bool fChecked)
    14971497{
    14981498    (void)fChecked;
     
    15021502}
    15031503
    1504 void UIResourceMonitorWidget::sltHandleColumnAction(bool fChecked)
     1504void UIVMActivityOverviewWidget::sltHandleColumnAction(bool fChecked)
    15051505{
    15061506    QAction* pSender = qobject_cast<QAction*>(sender());
     
    15101510}
    15111511
    1512 void UIResourceMonitorWidget::sltHandleHostStatsUpdate(const UIVMResourceMonitorHostStats &stats)
     1512void UIVMActivityOverviewWidget::sltHandleHostStatsUpdate(const UIVMActivityOverviewHostStats &stats)
    15131513{
    15141514    if (m_pHostStatsWidget)
     
    15161516}
    15171517
    1518 void UIResourceMonitorWidget::sltHandleDataUpdate()
     1518void UIVMActivityOverviewWidget::sltHandleDataUpdate()
    15191519{
    15201520    computeMinimumColumnWidths();
     
    15231523}
    15241524
    1525 void UIResourceMonitorWidget::sltHandleTableContextMenuRequest(const QPoint &pos)
     1525void UIVMActivityOverviewWidget::sltHandleTableContextMenuRequest(const QPoint &pos)
    15261526{
    15271527    if (!m_pTableView || !m_pTableView->hasSelection())
     
    15351535}
    15361536
    1537 void UIResourceMonitorWidget::sltHandleTableSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
     1537void UIVMActivityOverviewWidget::sltHandleTableSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
    15381538{
    15391539    Q_UNUSED(deselected);
     
    15421542}
    15431543
    1544 void UIResourceMonitorWidget::sltHandleShowVMActivityMonitor()
     1544void UIVMActivityOverviewWidget::sltHandleShowVMActivityMonitor()
    15451545{
    15461546    if (!m_pTableView || !m_pModel)
     
    15521552}
    15531553
    1554 void UIResourceMonitorWidget::setColumnVisible(int iColumnId, bool fVisible)
     1554void UIVMActivityOverviewWidget::setColumnVisible(int iColumnId, bool fVisible)
    15551555{
    15561556    if (m_columnVisible.contains(iColumnId) && m_columnVisible[iColumnId] == fVisible)
     
    15601560}
    15611561
    1562 void UIResourceMonitorWidget::updateModelColumVisibilityCache()
     1562void UIVMActivityOverviewWidget::updateModelColumVisibilityCache()
    15631563{
    15641564    if (m_pModel)
     
    15691569}
    15701570
    1571 void UIResourceMonitorWidget::computeMinimumColumnWidths()
     1571void UIVMActivityOverviewWidget::computeMinimumColumnWidths()
    15721572{
    15731573    if (!m_pTableView || !m_pModel)
     
    15761576    const QMap<int, int> &columnDataStringLengths = m_pModel->dataLengths();
    15771577    QMap<int, int> columnWidthsInPixels;
    1578     for (int i = 0; i < (int)VMResourceMonitorColumn_Max; ++i)
     1578    for (int i = 0; i < (int)VMActivityOverviewColumn_Max; ++i)
    15791579    {
    15801580        int iColumnStringWidth = columnDataStringLengths.value(i, 0);
     
    15891589}
    15901590
    1591 bool UIResourceMonitorWidget::columnVisible(int iColumnId) const
     1591bool UIVMActivityOverviewWidget::columnVisible(int iColumnId) const
    15921592{
    15931593    return m_columnVisible.value(iColumnId, true);
     
    16111611
    16121612/*********************************************************************************************************************************
    1613 *   Class UIResourceMonitor implementation.                                                                                      *
     1613*   Class UIActivityOverview implementation.                                                                                      *
    16141614*********************************************************************************************************************************/
    16151615
     
    16221622void UIVMActivityOverviewDialog::retranslateUi()
    16231623{
    1624     setWindowTitle(UIResourceMonitorWidget::tr("VM Resource Monitor"));
     1624    setWindowTitle(UIVMActivityOverviewWidget::tr("VM Resource Monitor"));
    16251625}
    16261626
     
    16331633void UIVMActivityOverviewDialog::configureCentralWidget()
    16341634{
    1635     UIResourceMonitorWidget *pWidget = new UIResourceMonitorWidget(EmbedTo_Dialog, m_pActionPool, true, this);
     1635    UIVMActivityOverviewWidget *pWidget = new UIVMActivityOverviewWidget(EmbedTo_Dialog, m_pActionPool, true, this);
    16361636    AssertPtrReturnVoid(pWidget);
    16371637    {
     
    16541654}
    16551655
    1656 UIResourceMonitorWidget *UIVMActivityOverviewDialog::widget()
    1657 {
    1658     return qobject_cast<UIResourceMonitorWidget*>(QIManagerDialog::widget());
     1656UIVMActivityOverviewWidget *UIVMActivityOverviewDialog::widget()
     1657{
     1658    return qobject_cast<UIVMActivityOverviewWidget*>(QIManagerDialog::widget());
    16591659}
    16601660
  • trunk/src/VBox/Frontends/VirtualBox/src/monitor/resource/UIResourceMonitor.h

    r88081 r88082  
    3939class UIActionPool;
    4040class QIToolBar;
    41 class UIResourceMonitorProxyModel;
    42 class UIResourceMonitorModel;
    43 class UIVMResourceMonitorHostStats;
    44 class UIVMResourceMonitorHostStatsWidget;
    45 class UIVMResourceMonitorTableView;
     41class UIActivityOverviewProxyModel;
     42class UIActivityOverviewModel;
     43class UIVMActivityOverviewHostStats;
     44class UIVMActivityOverviewHostStatsWidget;
     45class UIVMActivityOverviewTableView;
    4646
    4747/** QWidget extension to display a Linux top like utility that sort running vm wrt. resource allocations. */
    48 class UIResourceMonitorWidget : public QIWithRetranslateUI<QWidget>
     48class UIVMActivityOverviewWidget : public QIWithRetranslateUI<QWidget>
    4949{
    5050    Q_OBJECT;
     
    5656public:
    5757
    58     UIResourceMonitorWidget(EmbedTo enmEmbedding, UIActionPool *pActionPool,
     58    UIVMActivityOverviewWidget(EmbedTo enmEmbedding, UIActionPool *pActionPool,
    5959                               bool fShowToolbar = true, QWidget *pParent = 0);
    60     ~UIResourceMonitorWidget();
     60    ~UIVMActivityOverviewWidget();
    6161    QMenu *columnVisiblityToggleMenu() const;
    6262    QMenu *menu() const;
     
    8282    void sltToggleColumnSelectionMenu(bool fChecked);
    8383    void sltHandleColumnAction(bool fChecked);
    84     void sltHandleHostStatsUpdate(const UIVMResourceMonitorHostStats &stats);
     84    void sltHandleHostStatsUpdate(const UIVMActivityOverviewHostStats &stats);
    8585    void sltHandleTableContextMenuRequest(const QPoint &pos);
    8686    void sltHandleShowVMActivityMonitor();
     
    117117      * @{ */
    118118        QIToolBar *m_pToolBar;
    119         UIVMResourceMonitorTableView       *m_pTableView;
    120         UIResourceMonitorProxyModel        *m_pProxyModel;
    121         UIResourceMonitorModel             *m_pModel;
     119        UIVMActivityOverviewTableView       *m_pTableView;
     120        UIActivityOverviewProxyModel        *m_pProxyModel;
     121        UIActivityOverviewModel             *m_pModel;
    122122        QMenu                              *m_pColumnVisibilityToggleMenu;
    123         /* The key is the column id (VMResourceMonitorColumn) and value is column title. */
     123        /* The key is the column id (VMActivityOverviewColumn) and value is column title. */
    124124        QMap<int, QString>                  m_columnTitles;
    125         /* The key is the column id (VMResourceMonitorColumn) and value is true if the column is visible. */
     125        /* The key is the column id (VMActivityOverviewColumn) and value is true if the column is visible. */
    126126        QMap<int, bool>                     m_columnVisible;
    127         UIVMResourceMonitorHostStatsWidget *m_pHostStatsWidget;
     127        UIVMActivityOverviewHostStatsWidget *m_pHostStatsWidget;
    128128        QAction                            *m_pVMActivityMonitorAction;
    129129    /** @} */
     
    165165    /** @name Widget stuff.
    166166      * @{ */
    167         virtual UIResourceMonitorWidget *widget() /* override */;
     167        virtual UIVMActivityOverviewWidget *widget() /* override */;
    168168    /** @} */
    169169
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