- Timestamp:
- Jan 10, 2019 4:16:12 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolManager.cpp
r76606 r76757 1274 1274 /** Constructs action passing @a pParent to the base-class. */ 1275 1275 UIActionMenuSelectorToolsMachine(UIActionPool *pParent) 1276 : UIActionMenu(pParent )1276 : UIActionMenu(pParent, ":/tools_menu_24px.png") /// @todo replace with 16px icon 1277 1277 {} 1278 1278 … … 1288 1288 virtual void retranslateUi() /* override */ 1289 1289 { 1290 setName(QApplication::translate("UIActionPool", " &Machine Tools Menu"));1290 setName(QApplication::translate("UIActionPool", "Tools")); 1291 1291 setStatusTip(QApplication::translate("UIActionPool", "Open the machine tools menu")); 1292 1292 } … … 2533 2533 m_pool[UIActionIndexST_M_Group_M_Close_S_Shutdown] = new UIActionSimpleSelectorClosePerformShutdown(this); 2534 2534 m_pool[UIActionIndexST_M_Group_M_Close_S_PowerOff] = new UIActionSimpleSelectorClosePerformPowerOff(this); 2535 m_pool[UIActionIndexST_M_Group_M_Tools] = new UIActionMenuSelectorToolsMachine(this); 2536 m_pool[UIActionIndexST_M_Group_M_Tools_S_Details] = new UIActionSimpleSelectorToolsMachineShowDetails(this); 2537 m_pool[UIActionIndexST_M_Group_M_Tools_S_Snapshots] = new UIActionSimpleSelectorToolsMachineShowSnapshots(this); 2538 m_pool[UIActionIndexST_M_Group_M_Tools_S_Logs] = new UIActionSimpleSelectorToolsMachineShowLogs(this); 2535 2539 m_pool[UIActionIndexST_M_Group_S_Discard] = new UIActionSimpleSelectorCommonPerformDiscard(this); 2536 2540 m_pool[UIActionIndexST_M_Group_S_ShowLogDialog] = new UIActionSimpleSelectorCommonShowMachineLogs(this); … … 2560 2564 m_pool[UIActionIndexST_M_Machine_M_Close_S_Shutdown] = new UIActionSimpleSelectorClosePerformShutdown(this); 2561 2565 m_pool[UIActionIndexST_M_Machine_M_Close_S_PowerOff] = new UIActionSimpleSelectorClosePerformPowerOff(this); 2566 m_pool[UIActionIndexST_M_Machine_M_Tools] = new UIActionMenuSelectorToolsMachine(this); 2567 m_pool[UIActionIndexST_M_Machine_M_Tools_S_Details] = new UIActionSimpleSelectorToolsMachineShowDetails(this); 2568 m_pool[UIActionIndexST_M_Machine_M_Tools_S_Snapshots] = new UIActionSimpleSelectorToolsMachineShowSnapshots(this); 2569 m_pool[UIActionIndexST_M_Machine_M_Tools_S_Logs] = new UIActionSimpleSelectorToolsMachineShowLogs(this); 2562 2570 m_pool[UIActionIndexST_M_Machine_S_Discard] = new UIActionSimpleSelectorCommonPerformDiscard(this); 2563 2571 m_pool[UIActionIndexST_M_Machine_S_ShowLogDialog] = new UIActionSimpleSelectorCommonShowMachineLogs(this); … … 2566 2574 m_pool[UIActionIndexST_M_Machine_S_CreateShortcut] = new UIActionSimpleSelectorCommonPerformCreateShortcut(this); 2567 2575 m_pool[UIActionIndexST_M_Machine_S_SortParent] = new UIActionSimpleSelectorMachinePerformSortParent(this); 2568 2569 /* Machine Tools actions: */2570 m_pool[UIActionIndexST_M_Tools_M_Machine] = new UIActionMenuSelectorToolsMachine(this);2571 m_pool[UIActionIndexST_M_Tools_M_Machine_S_Details] = new UIActionSimpleSelectorToolsMachineShowDetails(this);2572 m_pool[UIActionIndexST_M_Tools_M_Machine_S_Snapshots] = new UIActionSimpleSelectorToolsMachineShowSnapshots(this);2573 m_pool[UIActionIndexST_M_Tools_M_Machine_S_LogViewer] = new UIActionSimpleSelectorToolsMachineShowLogs(this);2574 2576 2575 2577 /* Global Tools actions: */ … … 2624 2626 m_menuUpdateHandlers[UIActionIndexST_M_Group_M_Close].ptfm = &UIActionPoolManager::updateMenuGroupClose; 2625 2627 m_menuUpdateHandlers[UIActionIndexST_M_Machine_M_Close].ptfm = &UIActionPoolManager::updateMenuMachineClose; 2628 m_menuUpdateHandlers[UIActionIndexST_M_Group_M_Tools].ptfm = &UIActionPoolManager::updateMenuGroupTools; 2629 m_menuUpdateHandlers[UIActionIndexST_M_Machine_M_Tools].ptfm = &UIActionPoolManager::updateMenuMachineTools; 2626 2630 m_menuUpdateHandlers[UIActionIndexST_M_MediumWindow].ptfm = &UIActionPoolManager::updateMenuMediumWindow; 2627 2631 m_menuUpdateHandlers[UIActionIndexST_M_Medium].ptfm = &UIActionPoolManager::updateMenuMedium; … … 2687 2691 /* 'Machine' / 'Close' menu: */ 2688 2692 updateMenuMachineClose(); 2693 /* 'Group' / 'Tools' menu: */ 2694 updateMenuGroupTools(); 2695 /* 'Machine' / 'Tools' menu: */ 2696 updateMenuMachineTools(); 2689 2697 2690 2698 /* 'Virtual Media Manager' menu: */ … … 2843 2851 pMenu->addMenu(action(UIActionIndexST_M_Group_M_Close)->menu()); 2844 2852 pMenu->addSeparator(); 2853 pMenu->addMenu(action(UIActionIndexST_M_Group_M_Tools)->menu()); 2854 pMenu->addSeparator(); 2845 2855 pMenu->addAction(action(UIActionIndexST_M_Group_S_Discard)); 2846 2856 pMenu->addAction(action(UIActionIndexST_M_Group_S_ShowLogDialog)); … … 2879 2889 pMenu->addMenu(action(UIActionIndexST_M_Machine_M_Close)->menu()); 2880 2890 pMenu->addSeparator(); 2891 pMenu->addMenu(action(UIActionIndexST_M_Machine_M_Tools)->menu()); 2892 pMenu->addSeparator(); 2881 2893 pMenu->addAction(action(UIActionIndexST_M_Machine_S_Discard)); 2882 2894 pMenu->addAction(action(UIActionIndexST_M_Machine_S_ShowLogDialog)); … … 2960 2972 /* Mark menu as valid: */ 2961 2973 m_invalidations.remove(UIActionIndexST_M_Machine_M_Close); 2974 } 2975 2976 void UIActionPoolManager::updateMenuGroupTools() 2977 { 2978 /* Get corresponding menu: */ 2979 UIMenu *pMenu = action(UIActionIndexST_M_Group_M_Tools)->menu(); 2980 AssertPtrReturnVoid(pMenu); 2981 /* Clear contents: */ 2982 pMenu->clear(); 2983 2984 /* Populate 'Group' / 'Tools' menu: */ 2985 pMenu->addAction(action(UIActionIndexST_M_Group_M_Tools_S_Details)); 2986 pMenu->addAction(action(UIActionIndexST_M_Group_M_Tools_S_Snapshots)); 2987 pMenu->addAction(action(UIActionIndexST_M_Group_M_Tools_S_Logs)); 2988 2989 /* Mark menu as valid: */ 2990 m_invalidations.remove(UIActionIndexST_M_Group_M_Tools); 2991 } 2992 2993 void UIActionPoolManager::updateMenuMachineTools() 2994 { 2995 /* Get corresponding menu: */ 2996 UIMenu *pMenu = action(UIActionIndexST_M_Machine_M_Tools)->menu(); 2997 AssertPtrReturnVoid(pMenu); 2998 /* Clear contents: */ 2999 pMenu->clear(); 3000 3001 /* Populate 'Machine' / 'Tools' menu: */ 3002 pMenu->addAction(action(UIActionIndexST_M_Machine_M_Tools_S_Details)); 3003 pMenu->addAction(action(UIActionIndexST_M_Machine_M_Tools_S_Snapshots)); 3004 pMenu->addAction(action(UIActionIndexST_M_Machine_M_Tools_S_Logs)); 3005 3006 /* Mark menu as valid: */ 3007 m_invalidations.remove(UIActionIndexST_M_Machine_M_Tools); 2962 3008 } 2963 3009 … … 3189 3235 << action(UIActionIndexST_M_Group_M_Close_S_SaveState) 3190 3236 << action(UIActionIndexST_M_Group_M_Close_S_Shutdown) 3191 << action(UIActionIndexST_M_Group_M_Close_S_PowerOff); 3237 << action(UIActionIndexST_M_Group_M_Close_S_PowerOff) 3238 << action(UIActionIndexST_M_Group_M_Tools_S_Details) 3239 << action(UIActionIndexST_M_Group_M_Tools_S_Snapshots) 3240 << action(UIActionIndexST_M_Group_M_Tools_S_Logs); 3192 3241 break; 3193 3242 } … … 3217 3266 << action(UIActionIndexST_M_Machine_M_Close_S_SaveState) 3218 3267 << action(UIActionIndexST_M_Machine_M_Close_S_Shutdown) 3219 << action(UIActionIndexST_M_Machine_M_Close_S_PowerOff); 3268 << action(UIActionIndexST_M_Machine_M_Close_S_PowerOff) 3269 << action(UIActionIndexST_M_Machine_M_Tools_S_Details) 3270 << action(UIActionIndexST_M_Machine_M_Tools_S_Snapshots) 3271 << action(UIActionIndexST_M_Machine_M_Tools_S_Logs); 3220 3272 break; 3221 3273 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolManager.h
r76581 r76757 73 73 UIActionIndexST_M_Group_M_Close_S_Shutdown, 74 74 UIActionIndexST_M_Group_M_Close_S_PowerOff, 75 UIActionIndexST_M_Group_M_Tools, 76 UIActionIndexST_M_Group_M_Tools_S_Details, 77 UIActionIndexST_M_Group_M_Tools_S_Snapshots, 78 UIActionIndexST_M_Group_M_Tools_S_Logs, 75 79 UIActionIndexST_M_Group_S_Discard, 76 80 UIActionIndexST_M_Group_S_ShowLogDialog, … … 100 104 UIActionIndexST_M_Machine_M_Close_S_Shutdown, 101 105 UIActionIndexST_M_Machine_M_Close_S_PowerOff, 106 UIActionIndexST_M_Machine_M_Tools, 107 UIActionIndexST_M_Machine_M_Tools_S_Details, 108 UIActionIndexST_M_Machine_M_Tools_S_Snapshots, 109 UIActionIndexST_M_Machine_M_Tools_S_Logs, 102 110 UIActionIndexST_M_Machine_S_Discard, 103 111 UIActionIndexST_M_Machine_S_ShowLogDialog, … … 106 114 UIActionIndexST_M_Machine_S_CreateShortcut, 107 115 UIActionIndexST_M_Machine_S_SortParent, 108 109 /* Machine Tools actions: */110 UIActionIndexST_M_Tools_M_Machine,111 UIActionIndexST_M_Tools_M_Machine_S_Details,112 UIActionIndexST_M_Tools_M_Machine_S_Snapshots,113 UIActionIndexST_M_Tools_M_Machine_S_LogViewer,114 116 115 117 /* Global Tools actions: */ … … 199 201 /** Updates 'Machine' / 'Close' menu. */ 200 202 void updateMenuMachineClose(); 203 /** Updates 'Group' / 'Tools' menu. */ 204 void updateMenuGroupTools(); 205 /** Updates 'Machine' / 'Tools' menu. */ 206 void updateMenuMachineTools(); 201 207 202 208 /** Updates 'Medium' window menu. */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r76606 r76757 1048 1048 } 1049 1049 1050 void UIVirtualBoxManager::sltPerformShowMachineToolDetails() 1051 { 1052 m_pWidget->setToolsType(UIToolType_Details); 1053 } 1054 1055 void UIVirtualBoxManager::sltPerformShowMachineToolSnapshots() 1056 { 1057 m_pWidget->setToolsType(UIToolType_Snapshots); 1058 } 1059 1060 void UIVirtualBoxManager::sltPerformShowMachineToolLogs() 1061 { 1062 m_pWidget->setToolsType(UIToolType_Logs); 1063 } 1064 1050 1065 void UIVirtualBoxManager::sltOpenLogViewerWindow() 1051 1066 { … … 1444 1459 connect(actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff), &UIAction::triggered, 1445 1460 this, &UIVirtualBoxManager::sltPerformPowerOffMachine); 1461 1462 /* 'Group/Tools' menu connections: */ 1463 connect(actionPool()->action(UIActionIndexST_M_Group_M_Tools_S_Details), &UIAction::triggered, 1464 this, &UIVirtualBoxManager::sltPerformShowMachineToolDetails); 1465 connect(actionPool()->action(UIActionIndexST_M_Group_M_Tools_S_Snapshots), &UIAction::triggered, 1466 this, &UIVirtualBoxManager::sltPerformShowMachineToolSnapshots); 1467 connect(actionPool()->action(UIActionIndexST_M_Group_M_Tools_S_Logs), &UIAction::triggered, 1468 this, &UIVirtualBoxManager::sltPerformShowMachineToolLogs); 1469 1470 /* 'Machine/Tools' menu connections: */ 1471 connect(actionPool()->action(UIActionIndexST_M_Machine_M_Tools_S_Details), &UIAction::triggered, 1472 this, &UIVirtualBoxManager::sltPerformShowMachineToolDetails); 1473 connect(actionPool()->action(UIActionIndexST_M_Machine_M_Tools_S_Snapshots), &UIAction::triggered, 1474 this, &UIVirtualBoxManager::sltPerformShowMachineToolSnapshots); 1475 connect(actionPool()->action(UIActionIndexST_M_Machine_M_Tools_S_Logs), &UIAction::triggered, 1476 this, &UIVirtualBoxManager::sltPerformShowMachineToolLogs); 1446 1477 } 1447 1478 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.h
r76581 r76757 222 222 /** Handles call to power machine off. */ 223 223 void sltPerformPowerOffMachine(); 224 225 /** Handles call to show machine Details tool. */ 226 void sltPerformShowMachineToolDetails(); 227 /** Handles call to show machine Snapshots tool. */ 228 void sltPerformShowMachineToolSnapshots(); 229 /** Handles call to show machine Logs tool. */ 230 void sltPerformShowMachineToolLogs(); 224 231 225 232 /** Handles call to open machine Log Viewer window. */
Note:
See TracChangeset
for help on using the changeset viewer.