Changeset 102813 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jan 10, 2024 12:27:28 PM (11 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
r102787 r102813 247 247 } 248 248 249 void UIVirtualBoxManagerWidget::switch ToGlobalTool(UIToolType enmType)249 void UIVirtualBoxManagerWidget::switchGlobalToolTo(UIToolType enmType) 250 250 { 251 251 /* Open corresponding tool: */ … … 259 259 } 260 260 261 void UIVirtualBoxManagerWidget::switch ToMachineTool(UIToolType enmType)261 void UIVirtualBoxManagerWidget::switchMachineToolTo(UIToolType enmType) 262 262 { 263 263 /* Open corresponding tool: */ … … 517 517 if (fCurrentItemIsOk) 518 518 { 519 /* If Error-pane is chosen currently => open tool currently chosen in Tools-pane: */519 /* If Error-pane is chosen currently => switch to tool currently chosen in Tools-menu: */ 520 520 if (m_pPaneToolsMachine->currentTool() == UIToolType_Error) 521 s ltHandleMachineToolsPaneIndexChange();521 switchMachineToolTo(m_pMenuToolsMachine->toolsType()); 522 522 523 523 /* If we still have same item selected: */ … … 572 572 // smaller size often being ignored until it is actually shown. 573 573 pMenu->resize(ourGeo.size()); 574 }575 576 void UIVirtualBoxManagerWidget::sltHandleGlobalToolsPaneIndexChange()577 {578 switchToGlobalTool(m_pMenuToolsGlobal->toolsType());579 }580 581 void UIVirtualBoxManagerWidget::sltHandleMachineToolsPaneIndexChange()582 {583 switchToMachineTool(m_pMenuToolsMachine->toolsType());584 574 } 585 575 … … 820 810 /* Tools-pane connections: */ 821 811 connect(m_pMenuToolsGlobal, &UITools::sigSelectionChanged, 822 this, &UIVirtualBoxManagerWidget::sltHandleGlobalTools PaneIndexChange);812 this, &UIVirtualBoxManagerWidget::sltHandleGlobalToolsMenuIndexChange); 823 813 connect(m_pMenuToolsMachine, &UITools::sigSelectionChanged, 824 this, &UIVirtualBoxManagerWidget::sltHandleMachineTools PaneIndexChange);814 this, &UIVirtualBoxManagerWidget::sltHandleMachineToolsMenuIndexChange); 825 815 } 826 816 … … 846 836 } 847 837 848 /* Open tools last chosen in Tools- pane: */849 switch ToGlobalTool(m_pMenuToolsGlobal->toolsType());850 switch ToMachineTool(m_pMenuToolsMachine->toolsType());838 /* Open tools last chosen in Tools-menu: */ 839 switchGlobalToolTo(m_pMenuToolsGlobal->toolsType()); 840 switchMachineToolTo(m_pMenuToolsMachine->toolsType()); 851 841 } 852 842 … … 1074 1064 /* Tools-pane connections: */ 1075 1065 disconnect(m_pMenuToolsGlobal, &UITools::sigSelectionChanged, 1076 this, &UIVirtualBoxManagerWidget::sltHandleGlobalTools PaneIndexChange);1066 this, &UIVirtualBoxManagerWidget::sltHandleGlobalToolsMenuIndexChange); 1077 1067 disconnect(m_pMenuToolsMachine, &UITools::sigSelectionChanged, 1078 this, &UIVirtualBoxManagerWidget::sltHandleMachineTools PaneIndexChange);1068 this, &UIVirtualBoxManagerWidget::sltHandleMachineToolsMenuIndexChange); 1079 1069 } 1080 1070 … … 1150 1140 if (fCurrentItemIsOk) 1151 1141 { 1152 /* If Error-pane is chosen currently => open tool currently chosen in Tools-pane: */1142 /* If Error-pane is chosen currently => switch to tool currently chosen in Tools-menu: */ 1153 1143 if (m_pPaneToolsMachine->currentTool() == UIToolType_Error) 1154 s ltHandleMachineToolsPaneIndexChange();1144 switchMachineToolTo(m_pMenuToolsMachine->toolsType()); 1155 1145 1156 1146 /* Propagate current items to the Tools pane: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h
r102787 r102813 222 222 /** Returns whether Machine tool of passed @a enmType is opened. */ 223 223 bool isMachineToolOpened(UIToolType enmType) const; 224 /** Switches to Global tool ofpassed @a enmType. */225 void switch ToGlobalTool(UIToolType enmType);226 /** Switches to Machine tool ofpassed @a enmType. */227 void switch ToMachineTool(UIToolType enmType);224 /** Switches Global tool to passed @a enmType. */ 225 void switchGlobalToolTo(UIToolType enmType); 226 /** Switches Machine tool to passed @a enmType. */ 227 void switchMachineToolTo(UIToolType enmType); 228 228 /** Closes Global tool of passed @a enmType. */ 229 229 void closeGlobalTool(UIToolType enmType); … … 324 324 void sltHandleToolMenuRequested(const QPoint &position, UIVirtualMachineItem *pItem); 325 325 326 /** Handles signal about global Tools-pane index change. */ 327 void sltHandleGlobalToolsPaneIndexChange(); 328 /** Handles signal about machine Tools-pane index change. */ 329 void sltHandleMachineToolsPaneIndexChange(); 326 /** Handles signal about global Tools-menu index change. 327 * @param enmType Brings current tool type. */ 328 void sltHandleGlobalToolsMenuIndexChange(UIToolType enmType) { switchGlobalToolTo(enmType); } 329 /** Handles signal about machine Tools-menu index change. 330 * @param enmType Brings current tool type. */ 331 void sltHandleMachineToolsMenuIndexChange(UIToolType enmType) { switchMachineToolTo(enmType); } 330 332 331 333 /** Handles signal requesting switch to Activity pane of machine with @a uMachineId. */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UITools.h
r102107 r102813 55 55 /** @name General stuff. 56 56 * @{ */ 57 /** Notifies listeners about selection changed. */ 58 void sigSelectionChanged(); 57 /** Notifies listeners about selection changed. 58 * @param enmType Brings current tool type. */ 59 void sigSelectionChanged(UIToolType enmType); 59 60 60 61 /** Notifies listeners about expanding started. */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsModel.cpp
r102812 r102813 219 219 220 220 /* Notify about selection change: */ 221 emit sigSelectionChanged( );221 emit sigSelectionChanged(toolsType()); 222 222 223 223 /* Move focus to current-item: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsModel.h
r102812 r102813 72 72 /** @name Selection stuff. 73 73 * @{ */ 74 /** Notifies about selection changed. */ 75 void sigSelectionChanged(); 74 /** Notifies about selection changed. 75 * @param enmType Brings current tool type. */ 76 void sigSelectionChanged(UIToolType enmType); 76 77 /** Notifies about focus changed. */ 77 78 void sigFocusChanged();
Note:
See TracChangeset
for help on using the changeset viewer.