Changeset 88074 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Mar 10, 2021 6:14:34 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp
r88071 r88074 1512 1512 switch (enmToolType) 1513 1513 { 1514 case UIToolType_Welcome: strResult = "Welcome"; break;1515 case UIToolType_Extensions: strResult = "Extensions"; break;1516 case UIToolType_Media: strResult = "Media"; break;1517 case UIToolType_Network: strResult = "Network"; break;1518 case UIToolType_Cloud: strResult = "Cloud"; break;1519 case UIToolType_CloudConsole: strResult = "CloudConsole"; break;1520 case UIToolType_ Resources: strResult = "Resources"; break;1521 case UIToolType_Details: strResult = "Details"; break;1522 case UIToolType_Snapshots: strResult = "Snapshots"; break;1523 case UIToolType_Logs: strResult = "Logs"; break;1524 case UIToolType_VMActivity: strResult = "Performance"; break;1514 case UIToolType_Welcome: strResult = "Welcome"; break; 1515 case UIToolType_Extensions: strResult = "Extensions"; break; 1516 case UIToolType_Media: strResult = "Media"; break; 1517 case UIToolType_Network: strResult = "Network"; break; 1518 case UIToolType_Cloud: strResult = "Cloud"; break; 1519 case UIToolType_CloudConsole: strResult = "CloudConsole"; break; 1520 case UIToolType_VMActivityOverview: strResult = "Activities"; break; 1521 case UIToolType_Details: strResult = "Details"; break; 1522 case UIToolType_Snapshots: strResult = "Snapshots"; break; 1523 case UIToolType_Logs: strResult = "Logs"; break; 1524 case UIToolType_VMActivity: strResult = "Performance"; break; 1525 1525 default: 1526 1526 { … … 1538 1538 * to search through the keys using 'case-insensitive' rule: */ 1539 1539 QStringList keys; QList<UIToolType> values; 1540 keys << "Welcome"; values << UIToolType_Welcome;1541 keys << "Extensions"; values << UIToolType_Extensions;1542 keys << "Media"; values << UIToolType_Media;1543 keys << "Network"; values << UIToolType_Network;1544 keys << "Cloud"; values << UIToolType_Cloud;1545 keys << "CloudConsole"; values << UIToolType_CloudConsole;1546 keys << " Resources"; values << UIToolType_Resources;1547 keys << "Details"; values << UIToolType_Details;1548 keys << "Snapshots"; values << UIToolType_Snapshots;1549 keys << "Logs"; values << UIToolType_Logs;1550 keys << "Performance"; values << UIToolType_VMActivity;1540 keys << "Welcome"; values << UIToolType_Welcome; 1541 keys << "Extensions"; values << UIToolType_Extensions; 1542 keys << "Media"; values << UIToolType_Media; 1543 keys << "Network"; values << UIToolType_Network; 1544 keys << "Cloud"; values << UIToolType_Cloud; 1545 keys << "CloudConsole"; values << UIToolType_CloudConsole; 1546 keys << "Activities"; values << UIToolType_VMActivityOverview; 1547 keys << "Details"; values << UIToolType_Details; 1548 keys << "Snapshots"; values << UIToolType_Snapshots; 1549 keys << "Logs"; values << UIToolType_Logs; 1550 keys << "Performance"; values << UIToolType_VMActivity; 1551 1551 /* Invalid type for unknown words: */ 1552 1552 if (!keys.contains(strToolType, Qt::CaseInsensitive)) -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp
r88071 r88074 271 271 case UIToolType_Cloud: 272 272 case UIToolType_CloudConsole: 273 case UIToolType_ Resources:273 case UIToolType_VMActivityOverview: 274 274 return true; 275 275 default: -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
r88071 r88074 897 897 UIToolType_Cloud, 898 898 UIToolType_CloudConsole, 899 UIToolType_ Resources,899 UIToolType_VMActivityOverview, 900 900 /* Machine types: */ 901 901 UIToolType_Error, -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
r88071 r88074 2264 2264 }; 2265 2265 2266 /** Simple action extension, used as 'To Resources' action class. */2267 class UIActionMenuSelectorPerformanceTo Resources: public UIActionSimple2268 { 2269 Q_OBJECT; 2270 2271 public: 2272 2273 /** Constructs action passing @a pParent to the base-class. */ 2274 UIActionMenuSelectorPerformanceTo Resources(UIActionPool *pParent)2266 /** Simple action extension, used as 'To VM Activity Oveview' action class. */ 2267 class UIActionMenuSelectorPerformanceToVMActivityOverview : public UIActionSimple 2268 { 2269 Q_OBJECT; 2270 2271 public: 2272 2273 /** Constructs action passing @a pParent to the base-class. */ 2274 UIActionMenuSelectorPerformanceToVMActivityOverview(UIActionPool *pParent) 2275 2275 : UIActionSimple(pParent, 2276 2276 ":/resources_monitor_24px.png", ":/resource_monitor_16px.png", … … 2285 2285 virtual QString shortcutExtraDataID() const /* override */ 2286 2286 { 2287 return QString("To Resources");2288 } 2289 2290 /** Handles translation event. */ 2291 virtual void retranslateUi() /* override */ 2292 { 2293 setName(QApplication::translate("UIActionPool", "& To Resurces..."));2294 setShortcutScope(QApplication::translate("UIActionPool", " PerformanceMonitor"));2295 setStatusTip(QApplication::translate("UIActionPool", "Navigate to the resourceswidget"));2296 setToolTip( QApplication::translate("UIActionPool", "Navigate to ResourcesWidget")2287 return QString("ToVMActivityOverview"); 2288 } 2289 2290 /** Handles translation event. */ 2291 virtual void retranslateUi() /* override */ 2292 { 2293 setName(QApplication::translate("UIActionPool", "&Activity Overview...")); 2294 setShortcutScope(QApplication::translate("UIActionPool", "Activity Monitor")); 2295 setStatusTip(QApplication::translate("UIActionPool", "Navigate to the vm activity overview widget")); 2296 setToolTip( QApplication::translate("UIActionPool", "Navigate to the VM Activity Overview Widget") 2297 2297 + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString()))); 2298 2298 } … … 2544 2544 m_pool[UIActionIndex_M_Performance] = new UIActionMenuSelectorPerformance(this); 2545 2545 m_pool[UIActionIndex_M_Performance_S_Export] = new UIActionMenuSelectorPerformancePerformExport(this); 2546 m_pool[UIActionIndex_M_Performance_S_To Resources] = new UIActionMenuSelectorPerformanceToResources(this);2546 m_pool[UIActionIndex_M_Performance_S_ToVMActivityOverview] = new UIActionMenuSelectorPerformanceToVMActivityOverview(this); 2547 2547 2548 2548 /* Create 'File Manager' actions: */ … … 2975 2975 /* 'Export' action: */ 2976 2976 pMenu->addAction(action(UIActionIndex_M_Performance_S_Export)); 2977 pMenu->addAction(action(UIActionIndex_M_Performance_S_To Resources));2977 pMenu->addAction(action(UIActionIndex_M_Performance_S_ToVMActivityOverview)); 2978 2978 2979 2979 /* Mark menu as valid: */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h
r88071 r88074 101 101 UIActionIndex_M_Performance, 102 102 UIActionIndex_M_Performance_S_Export, 103 UIActionIndex_M_Performance_S_To Resources,103 UIActionIndex_M_Performance_S_ToVMActivityOverview, 104 104 105 105 /* File Manager actions: */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolManager.cpp
r88071 r88074 365 365 : UIActionToggle(pParent) 366 366 { 367 setProperty("UIToolType", QVariant::fromValue(UIToolType_ Resources));367 setProperty("UIToolType", QVariant::fromValue(UIToolType_VMActivityOverview)); 368 368 /// @todo use icons with check-boxes 369 369 setIcon(UIIconPool::iconSetFull(":/resources_monitor_24px.png", ":/resources_monitor_16px.png", … … 3473 3473 virtual void retranslateUi() /* override */ 3474 3474 { 3475 setName(QApplication::translate("UIActionPool", " To Performance"));3475 setName(QApplication::translate("UIActionPool", "VM Activity")); 3476 3476 setShortcutScope(QApplication::translate("UIActionPool", "Resource Monitor")); 3477 setStatusTip(QApplication::translate("UIActionPool", "Switch to selected machine's performancepane"));3478 setToolTip( QApplication::translate("UIActionPool", "Switch to selected machine's performancepane")3477 setStatusTip(QApplication::translate("UIActionPool", "Switch to selected virtual machine's activity monitor pane")); 3478 setToolTip( QApplication::translate("UIActionPool", "Switch to selected virtual machine's activity monitor pane") 3479 3479 + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString()))); 3480 3480 } -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneGlobal.cpp
r87354 r88074 203 203 break; 204 204 } 205 case UIToolType_ Resources:205 case UIToolType_VMActivityOverview: 206 206 { 207 207 /* Create VM Resource Monitor: */ … … 215 215 216 216 /* Configure pane: */ 217 m_pPaneResourceMonitor->setProperty("ToolType", QVariant::fromValue(UIToolType_ Resources));217 m_pPaneResourceMonitor->setProperty("ToolType", QVariant::fromValue(UIToolType_VMActivityOverview)); 218 218 connect(m_pPaneResourceMonitor, &UIResourceMonitorWidget::sigSwitchToMachinePerformancePane, 219 219 this, &UIToolPaneGlobal::sigSwitchToMachinePerformancePane); … … 287 287 pCurrentToolWidget = m_pPaneCloud; 288 288 break; 289 case UIToolType_ Resources:289 case UIToolType_VMActivityOverview: 290 290 pCurrentToolWidget = m_pPaneResourceMonitor; 291 291 break; … … 320 320 /* Determine whether resource monitor is currently active tool: */ 321 321 if (m_pPaneResourceMonitor) 322 m_pPaneResourceMonitor->setIsCurrentTool(m_fActive && currentTool() == UIToolType_ Resources);323 } 322 m_pPaneResourceMonitor->setIsCurrentTool(m_fActive && currentTool() == UIToolType_VMActivityOverview); 323 } -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r88071 r88074 3111 3111 actionPool()->action(UIActionIndexMN_M_Cloud)->setVisible(fCloudMenuShown); 3112 3112 /* Determine whether Resources menu should be visible: */ 3113 const bool fResourcesMenuShown = fGlobalMenuShown && m_pWidget->currentGlobalTool() == UIToolType_ Resources;3113 const bool fResourcesMenuShown = fGlobalMenuShown && m_pWidget->currentGlobalTool() == UIToolType_VMActivityOverview; 3114 3114 actionPool()->action(UIActionIndexMN_M_VMResourceMonitor)->setVisible(fResourcesMenuShown); 3115 3115 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
r88071 r88074 518 518 AssertPtrReturnVoid(m_pPaneChooser); 519 519 AssertPtrReturnVoid(m_pPaneTools); 520 m_pPaneTools->setToolsType(UIToolType_ Resources);520 m_pPaneTools->setToolsType(UIToolType_VMActivityOverview); 521 521 m_pPaneChooser->setCurrentGlobal(); 522 522 } … … 841 841 break; 842 842 } 843 case UIToolType_ Resources:843 case UIToolType_VMActivityOverview: 844 844 { 845 845 m_pToolBar->addAction(actionPool()->action(UIActionIndexMN_M_VMResourceMonitor_M_Columns)); … … 923 923 { 924 924 m_pToolBar->addAction(actionPool()->action(UIActionIndex_M_Performance_S_Export)); 925 m_pToolBar->addAction(actionPool()->action(UIActionIndex_M_Performance_S_To Resources));925 m_pToolBar->addAction(actionPool()->action(UIActionIndex_M_Performance_S_ToVMActivityOverview)); 926 926 m_pToolBar->addSeparator(); 927 927 m_pToolBar->addAction(actionPool()->action(UIActionIndexMN_M_Machine_S_Settings)); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsModel.cpp
r88071 r88074 248 248 actions[UIToolType_Network] = actionPool()->action(UIActionIndexMN_M_File_M_Tools_T_NetworkManager); 249 249 actions[UIToolType_Cloud] = actionPool()->action(UIActionIndexMN_M_File_M_Tools_T_CloudProfileManager); 250 actions[UIToolType_ Resources] = actionPool()->action(UIActionIndexMN_M_File_M_Tools_T_VMResourceMonitor);250 actions[UIToolType_VMActivityOverview] = actionPool()->action(UIActionIndexMN_M_File_M_Tools_T_VMResourceMonitor); 251 251 if (actions.contains(enmType)) 252 252 actions.value(enmType)->setChecked(true); … … 457 457 case UIToolType_Network: pItem->reconfigure(tr("Network")); break; 458 458 case UIToolType_Cloud: pItem->reconfigure(tr("Cloud")); break; 459 case UIToolType_ Resources: pItem->reconfigure(tr("Resources")); break;459 case UIToolType_VMActivityOverview: pItem->reconfigure(tr("Activities")); break; 460 460 case UIToolType_Details: pItem->reconfigure(tr("Details")); break; 461 461 case UIToolType_Snapshots: pItem->reconfigure(tr("Snapshots")); break; … … 520 520 521 521 /* Resources: */ 522 m_items << new UIToolsItem(scene(), UIToolClass_Global, UIToolType_ Resources, QString(),522 m_items << new UIToolsItem(scene(), UIToolClass_Global, UIToolType_VMActivityOverview, QString(), 523 523 UIIconPool::iconSet(":/resources_monitor_24px.png", ":/resources_monitor_disabled_24px.png")); 524 524 -
trunk/src/VBox/Frontends/VirtualBox/src/monitor/resource/UIResourceMonitor.cpp
r88071 r88074 470 470 if (m_hostStats.m_iFSTotal != 0) 471 471 { 472 quint64 iUsed RamPer = 100 * (iUsedFS / (float) m_hostStats.m_iFSTotal);473 QString strCenter = QString("%1%\n%2").arg(iUsed RamPer).arg(UIResourceMonitorWidget::tr("Used"));472 quint64 iUsedFSPer = 100 * (iUsedFS / (float) m_hostStats.m_iFSTotal); 473 QString strCenter = QString("%1%\n%2").arg(iUsedFSPer).arg(UIResourceMonitorWidget::tr("Used")); 474 474 m_pHostFSChart->setChartCenterString(strCenter); 475 475 } -
trunk/src/VBox/Frontends/VirtualBox/src/monitor/vmactivity/UIVMActivityMonitor.cpp
r88071 r88074 1156 1156 1157 1157 QAction *pToResourcesAction = 1158 m_pActionPool->action(UIActionIndex_M_Performance_S_To Resources);1158 m_pActionPool->action(UIActionIndex_M_Performance_S_ToVMActivityOverview); 1159 1159 if (pToResourcesAction) 1160 1160 connect(pToResourcesAction, &QAction::triggered, this, &UIVMActivityMonitor::sigSwitchToResourcesPane);
Note:
See TracChangeset
for help on using the changeset viewer.