Changeset 85508 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jul 29, 2020 10:11:07 AM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneGlobal.cpp
r85493 r85508 195 195 /* Configure pane: */ 196 196 m_pPaneResourceMonitor->setProperty("ToolType", QVariant::fromValue(UIToolType_Resources)); 197 connect(m_pPaneResourceMonitor, &UIResourceMonitorWidget::sigSwitchToMachinePerformancePane, 198 this, &UIToolPaneGlobal::sigSwitchToMachinePerformancePane); 197 199 198 200 /* Add into layout: */ 199 201 m_pLayout->addWidget(m_pPaneResourceMonitor); 200 202 m_pLayout->setCurrentWidget(m_pPaneResourceMonitor); 201 connect(m_pPaneResourceMonitor, &UIResourceMonitorWidget::sigSwitchMachinePerformancePane,202 this, &UIToolPaneGlobal::sigSwitchMachinePerformancePane);203 203 } 204 204 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneGlobal.h
r85493 r85508 51 51 /** Notifies listeners about Cloud Profile Manager change. */ 52 52 void sigCloudProfileManagerChange(); 53 void sigSwitchMachinePerformancePane(const QUuid &machineUid); 53 54 /** Notifies listeners about request to switch to Performance pane of machine with @a uMachineId. */ 55 void sigSwitchToMachinePerformancePane(const QUuid &uMachineId); 54 56 55 57 public: -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
r85493 r85508 28 28 #include "UIExtraDataManager.h" 29 29 #include "UIChooser.h" 30 #include "UICommon.h"31 30 #include "UIVirtualBoxManager.h" 32 31 #include "UIVirtualBoxManagerWidget.h" … … 460 459 } 461 460 462 void UIVirtualBoxManagerWidget::sltSwitchMachinePerformancePane(const QUuid &machineUid) 463 { 464 if (!m_pPaneToolsMachine) 465 return; 466 CVirtualBox comVBox = uiCommon().virtualBox(); 467 468 CMachine comMachine = comVBox.FindMachine(machineUid.toString()); 469 if (comMachine.isNull()) 470 return; 471 m_pPaneToolsMachine->setActive(true); 472 m_pPaneToolsGlobal->setActive(false); 473 m_pPaneToolsMachine->setMachine(comMachine); 474 switchToMachineTool(UIToolType_Performance); 461 void UIVirtualBoxManagerWidget::sltSwitchToMachinePerformancePane(const QUuid &uMachineId) 462 { 463 AssertPtrReturnVoid(m_pPaneChooser); 464 AssertPtrReturnVoid(m_pPaneTools); 465 m_pPaneChooser->setCurrentMachine(uMachineId); 466 m_pPaneTools->setToolsType(UIToolType_Performance); 475 467 } 476 468 … … 572 564 connect(m_pPaneToolsGlobal, &UIToolPaneGlobal::sigCloudProfileManagerChange, 573 565 this, &UIVirtualBoxManagerWidget::sigCloudProfileManagerChange); 574 connect(m_pPaneToolsGlobal, &UIToolPaneGlobal::sigSwitch MachinePerformancePane,575 this, &UIVirtualBoxManagerWidget::sltSwitch MachinePerformancePane);566 connect(m_pPaneToolsGlobal, &UIToolPaneGlobal::sigSwitchToMachinePerformancePane, 567 this, &UIVirtualBoxManagerWidget::sltSwitchToMachinePerformancePane); 576 568 577 569 /* Add into stack: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h
r85493 r85508 251 251 void sltHandleToolsPaneIndexChange(); 252 252 253 /** Handles signal requesting performance pane switch. */254 void sltSwitch MachinePerformancePane(const QUuid &machineUid);253 /** Handles signal requesting switch to Performance pane of machine with @a uMachineId. */ 254 void sltSwitchToMachinePerformancePane(const QUuid &uMachineId); 255 255 /** @} */ 256 256 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.cpp
r84595 r85508 158 158 AssertPtrReturnVoid(view()); 159 159 view()->setSearchWidgetVisible(fVisible); 160 } 161 162 void UIChooser::setCurrentMachine(const QUuid &uId) 163 { 164 AssertPtrReturnVoid(model()); 165 model()->setCurrentMachineItem(uId); 160 166 } 161 167 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.h
r84595 r85508 152 152 /** Toggle machine search widget to be @a fVisible. */ 153 153 void setMachineSearchWidgetVisibility(bool fVisible); 154 /** Changes current machine to the one with certain @a uId. */ 155 void setCurrentMachine(const QUuid &uId); 154 156 /** @} */ 155 157 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp
r85111 r85508 959 959 /* Rebuild tree for main root: */ 960 960 buildTreeForMainRoot(true /* preserve selection */); 961 } 962 963 void UIChooserModel::setCurrentMachineItem(const QUuid &uId) 964 { 965 /* Look whether we have such item at all: */ 966 UIChooserItem *pItem = root()->searchForItem(uId.toString(), 967 UIChooserItemSearchFlag_Machine | 968 UIChooserItemSearchFlag_ExactId); 969 970 /* Select item if exists: */ 971 if (pItem) 972 setSelectedItem(pItem); 961 973 } 962 974 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.h
r85080 r85508 222 222 /** Sorts selected [parent] group item. */ 223 223 void sortSelectedGroupItem(); 224 /** Changes current machine item to the one with certain @a uId. */ 225 void setCurrentMachineItem(const QUuid &uId); 224 226 225 227 /** Defines current @a pDragObject. */ -
trunk/src/VBox/Frontends/VirtualBox/src/monitor/resource/UIResourceMonitor.cpp
r85493 r85508 1478 1478 if (!m_pTableView || !m_pModel) 1479 1479 return; 1480 QUuid machineId = m_pModel->itemUid(m_pTableView->selectedItemIndex());1481 if ( machineId.isNull())1480 const QUuid uMachineId = m_pModel->itemUid(m_pTableView->selectedItemIndex()); 1481 if (uMachineId.isNull()) 1482 1482 return; 1483 emit sigSwitch MachinePerformancePane(machineId);1483 emit sigSwitchToMachinePerformancePane(uMachineId); 1484 1484 } 1485 1485 -
trunk/src/VBox/Frontends/VirtualBox/src/monitor/resource/UIResourceMonitor.h
r85493 r85508 51 51 signals: 52 52 53 void sigSwitch MachinePerformancePane(const QUuid &machineId);53 void sigSwitchToMachinePerformancePane(const QUuid &uMachineId); 54 54 55 55 public:
Note:
See TracChangeset
for help on using the changeset viewer.