Changeset 52202 in vbox
- Timestamp:
- Jul 25, 2014 8:34:38 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 95262
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 37 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r52190 r52202 3166 3166 emit sigLanguageChange(extraDataString(strKey)); 3167 3167 /* Selector UI shortcut changed? */ 3168 else if (strKey == GUI_Input_SelectorShortcuts && gpActionPool->type() == UIActionPoolType_Selector)3168 else if (strKey == GUI_Input_SelectorShortcuts) 3169 3169 emit sigSelectorUIShortcutChange(); 3170 3170 /* Runtime UI shortcut changed? */ 3171 else if (strKey == GUI_Input_MachineShortcuts && gpActionPool->type() == UIActionPoolType_Runtime)3171 else if (strKey == GUI_Input_MachineShortcuts) 3172 3172 emit sigRuntimeUIShortcutChange(); 3173 3173 #ifdef Q_WS_MAC -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
r52184 r52202 547 547 548 548 549 UIActionPool* UIActionPool::m_pInstance = 0;550 551 549 /* static */ 552 UIActionPool* UIActionPool::instance() 553 { 554 return m_pInstance; 550 UIActionPool* UIActionPool::create(UIActionPoolType type) 551 { 552 UIActionPool *pActionPool = 0; 553 switch (type) 554 { 555 case UIActionPoolType_Selector: pActionPool = new UIActionPoolSelector; break; 556 case UIActionPoolType_Runtime: pActionPool = new UIActionPoolRuntime; break; 557 default: AssertFailedReturn(0); 558 } 559 AssertPtrReturn(pActionPool, 0); 560 pActionPool->prepare(); 561 return pActionPool; 555 562 } 556 563 557 564 /* static */ 558 void UIActionPool::create(UIActionPoolType type) 559 { 560 /* Check that instance do NOT exists: */ 561 if (m_pInstance) 562 return; 563 564 /* Create instance: */ 565 switch (type) 566 { 567 case UIActionPoolType_Selector: new UIActionPoolSelector; break; 568 case UIActionPoolType_Runtime: new UIActionPoolRuntime; break; 569 default: break; 570 } 571 572 /* Prepare instance: */ 573 m_pInstance->prepare(); 574 } 575 576 /* static */ 577 void UIActionPool::destroy() 578 { 579 /* Check that instance exists: */ 580 if (!m_pInstance) 581 return; 582 583 /* Cleanup instance: */ 584 m_pInstance->cleanup(); 585 586 /* Delete instance: */ 587 delete m_pInstance; 565 void UIActionPool::destroy(UIActionPool *pActionPool) 566 { 567 AssertPtrReturnVoid(pActionPool); 568 pActionPool->cleanup(); 569 delete pActionPool; 588 570 } 589 571 … … 591 573 void UIActionPool::createTemporary(UIActionPoolType type) 592 574 { 593 UIActionPool *p HelperPool = 0;575 UIActionPool *pActionPool = 0; 594 576 switch (type) 595 577 { 596 case UIActionPoolType_Selector: pHelperPool = new UIActionPoolSelector; break; 597 case UIActionPoolType_Runtime: pHelperPool = new UIActionPoolRuntime; break; 598 default: break; 599 } 600 if (pHelperPool) 601 { 602 pHelperPool->prepare(); 603 pHelperPool->cleanup(); 604 delete pHelperPool; 605 } 606 } 607 608 UIActionPool::UIActionPool(UIActionPoolType type) 578 case UIActionPoolType_Selector: pActionPool = new UIActionPoolSelector(true); break; 579 case UIActionPoolType_Runtime: pActionPool = new UIActionPoolRuntime(true); break; 580 default: AssertFailedReturnVoid(); 581 } 582 AssertPtrReturnVoid(pActionPool); 583 pActionPool->prepare(); 584 pActionPool->cleanup(); 585 delete pActionPool; 586 } 587 588 UIActionPool::UIActionPool(UIActionPoolType type, bool fTemporary /* = false */) 609 589 : m_type(type) 610 { 611 /* Prepare instance: */ 612 if (!m_pInstance) 613 m_pInstance = this; 614 } 615 616 UIActionPool::~UIActionPool() 617 { 618 /* Cleanup instance: */ 619 if (m_pInstance == this) 620 m_pInstance = 0; 590 , m_fTemporary(fTemporary) 591 { 621 592 } 622 593 … … 639 610 /* Update configuration: */ 640 611 updateConfiguration(); 641 /* Applyshortcuts: */642 sltApplyShortcuts();612 /* Update shortcuts: */ 613 updateShortcuts(); 643 614 } 644 615 645 616 void UIActionPool::preparePool() 646 617 { 647 /* Various actions: */618 /* Create various actions: */ 648 619 m_pool[UIActionIndex_Simple_Preferences] = new UIActionSimplePreferences(this); 649 620 m_pool[UIActionIndex_Simple_LogDialog] = new UIActionSimpleLogDialog(this); 650 621 651 /* 'Help' actions: */622 /* Create 'Help' actions: */ 652 623 m_pool[UIActionIndex_Menu_Help] = new UIActionMenuHelp(this); 653 624 m_pool[UIActionIndex_Simple_Contents] = new UIActionSimpleContents(this); … … 671 642 /* Cleanup pool: */ 672 643 cleanupPool(); 644 } 645 646 void UIActionPool::updateShortcuts() 647 { 648 gShortcutPool->applyShortcuts(this); 673 649 } 674 650 … … 706 682 } 707 683 708 void UIActionPool::sltApplyShortcuts()709 {710 gShortcutPool->applyShortcuts(this);711 }712 713 684 bool UIActionPool::event(QEvent *pEvent) 714 685 { -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h
r52184 r52202 70 70 }; 71 71 72 /** Restriction levels. */ 73 enum UIActionRestrictionLevel 74 { 75 UIActionRestrictionLevel_Base, 76 UIActionRestrictionLevel_Session, 77 UIActionRestrictionLevel_Logic 78 }; 79 72 80 73 81 /** QMenu extension … … 265 273 266 274 /** Abstract QObject extension 267 * representing action-pool singleton. */275 * representing action-pool interface and factory. */ 268 276 class UIActionPool : public QIWithRetranslateUI3<QObject> 269 277 { … … 272 280 public: 273 281 274 /** Restriction levels. */275 enum UIActionRestrictionLevel276 {277 UIActionRestrictionLevel_Base,278 UIActionRestrictionLevel_Session,279 UIActionRestrictionLevel_Logic280 };281 282 /** Singleton instance access member. */283 static UIActionPool* instance();284 285 282 /** Static factory constructor. */ 286 static voidcreate(UIActionPoolType type);283 static UIActionPool* create(UIActionPoolType type); 287 284 /** Static factory destructor. */ 288 static void destroy( );285 static void destroy(UIActionPool *pActionPool); 289 286 290 287 /** Static factory constructor (temporary), … … 317 314 318 315 /** Loads keyboard shortcuts of action-pool into shortcuts-pool. */ 319 void sltApplyShortcuts() ;316 void sltApplyShortcuts() { updateShortcuts(); } 320 317 321 318 protected: 322 319 323 320 /** Constructor of the action-pool of passed @a type. */ 324 UIActionPool(UIActionPoolType type); 325 /** Destructor. */ 326 ~UIActionPool(); 321 UIActionPool(UIActionPoolType type, bool fTemporary = false); 327 322 328 323 /** Prepare routine. */ … … 341 336 /** Update configuration routine. */ 342 337 virtual void updateConfiguration() = 0; 338 /** Update shortcuts. */ 339 virtual void updateShortcuts(); 343 340 344 341 /** General event handler. */ 345 342 virtual bool event(QEvent *pEvent); 346 343 347 /** Holds the singleton action-pool instance. */348 static UIActionPool *m_pInstance;349 344 /** Holds the action-pool type. */ 350 UIActionPoolType m_type; 345 const UIActionPoolType m_type; 346 /** Holds whether this action-pool is temporary. */ 347 const bool m_fTemporary; 351 348 /** Holds all the actions action-pool contains. */ 352 349 QMap<int, UIAction*> m_pool; 353 350 }; 354 351 355 #define gpActionPool UIActionPool::instance()356 357 352 #endif /* !___UIActionPool_h___ */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r52188 r52202 64 64 #include "UIIconPool.h" 65 65 #include "UIShortcutPool.h" 66 #include "UIActionPoolSelector.h"67 #include "UIActionPoolRuntime.h"68 66 #include "UIExtraDataManager.h" 69 67 #include "QIFileDialog.h" … … 4308 4306 UIUpdateManager::schedule(); 4309 4307 #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */ 4310 4311 /* Create action pool: */4312 if (isVMConsoleProcess())4313 {4314 UIActionPool::create(UIActionPoolType_Runtime);4315 UIActionPool::createTemporary(UIActionPoolType_Selector);4316 }4317 else4318 {4319 UIActionPool::create(UIActionPoolType_Selector);4320 UIActionPool::createTemporary(UIActionPoolType_Runtime);4321 }4322 4308 } 4323 4309 … … 4335 4321 UINetworkManager::destroy(); 4336 4322 #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */ 4337 4338 /* Destroy action pool: */4339 UIActionPool::destroy();4340 4323 4341 4324 /* Destroy shortcut pool: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.cpp
r52186 r52202 41 41 42 42 UIActionMenuMachineRuntime(UIActionPool *pParent) 43 : UIActionMenu(pParent) 44 { 45 retranslateUi(); 46 } 43 : UIActionMenu(pParent) {} 47 44 48 45 protected: … … 61 58 62 59 UIActionSimpleShowSettingsDialog(UIActionPool *pParent) 63 : UIActionSimple(pParent, ":/vm_settings_16px.png", ":/vm_settings_disabled_16px.png") 64 { 65 retranslateUi(); 66 } 60 : UIActionSimple(pParent, ":/vm_settings_16px.png", ":/vm_settings_disabled_16px.png") {} 67 61 68 62 protected: … … 92 86 93 87 UIActionSimplePerformTakeSnapshot(UIActionPool *pParent) 94 : UIActionSimple(pParent, ":/snapshot_take_16px.png", ":/snapshot_take_disabled_16px.png") 95 { 96 retranslateUi(); 97 } 88 : UIActionSimple(pParent, ":/snapshot_take_16px.png", ":/snapshot_take_disabled_16px.png") {} 98 89 99 90 protected: … … 123 114 124 115 UIActionSimplePerformTakeScreenshot(UIActionPool *pParent) 125 : UIActionSimple(pParent, ":/screenshot_take_16px.png", ":/screenshot_take_disabled_16px.png") 126 { 127 retranslateUi(); 128 } 116 : UIActionSimple(pParent, ":/screenshot_take_16px.png", ":/screenshot_take_disabled_16px.png") {} 129 117 130 118 protected: … … 154 142 155 143 UIActionSimpleShowInformationDialog(UIActionPool *pParent) 156 : UIActionSimple(pParent, ":/session_info_16px.png", ":/session_info_disabled_16px.png") 157 { 158 retranslateUi(); 159 } 144 : UIActionSimple(pParent, ":/session_info_16px.png", ":/session_info_disabled_16px.png") {} 160 145 161 146 protected: … … 185 170 186 171 UIActionMenuKeyboard(UIActionPool *pParent) 187 : UIActionMenu(pParent) 188 { 189 retranslateUi(); 190 } 172 : UIActionMenu(pParent) {} 191 173 192 174 protected: … … 202 184 203 185 UIActionSimpleKeyboardSettings(UIActionPool *pParent) 204 : UIActionSimple(pParent, ":/keyboard_settings_16px.png", ":/keyboard_settings_disabled_16px.png") 205 { 206 retranslateUi(); 207 } 186 : UIActionSimple(pParent, ":/keyboard_settings_16px.png", ":/keyboard_settings_disabled_16px.png") {} 208 187 209 188 protected: … … 228 207 229 208 UIActionMenuMouseIntegration(UIActionPool *pParent) 230 : UIActionMenu(pParent) 231 { 232 retranslateUi(); 233 } 209 : UIActionMenu(pParent) {} 234 210 235 211 protected: … … 247 223 : UIActionToggle(pParent, 248 224 ":/mouse_can_seamless_on_16px.png", ":/mouse_can_seamless_16px.png", 249 ":/mouse_can_seamless_on_disabled_16px.png", ":/mouse_can_seamless_disabled_16px.png") 250 { 251 retranslateUi(); 252 } 225 ":/mouse_can_seamless_on_disabled_16px.png", ":/mouse_can_seamless_disabled_16px.png") {} 253 226 254 227 protected: … … 278 251 279 252 UIActionSimplePerformTypeCAD(UIActionPool *pParent) 280 : UIActionSimple(pParent, ":/hostkey_16px.png", ":/hostkey_disabled_16px.png") 281 { 282 retranslateUi(); 283 } 253 : UIActionSimple(pParent, ":/hostkey_16px.png", ":/hostkey_disabled_16px.png") {} 284 254 285 255 protected: … … 310 280 311 281 UIActionSimplePerformTypeCABS(UIActionPool *pParent) 312 : UIActionSimple(pParent, ":/hostkey_16px.png", ":/hostkey_disabled_16px.png") 313 { 314 retranslateUi(); 315 } 282 : UIActionSimple(pParent, ":/hostkey_16px.png", ":/hostkey_disabled_16px.png") {} 316 283 317 284 protected: … … 344 311 : UIActionToggle(pParent, 345 312 ":/vm_pause_on_16px.png", ":/vm_pause_16px.png", 346 ":/vm_pause_on_disabled_16px.png", ":/vm_pause_disabled_16px.png") 347 { 348 retranslateUi(); 349 } 313 ":/vm_pause_on_disabled_16px.png", ":/vm_pause_disabled_16px.png") {} 350 314 351 315 protected: … … 375 339 376 340 UIActionSimplePerformReset(UIActionPool *pParent) 377 : UIActionSimple(pParent, ":/vm_reset_16px.png", ":/vm_reset_disabled_16px.png") 378 { 379 retranslateUi(); 380 } 341 : UIActionSimple(pParent, ":/vm_reset_16px.png", ":/vm_reset_disabled_16px.png") {} 381 342 382 343 protected: … … 406 367 407 368 UIActionSimplePerformSave(UIActionPool *pParent) 408 : UIActionSimple(pParent, ":/vm_save_state_16px.png", ":/vm_save_state_disabled_16px.png") 409 { 410 retranslateUi(); 411 } 369 : UIActionSimple(pParent, ":/vm_save_state_16px.png", ":/vm_save_state_disabled_16px.png") {} 412 370 413 371 protected: … … 432 390 433 391 UIActionSimplePerformShutdown(UIActionPool *pParent) 434 : UIActionSimple(pParent, ":/vm_shutdown_16px.png", ":/vm_shutdown_disabled_16px.png") 435 { 436 retranslateUi(); 437 } 392 : UIActionSimple(pParent, ":/vm_shutdown_16px.png", ":/vm_shutdown_disabled_16px.png") {} 438 393 439 394 protected: … … 467 422 468 423 UIActionSimplePerformPowerOff(UIActionPool *pParent) 469 : UIActionSimple(pParent, ":/vm_poweroff_16px.png", ":/vm_poweroff_disabled_16px.png") 470 { 471 retranslateUi(); 472 } 424 : UIActionSimple(pParent, ":/vm_poweroff_16px.png", ":/vm_poweroff_disabled_16px.png") {} 473 425 474 426 protected: … … 496 448 { 497 449 setMenuRole(QAction::QuitRole); 498 retranslateUi();499 450 } 500 451 … … 525 476 526 477 UIActionMenuView(UIActionPool *pParent) 527 : UIActionMenu(pParent) 528 { 529 retranslateUi(); 530 } 478 : UIActionMenu(pParent) {} 531 479 532 480 protected: … … 545 493 546 494 UIActionMenuViewPopup(UIActionPool *pParent) 547 : UIActionMenu(pParent) 548 { 549 retranslateUi(); 550 } 495 : UIActionMenu(pParent) {} 551 496 552 497 protected: … … 564 509 : UIActionToggle(pParent, 565 510 ":/fullscreen_on_16px.png", ":/fullscreen_16px.png", 566 ":/fullscreen_on_disabled_16px.png", ":/fullscreen_disabled_16px.png") 567 { 568 retranslateUi(); 569 } 511 ":/fullscreen_on_disabled_16px.png", ":/fullscreen_disabled_16px.png") {} 570 512 571 513 protected: … … 597 539 : UIActionToggle(pParent, 598 540 ":/seamless_on_16px.png", ":/seamless_16px.png", 599 ":/seamless_on_disabled_16px.png", ":/seamless_disabled_16px.png") 600 { 601 retranslateUi(); 602 } 541 ":/seamless_on_disabled_16px.png", ":/seamless_disabled_16px.png") {} 603 542 604 543 protected: … … 630 569 : UIActionToggle(pParent, 631 570 ":/scale_on_16px.png", ":/scale_16px.png", 632 ":/scale_on_disabled_16px.png", ":/scale_disabled_16px.png") 633 { 634 retranslateUi(); 635 } 571 ":/scale_on_disabled_16px.png", ":/scale_disabled_16px.png") {} 636 572 637 573 protected: … … 663 599 : UIActionToggle(pParent, 664 600 ":/auto_resize_on_on_16px.png", ":/auto_resize_on_16px.png", 665 ":/auto_resize_on_on_disabled_16px.png", ":/auto_resize_on_disabled_16px.png") 666 { 667 retranslateUi(); 668 } 601 ":/auto_resize_on_on_disabled_16px.png", ":/auto_resize_on_disabled_16px.png") {} 669 602 670 603 protected: … … 694 627 695 628 UIActionSimplePerformWindowAdjust(UIActionPool *pParent) 696 : UIActionSimple(pParent, ":/adjust_win_size_16px.png", ":/adjust_win_size_disabled_16px.png") 697 { 698 retranslateUi(); 699 } 629 : UIActionSimple(pParent, ":/adjust_win_size_16px.png", ":/adjust_win_size_disabled_16px.png") {} 700 630 701 631 protected: … … 725 655 726 656 UIActionMenuStatusBar(UIActionPool *pParent) 727 : UIActionMenu(pParent, ":/statusbar_16px.png", ":/statusbar_disabled_16px.png") 728 { 729 retranslateUi(); 730 } 657 : UIActionMenu(pParent, ":/statusbar_16px.png", ":/statusbar_disabled_16px.png") {} 731 658 732 659 protected: … … 745 672 746 673 UIActionSimpleShowStatusBarSettingsWindow(UIActionPool *pParent) 747 : UIActionSimple(pParent, ":/statusbar_settings_16px.png", ":/statusbar_settings_disabled_16px.png") 748 { 749 retranslateUi(); 750 } 674 : UIActionSimple(pParent, ":/statusbar_settings_16px.png", ":/statusbar_settings_disabled_16px.png") {} 751 675 752 676 protected: … … 772 696 UIActionToggleStatusBar(UIActionPool *pParent) 773 697 : UIActionToggle(pParent, ":/statusbar_on_16px.png", ":/statusbar_16px.png", 774 ":/statusbar_on_disabled_16px.png", ":/statusbar_disabled_16px.png") 775 { 776 retranslateUi(); 777 } 698 ":/statusbar_on_disabled_16px.png", ":/statusbar_disabled_16px.png") {} 778 699 779 700 protected: … … 798 719 799 720 UIActionMenuDevices(UIActionPool *pParent) 800 : UIActionMenu(pParent) 801 { 802 retranslateUi(); 803 } 721 : UIActionMenu(pParent) {} 804 722 805 723 protected: … … 821 739 { 822 740 setShowToolTip(true); 823 retranslateUi();824 741 } 825 742 … … 836 753 837 754 UIActionSimpleShowStorageSettingsDialog(UIActionPool *pParent) 838 : UIActionSimple(pParent, ":/hd_settings_16px.png", ":/hd_settings_disabled_16px.png") 839 { 840 retranslateUi(); 841 } 755 : UIActionSimple(pParent, ":/hd_settings_16px.png", ":/hd_settings_disabled_16px.png") {} 842 756 843 757 protected: … … 865 779 { 866 780 setShowToolTip(true); 867 retranslateUi();868 781 } 869 782 … … 886 799 { 887 800 setShowToolTip(true); 888 retranslateUi();889 801 } 890 802 … … 907 819 { 908 820 setShowToolTip(true); 909 retranslateUi();910 821 } 911 822 … … 925 836 926 837 UIActionSimpleShowUSBDevicesSettingsDialog(UIActionPool *pParent) 927 : UIActionSimple(pParent, ":/usb_settings_16px.png", ":/usb_settings_disabled_16px.png") 928 { 929 retranslateUi(); 930 } 838 : UIActionSimple(pParent, ":/usb_settings_16px.png", ":/usb_settings_disabled_16px.png") {} 931 839 932 840 protected: … … 954 862 { 955 863 setShowToolTip(true); 956 retranslateUi();957 864 } 958 865 … … 972 879 973 880 UIActionMenuSharedClipboard(UIActionPool *pParent) 974 : UIActionMenu(pParent, ":/shared_clipboard_16px.png", ":/shared_clipboard_disabled_16px.png") 975 { 976 retranslateUi(); 977 } 881 : UIActionMenu(pParent, ":/shared_clipboard_16px.png", ":/shared_clipboard_disabled_16px.png") {} 978 882 979 883 protected: … … 992 896 993 897 UIActionMenuDragAndDrop(UIActionPool *pParent) 994 : UIActionMenu(pParent, ":/drag_drop_16px.png", ":/drag_drop_disabled_16px.png") 995 { 996 retranslateUi(); 997 } 898 : UIActionMenu(pParent, ":/drag_drop_16px.png", ":/drag_drop_disabled_16px.png") {} 998 899 999 900 protected: … … 1012 913 1013 914 UIActionMenuNetworkAdapters(UIActionPool *pParent) 1014 : UIActionMenu(pParent, ":/nw_16px.png", ":/nw_disabled_16px.png") 1015 { 1016 retranslateUi(); 1017 } 915 : UIActionMenu(pParent, ":/nw_16px.png", ":/nw_disabled_16px.png") {} 1018 916 1019 917 protected: … … 1032 930 1033 931 UIActionSimpleShowNetworkSettingsDialog(UIActionPool *pParent) 1034 : UIActionSimple(pParent, ":/nw_settings_16px.png", ":/nw_settings_disabled_16px.png") 1035 { 1036 retranslateUi(); 1037 } 932 : UIActionSimple(pParent, ":/nw_settings_16px.png", ":/nw_settings_disabled_16px.png") {} 1038 933 1039 934 protected: … … 1058 953 1059 954 UIActionMenuSharedFolders(UIActionPool *pParent) 1060 : UIActionMenu(pParent) 1061 { 1062 retranslateUi(); 1063 } 955 : UIActionMenu(pParent) {} 1064 956 1065 957 protected: … … 1075 967 1076 968 UIActionSimpleShowSharedFoldersSettingsDialog(UIActionPool *pParent) 1077 : UIActionSimple(pParent, ":/sf_settings_16px.png", ":/sf_settings_disabled_16px.png") 1078 { 1079 retranslateUi(); 1080 } 969 : UIActionSimple(pParent, ":/sf_settings_16px.png", ":/sf_settings_disabled_16px.png") {} 1081 970 1082 971 protected: … … 1103 992 : UIActionToggle(pParent, 1104 993 ":/vrdp_on_16px.png", ":/vrdp_16px.png", 1105 ":/vrdp_on_disabled_16px.png", ":/vrdp_disabled_16px.png") 1106 { 1107 retranslateUi(); 1108 } 994 ":/vrdp_on_disabled_16px.png", ":/vrdp_disabled_16px.png") {} 1109 995 1110 996 protected: … … 1129 1015 1130 1016 UIActionMenuVideoCapture(UIActionPool *pParent) 1131 : UIActionMenu(pParent) 1132 { 1133 retranslateUi(); 1134 } 1017 : UIActionMenu(pParent) {} 1135 1018 1136 1019 protected: … … 1148 1031 : UIActionToggle(pParent, 1149 1032 ":/video_capture_on_16px.png", ":/video_capture_16px.png", 1150 ":/video_capture_on_disabled_16px.png", ":/video_capture_disabled_16px.png") 1151 { 1152 retranslateUi(); 1153 } 1033 ":/video_capture_on_disabled_16px.png", ":/video_capture_disabled_16px.png") {} 1154 1034 1155 1035 protected: … … 1174 1054 1175 1055 UIActionSimpleShowVideoCaptureSettingsDialog(UIActionPool *pParent) 1176 : UIActionSimple(pParent, ":/video_capture_settings_16px.png") 1177 { 1178 retranslateUi(); 1179 } 1056 : UIActionSimple(pParent, ":/video_capture_settings_16px.png") {} 1180 1057 1181 1058 protected: … … 1200 1077 1201 1078 UIActionSimplePerformInstallGuestTools(UIActionPool *pParent) 1202 : UIActionSimple(pParent, ":/guesttools_16px.png", ":/guesttools_disabled_16px.png") 1203 { 1204 retranslateUi(); 1205 } 1079 : UIActionSimple(pParent, ":/guesttools_16px.png", ":/guesttools_disabled_16px.png") {} 1206 1080 1207 1081 protected: … … 1232 1106 1233 1107 UIActionMenuDebug(UIActionPool *pParent) 1234 : UIActionMenu(pParent) 1235 { 1236 retranslateUi(); 1237 } 1108 : UIActionMenu(pParent) {} 1238 1109 1239 1110 protected: … … 1252 1123 1253 1124 UIActionSimpleShowStatistics(UIActionPool *pParent) 1254 : UIActionSimple(pParent) 1255 { 1256 retranslateUi(); 1257 } 1125 : UIActionSimple(pParent) {} 1258 1126 1259 1127 protected: … … 1277 1145 1278 1146 UIActionSimpleShowCommandLine(UIActionPool *pParent) 1279 : UIActionSimple(pParent) 1280 { 1281 retranslateUi(); 1282 } 1147 : UIActionSimple(pParent) {} 1283 1148 1284 1149 protected: … … 1302 1167 1303 1168 UIActionToggleLogging(UIActionPool *pParent) 1304 : UIActionToggle(pParent) 1305 { 1306 retranslateUi(); 1307 } 1169 : UIActionToggle(pParent) {} 1308 1170 1309 1171 protected: … … 1329 1191 1330 1192 UIActionMenuDock(UIActionPool *pParent) 1331 : UIActionMenu(pParent) 1332 { 1333 retranslateUi(); 1334 } 1193 : UIActionMenu(pParent) {} 1335 1194 1336 1195 protected: … … 1346 1205 1347 1206 UIActionMenuDockSettings(UIActionPool *pParent) 1348 : UIActionMenu(pParent) 1349 { 1350 retranslateUi(); 1351 } 1207 : UIActionMenu(pParent) {} 1352 1208 1353 1209 protected: … … 1366 1222 1367 1223 UIActionToggleDockPreviewMonitor(UIActionPool *pParent) 1368 : UIActionToggle(pParent) 1369 { 1370 retranslateUi(); 1371 } 1224 : UIActionToggle(pParent) {} 1372 1225 1373 1226 protected: … … 1391 1244 1392 1245 UIActionToggleDockDisableMonitor(UIActionPool *pParent) 1393 : UIActionToggle(pParent) 1394 { 1395 retranslateUi(); 1396 } 1246 : UIActionToggle(pParent) {} 1397 1247 1398 1248 protected: … … 1411 1261 1412 1262 1413 UIActionPoolRuntime::UIActionPoolRuntime( )1414 : UIActionPool(UIActionPoolType_Runtime )1263 UIActionPoolRuntime::UIActionPoolRuntime(bool fTemporary /* = false */) 1264 : UIActionPool(UIActionPoolType_Runtime, fTemporary) 1415 1265 { 1416 1266 } … … 1625 1475 m_pool[UIActionIndexRT_M_Dock_M_DockSettings_T_DisableMonitor] = new UIActionToggleDockDisableMonitor(this); 1626 1476 #endif /* Q_WS_MAC */ 1477 1478 /* Retranslate finally: */ 1479 retranslateUi(); 1627 1480 } 1628 1481 … … 1731 1584 /* 'Machine' menu: */ 1732 1585 const bool fAllowToShowMenuMachine = isAllowedInMenuBar(RuntimeMenuType_Machine); 1733 gpActionPool->action(UIActionIndexRT_M_Machine)->setVisible(fAllowToShowMenuMachine);1586 action(UIActionIndexRT_M_Machine)->setVisible(fAllowToShowMenuMachine); 1734 1587 if (fAllowToShowMenuMachine) 1735 m_mainMenus << gpActionPool->action(UIActionIndexRT_M_Machine)->menu();1588 m_mainMenus << action(UIActionIndexRT_M_Machine)->menu(); 1736 1589 updateMenuMachine(); 1737 1590 1738 1591 /* 'View' menu: */ 1739 1592 const bool fAllowToShowMenuView = isAllowedInMenuBar(RuntimeMenuType_View); 1740 gpActionPool->action(UIActionIndexRT_M_View)->setVisible(fAllowToShowMenuView);1741 gpActionPool->action(UIActionIndexRT_M_ViewPopup)->setVisible(fAllowToShowMenuView);1593 action(UIActionIndexRT_M_View)->setVisible(fAllowToShowMenuView); 1594 action(UIActionIndexRT_M_ViewPopup)->setVisible(fAllowToShowMenuView); 1742 1595 if (fAllowToShowMenuView) 1743 m_mainMenus << gpActionPool->action(UIActionIndexRT_M_View)->menu();1596 m_mainMenus << action(UIActionIndexRT_M_View)->menu(); 1744 1597 updateMenuView(); 1745 1598 updateMenuViewPopup(); … … 1747 1600 /* 'Devices' menu: */ 1748 1601 const bool fAllowToShowMenuDevices = isAllowedInMenuBar(RuntimeMenuType_Devices); 1749 gpActionPool->action(UIActionIndexRT_M_Devices)->setVisible(fAllowToShowMenuDevices);1602 action(UIActionIndexRT_M_Devices)->setVisible(fAllowToShowMenuDevices); 1750 1603 if (fAllowToShowMenuDevices) 1751 m_mainMenus << gpActionPool->action(UIActionIndexRT_M_Devices)->menu();1604 m_mainMenus << action(UIActionIndexRT_M_Devices)->menu(); 1752 1605 updateMenuDevices(); 1753 1606 … … 1755 1608 /* 'Debug' menu: */ 1756 1609 const bool fAllowToShowMenuDebug = isAllowedInMenuBar(RuntimeMenuType_Debug); 1757 gpActionPool->action(UIActionIndexRT_M_Debug)->setVisible(fAllowToShowMenuDebug);1610 action(UIActionIndexRT_M_Debug)->setVisible(fAllowToShowMenuDebug); 1758 1611 if (fAllowToShowMenuDebug) 1759 m_mainMenus << gpActionPool->action(UIActionIndexRT_M_Debug)->menu();1612 m_mainMenus << action(UIActionIndexRT_M_Debug)->menu(); 1760 1613 updateMenuDebug(); 1761 1614 #endif /* VBOX_WITH_DEBUGGER_GUI */ … … 1763 1616 /* 'Help' menu: */ 1764 1617 const bool fAllowToShowMenuHelp = isAllowedInMenuBar(RuntimeMenuType_Help); 1765 gpActionPool->action(UIActionIndex_Menu_Help)->setVisible(fAllowToShowMenuHelp);1618 action(UIActionIndex_Menu_Help)->setVisible(fAllowToShowMenuHelp); 1766 1619 if (fAllowToShowMenuHelp) 1767 m_mainMenus << gpActionPool->action(UIActionIndex_Menu_Help)->menu();1620 m_mainMenus << action(UIActionIndex_Menu_Help)->menu(); 1768 1621 updateMenuHelp(); 1769 1622 } … … 1945 1798 { 1946 1799 /* Get corresponding menu: */ 1947 QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_View)->menu();1800 QMenu *pMenu = action(UIActionIndexRT_M_View)->menu(); 1948 1801 AssertPtrReturnVoid(pMenu); 1949 1802 /* Clear contents: */ … … 1957 1810 1958 1811 /* 'Fullscreen' action: */ 1959 gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen)->setEnabled(fIsAllowToShowActionFullscreen);1812 action(UIActionIndexRT_M_View_T_Fullscreen)->setEnabled(fIsAllowToShowActionFullscreen); 1960 1813 if (fIsAllowToShowActionFullscreen) 1961 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen));1814 pMenu->addAction(action(UIActionIndexRT_M_View_T_Fullscreen)); 1962 1815 1963 1816 /* 'Seamless' action: */ 1964 gpActionPool->action(UIActionIndexRT_M_View_T_Seamless)->setEnabled(fIsAllowToShowActionSeamless);1817 action(UIActionIndexRT_M_View_T_Seamless)->setEnabled(fIsAllowToShowActionSeamless); 1965 1818 if (fIsAllowToShowActionSeamless) 1966 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_View_T_Seamless));1819 pMenu->addAction(action(UIActionIndexRT_M_View_T_Seamless)); 1967 1820 1968 1821 /* 'Scale' action: */ 1969 gpActionPool->action(UIActionIndexRT_M_View_T_Scale)->setEnabled(fIsAllowToShowActionScale);1822 action(UIActionIndexRT_M_View_T_Scale)->setEnabled(fIsAllowToShowActionScale); 1970 1823 if (fIsAllowToShowActionScale) 1971 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_View_T_Scale));1824 pMenu->addAction(action(UIActionIndexRT_M_View_T_Scale)); 1972 1825 1973 1826 /* Visual representation mode separator: */ … … 1981 1834 /* 'Adjust Window' action: */ 1982 1835 const bool fAllowToShowActionAdjustWindow = isAllowedInMenuView(RuntimeMenuViewActionType_AdjustWindow); 1983 gpActionPool->action(UIActionIndexRT_M_View_S_AdjustWindow)->setEnabled(fAllowToShowActionAdjustWindow);1836 action(UIActionIndexRT_M_View_S_AdjustWindow)->setEnabled(fAllowToShowActionAdjustWindow); 1984 1837 if (fAllowToShowActionAdjustWindow) 1985 1838 { 1986 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_View_S_AdjustWindow));1839 pMenu->addAction(action(UIActionIndexRT_M_View_S_AdjustWindow)); 1987 1840 fSeparator1 = true; 1988 1841 } … … 1990 1843 /* 'Guest Autoresize' action: */ 1991 1844 const bool fAllowToShowActionGuestAutoresize = isAllowedInMenuView(RuntimeMenuViewActionType_GuestAutoresize); 1992 gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize)->setEnabled(fAllowToShowActionGuestAutoresize);1845 action(UIActionIndexRT_M_View_T_GuestAutoresize)->setEnabled(fAllowToShowActionGuestAutoresize); 1993 1846 if (fAllowToShowActionGuestAutoresize) 1994 1847 { 1995 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize));1848 pMenu->addAction(action(UIActionIndexRT_M_View_T_GuestAutoresize)); 1996 1849 fSeparator1 = true; 1997 1850 } … … 2007 1860 /* 'Status Bar' submenu: */ 2008 1861 const bool fAllowToShowActionStatusBar = isAllowedInMenuView(RuntimeMenuViewActionType_StatusBar); 2009 gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar)->setEnabled(fAllowToShowActionStatusBar);1862 action(UIActionIndexRT_M_View_M_StatusBar)->setEnabled(fAllowToShowActionStatusBar); 2010 1863 if (fAllowToShowActionStatusBar) 2011 1864 { 2012 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar));1865 pMenu->addAction(action(UIActionIndexRT_M_View_M_StatusBar)); 2013 1866 fSeparator2 = true; 2014 1867 } … … 2036 1889 { 2037 1890 /* Get corresponding menu: */ 2038 QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_ViewPopup)->menu();1891 QMenu *pMenu = action(UIActionIndexRT_M_ViewPopup)->menu(); 2039 1892 AssertPtrReturnVoid(pMenu); 2040 1893 /* Clear contents: */ … … 2047 1900 /* 'Adjust Window' action: */ 2048 1901 const bool fAllowToShowActionAdjustWindow = isAllowedInMenuView(RuntimeMenuViewActionType_AdjustWindow); 2049 gpActionPool->action(UIActionIndexRT_M_View_S_AdjustWindow)->setEnabled(fAllowToShowActionAdjustWindow);1902 action(UIActionIndexRT_M_View_S_AdjustWindow)->setEnabled(fAllowToShowActionAdjustWindow); 2050 1903 if (fAllowToShowActionAdjustWindow) 2051 1904 { 2052 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_View_S_AdjustWindow));1905 pMenu->addAction(action(UIActionIndexRT_M_View_S_AdjustWindow)); 2053 1906 fSeparator1 = true; 2054 1907 } … … 2056 1909 /* 'Guest Autoresize' action: */ 2057 1910 const bool fAllowToShowActionGuestAutoresize = isAllowedInMenuView(RuntimeMenuViewActionType_GuestAutoresize); 2058 gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize)->setEnabled(fAllowToShowActionGuestAutoresize);1911 action(UIActionIndexRT_M_View_T_GuestAutoresize)->setEnabled(fAllowToShowActionGuestAutoresize); 2059 1912 if (fAllowToShowActionGuestAutoresize) 2060 1913 { 2061 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize));1914 pMenu->addAction(action(UIActionIndexRT_M_View_T_GuestAutoresize)); 2062 1915 fSeparator1 = true; 2063 1916 } … … 2084 1937 { 2085 1938 /* Get corresponding menu: */ 2086 QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar)->menu();1939 QMenu *pMenu = action(UIActionIndexRT_M_View_M_StatusBar)->menu(); 2087 1940 AssertPtrReturnVoid(pMenu); 2088 1941 /* Clear contents: */ … … 2091 1944 /* 'Status Bar Settings' action: */ 2092 1945 const bool fAllowToShowActionStatusBarSettings = isAllowedInMenuView(RuntimeMenuViewActionType_StatusBarSettings); 2093 gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings)->setEnabled(fAllowToShowActionStatusBarSettings);1946 action(UIActionIndexRT_M_View_M_StatusBar_S_Settings)->setEnabled(fAllowToShowActionStatusBarSettings); 2094 1947 if (fAllowToShowActionStatusBarSettings) 2095 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings));1948 pMenu->addAction(action(UIActionIndexRT_M_View_M_StatusBar_S_Settings)); 2096 1949 2097 1950 /* 'Toggle Status Bar' action: */ 2098 1951 const bool fAllowToShowActionToggleStatusBar = isAllowedInMenuView(RuntimeMenuViewActionType_ToggleStatusBar); 2099 gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->setEnabled(fAllowToShowActionToggleStatusBar);1952 action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->setEnabled(fAllowToShowActionToggleStatusBar); 2100 1953 if (fAllowToShowActionToggleStatusBar) 2101 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility));1954 pMenu->addAction(action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)); 2102 1955 } 2103 1956 … … 2161 2014 { 2162 2015 /* Get corresponding menu: */ 2163 QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_Devices)->menu();2016 QMenu *pMenu = action(UIActionIndexRT_M_Devices)->menu(); 2164 2017 AssertPtrReturnVoid(pMenu); 2165 2018 /* Clear contents: */ … … 2172 2025 /* 'Hard Drives' submenu: */ 2173 2026 const bool fAllowToShowActionHardDrives = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_HardDrives); 2174 gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives)->setEnabled(fAllowToShowActionHardDrives);2027 action(UIActionIndexRT_M_Devices_M_HardDrives)->setEnabled(fAllowToShowActionHardDrives); 2175 2028 if (fAllowToShowActionHardDrives) 2176 2029 { 2177 // pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives));2030 // pMenu->addAction(action(UIActionIndexRT_M_Devices_M_HardDrives)); 2178 2031 // fSeparator1 = true; 2179 2032 } … … 2182 2035 /* 'Optical Devices' submenu: */ 2183 2036 const bool fAllowToShowActionOpticalDevices = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_OpticalDevices); 2184 gpActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices)->setEnabled(fAllowToShowActionOpticalDevices);2037 action(UIActionIndexRT_M_Devices_M_OpticalDevices)->setEnabled(fAllowToShowActionOpticalDevices); 2185 2038 if (fAllowToShowActionOpticalDevices) 2186 2039 { 2187 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices));2040 pMenu->addAction(action(UIActionIndexRT_M_Devices_M_OpticalDevices)); 2188 2041 fSeparator1 = true; 2189 2042 } … … 2191 2044 /* 'Floppy Devices' submenu: */ 2192 2045 const bool fAllowToShowActionFloppyDevices = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_FloppyDevices); 2193 gpActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices)->setEnabled(fAllowToShowActionFloppyDevices);2046 action(UIActionIndexRT_M_Devices_M_FloppyDevices)->setEnabled(fAllowToShowActionFloppyDevices); 2194 2047 if (fAllowToShowActionFloppyDevices) 2195 2048 { 2196 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices));2049 pMenu->addAction(action(UIActionIndexRT_M_Devices_M_FloppyDevices)); 2197 2050 fSeparator1 = true; 2198 2051 } … … 2200 2053 /* 'USB Devices' submenu: */ 2201 2054 const bool fAllowToShowActionUSBDevices = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_USBDevices); 2202 gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices)->setEnabled(fAllowToShowActionUSBDevices);2055 action(UIActionIndexRT_M_Devices_M_USBDevices)->setEnabled(fAllowToShowActionUSBDevices); 2203 2056 if (fAllowToShowActionUSBDevices) 2204 2057 { 2205 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices));2058 pMenu->addAction(action(UIActionIndexRT_M_Devices_M_USBDevices)); 2206 2059 fSeparator1 = true; 2207 2060 } … … 2210 2063 /* 'Web Cams' submenu: */ 2211 2064 const bool fAllowToShowActionWebCams = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_WebCams); 2212 gpActionPool->action(UIActionIndexRT_M_Devices_M_WebCams)->setEnabled(fAllowToShowActionWebCams);2065 action(UIActionIndexRT_M_Devices_M_WebCams)->setEnabled(fAllowToShowActionWebCams); 2213 2066 if (fAllowToShowActionWebCams) 2214 2067 { 2215 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_WebCams));2068 pMenu->addAction(action(UIActionIndexRT_M_Devices_M_WebCams)); 2216 2069 fSeparator1 = true; 2217 2070 } … … 2219 2072 /* 'Shared Clipboard' submenu: */ 2220 2073 const bool fAllowToShowActionSharedClipboard = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_SharedClipboard); 2221 gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedClipboard)->setEnabled(fAllowToShowActionSharedClipboard);2074 action(UIActionIndexRT_M_Devices_M_SharedClipboard)->setEnabled(fAllowToShowActionSharedClipboard); 2222 2075 if (fAllowToShowActionSharedClipboard) 2223 2076 { 2224 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedClipboard));2077 pMenu->addAction(action(UIActionIndexRT_M_Devices_M_SharedClipboard)); 2225 2078 fSeparator1 = true; 2226 2079 } … … 2228 2081 /* 'Drag&Drop' submenu: */ 2229 2082 const bool fAllowToShowActionDragAndDrop = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_DragAndDrop); 2230 gpActionPool->action(UIActionIndexRT_M_Devices_M_DragAndDrop)->setEnabled(fAllowToShowActionDragAndDrop);2083 action(UIActionIndexRT_M_Devices_M_DragAndDrop)->setEnabled(fAllowToShowActionDragAndDrop); 2231 2084 if (fAllowToShowActionDragAndDrop) 2232 2085 { 2233 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_DragAndDrop));2086 pMenu->addAction(action(UIActionIndexRT_M_Devices_M_DragAndDrop)); 2234 2087 fSeparator1 = true; 2235 2088 } … … 2237 2090 /* 'Network' submenu: */ 2238 2091 const bool fAllowToShowActionNetwork = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_Network); 2239 gpActionPool->action(UIActionIndexRT_M_Devices_M_Network)->setEnabled(fAllowToShowActionNetwork);2092 action(UIActionIndexRT_M_Devices_M_Network)->setEnabled(fAllowToShowActionNetwork); 2240 2093 if (fAllowToShowActionNetwork) 2241 2094 { 2242 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_Network));2095 pMenu->addAction(action(UIActionIndexRT_M_Devices_M_Network)); 2243 2096 fSeparator1 = true; 2244 2097 } … … 2247 2100 /* 'Shared Folders' submenu: */ 2248 2101 const bool fAllowToShowActionSharedFolders = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_SharedFolders); 2249 gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders)->setEnabled(fAllowToShowActionSharedFolders);2102 action(UIActionIndexRT_M_Devices_M_SharedFolders)->setEnabled(fAllowToShowActionSharedFolders); 2250 2103 if (fAllowToShowActionSharedFolders) 2251 2104 { 2252 // pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders));2105 // pMenu->addAction(action(UIActionIndexRT_M_Devices_M_SharedFolders)); 2253 2106 // fSeparator1 = true; 2254 2107 } … … 2265 2118 /* 'VRDE Server' action: */ 2266 2119 const bool fAllowToShowActionVRDEServer = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_VRDEServer); 2267 gpActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer)->setEnabled(fAllowToShowActionVRDEServer);2120 action(UIActionIndexRT_M_Devices_T_VRDEServer)->setEnabled(fAllowToShowActionVRDEServer); 2268 2121 if (fAllowToShowActionVRDEServer) 2269 2122 { 2270 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer));2123 pMenu->addAction(action(UIActionIndexRT_M_Devices_T_VRDEServer)); 2271 2124 fSeparator2 = true; 2272 2125 } … … 2274 2127 /* 'Video Capture' action: */ 2275 2128 const bool fAllowToShowActionVideoCapture = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_VideoCapture); 2276 gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start)->setEnabled(fAllowToShowActionVideoCapture);2129 action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start)->setEnabled(fAllowToShowActionVideoCapture); 2277 2130 if (fAllowToShowActionVideoCapture) 2278 2131 { 2279 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start));2132 pMenu->addAction(action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start)); 2280 2133 fSeparator2 = true; 2281 2134 } … … 2289 2142 /* Install Guest Tools action: */ 2290 2143 const bool fAllowToShowActionInstallGuestTools = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_InstallGuestTools); 2291 gpActionPool->action(UIActionIndexRT_M_Devices_S_InstallGuestTools)->setEnabled(fAllowToShowActionInstallGuestTools);2144 action(UIActionIndexRT_M_Devices_S_InstallGuestTools)->setEnabled(fAllowToShowActionInstallGuestTools); 2292 2145 if (fAllowToShowActionInstallGuestTools) 2293 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_S_InstallGuestTools));2146 pMenu->addAction(action(UIActionIndexRT_M_Devices_S_InstallGuestTools)); 2294 2147 } 2295 2148 … … 2297 2150 { 2298 2151 /* Get corresponding menu: */ 2299 QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives)->menu();2152 QMenu *pMenu = action(UIActionIndexRT_M_Devices_M_HardDrives)->menu(); 2300 2153 AssertPtrReturnVoid(pMenu); 2301 2154 /* Clear contents: */ … … 2304 2157 /* 'Hard Drives Settings' action: */ 2305 2158 const bool fAllowToShowActionHardDrivesSettings = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_HardDrivesSettings); 2306 gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings)->setEnabled(fAllowToShowActionHardDrivesSettings);2159 action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings)->setEnabled(fAllowToShowActionHardDrivesSettings); 2307 2160 if (fAllowToShowActionHardDrivesSettings) 2308 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings));2161 pMenu->addAction(action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings)); 2309 2162 } 2310 2163 … … 2312 2165 { 2313 2166 /* Get corresponding menu: */ 2314 QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices)->menu();2167 QMenu *pMenu = action(UIActionIndexRT_M_Devices_M_USBDevices)->menu(); 2315 2168 AssertPtrReturnVoid(pMenu); 2316 2169 /* Clear contents: */ … … 2319 2172 /* 'USB Devices Settings' action: */ 2320 2173 const bool fAllowToShowActionUSBDevicesSettings = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_USBDevicesSettings); 2321 gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings)->setEnabled(fAllowToShowActionUSBDevicesSettings);2174 action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings)->setEnabled(fAllowToShowActionUSBDevicesSettings); 2322 2175 if (fAllowToShowActionUSBDevicesSettings) 2323 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings));2176 pMenu->addAction(action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings)); 2324 2177 } 2325 2178 … … 2327 2180 { 2328 2181 /* Get corresponding menu: */ 2329 QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_Network)->menu();2182 QMenu *pMenu = action(UIActionIndexRT_M_Devices_M_Network)->menu(); 2330 2183 AssertPtrReturnVoid(pMenu); 2331 2184 /* Clear contents: */ … … 2334 2187 /* 'Network Settings' action: */ 2335 2188 const bool fAllowToShowActionNetworkSettings = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_NetworkSettings); 2336 gpActionPool->action(UIActionIndexRT_M_Devices_M_Network_S_Settings)->setEnabled(fAllowToShowActionNetworkSettings);2189 action(UIActionIndexRT_M_Devices_M_Network_S_Settings)->setEnabled(fAllowToShowActionNetworkSettings); 2337 2190 if (fAllowToShowActionNetworkSettings) 2338 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_Network_S_Settings));2191 pMenu->addAction(action(UIActionIndexRT_M_Devices_M_Network_S_Settings)); 2339 2192 } 2340 2193 … … 2342 2195 { 2343 2196 /* Get corresponding menu: */ 2344 QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders)->menu();2197 QMenu *pMenu = action(UIActionIndexRT_M_Devices_M_SharedFolders)->menu(); 2345 2198 AssertPtrReturnVoid(pMenu); 2346 2199 /* Clear contents: */ … … 2349 2202 /* 'Shared Folders Settings' action: */ 2350 2203 const bool fAllowToShowActionSharedFoldersSettings = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_SharedFoldersSettings); 2351 gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings)->setEnabled(fAllowToShowActionSharedFoldersSettings);2204 action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings)->setEnabled(fAllowToShowActionSharedFoldersSettings); 2352 2205 if (fAllowToShowActionSharedFoldersSettings) 2353 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings));2206 pMenu->addAction(action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings)); 2354 2207 } 2355 2208 … … 2357 2210 { 2358 2211 /* Get corresponding menu: */ 2359 QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture)->menu();2212 QMenu *pMenu = action(UIActionIndexRT_M_Devices_M_VideoCapture)->menu(); 2360 2213 AssertPtrReturnVoid(pMenu); 2361 2214 /* Clear contents: */ … … 2364 2217 /* 'Video Capture Settings' action: */ 2365 2218 const bool fAllowToShowActionVideoCaptureSettings = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_VideoCaptureSettings); 2366 gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings)->setEnabled(fAllowToShowActionVideoCaptureSettings);2219 action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings)->setEnabled(fAllowToShowActionVideoCaptureSettings); 2367 2220 if (fAllowToShowActionVideoCaptureSettings) 2368 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings));2221 pMenu->addAction(action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings)); 2369 2222 } 2370 2223 … … 2373 2226 { 2374 2227 /* Get corresponding menu: */ 2375 QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_Debug)->menu();2228 QMenu *pMenu = action(UIActionIndexRT_M_Debug)->menu(); 2376 2229 AssertPtrReturnVoid(pMenu); 2377 2230 /* Clear contents: */ … … 2380 2233 /* 'Statistics' action: */ 2381 2234 const bool fAllowToShowActionStatistics = isAllowedInMenuDebug(RuntimeMenuDebuggerActionType_Statistics); 2382 gpActionPool->action(UIActionIndexRT_M_Debug_S_ShowStatistics)->setEnabled(fAllowToShowActionStatistics);2235 action(UIActionIndexRT_M_Debug_S_ShowStatistics)->setEnabled(fAllowToShowActionStatistics); 2383 2236 if (fAllowToShowActionStatistics) 2384 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_Debug_S_ShowStatistics));2237 pMenu->addAction(action(UIActionIndexRT_M_Debug_S_ShowStatistics)); 2385 2238 2386 2239 /* 'Command Line' action: */ 2387 2240 const bool fAllowToShowActionCommandLine = isAllowedInMenuDebug(RuntimeMenuDebuggerActionType_CommandLine); 2388 gpActionPool->action(UIActionIndexRT_M_Debug_S_ShowCommandLine)->setEnabled(fAllowToShowActionCommandLine);2241 action(UIActionIndexRT_M_Debug_S_ShowCommandLine)->setEnabled(fAllowToShowActionCommandLine); 2389 2242 if (fAllowToShowActionCommandLine) 2390 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_Debug_S_ShowCommandLine));2243 pMenu->addAction(action(UIActionIndexRT_M_Debug_S_ShowCommandLine)); 2391 2244 2392 2245 /* 'Logging' action: */ 2393 2246 const bool fAllowToShowActionLogging = isAllowedInMenuDebug(RuntimeMenuDebuggerActionType_Logging); 2394 gpActionPool->action(UIActionIndexRT_M_Debug_T_Logging)->setEnabled(fAllowToShowActionLogging);2247 action(UIActionIndexRT_M_Debug_T_Logging)->setEnabled(fAllowToShowActionLogging); 2395 2248 if (fAllowToShowActionLogging) 2396 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_Debug_T_Logging));2249 pMenu->addAction(action(UIActionIndexRT_M_Debug_T_Logging)); 2397 2250 2398 2251 /* 'Log Dialog' action: */ 2399 2252 const bool fAllowToShowActionLogDialog = isAllowedInMenuDebug(RuntimeMenuDebuggerActionType_LogDialog); 2400 gpActionPool->action(UIActionIndex_Simple_LogDialog)->setEnabled(fAllowToShowActionLogDialog);2253 action(UIActionIndex_Simple_LogDialog)->setEnabled(fAllowToShowActionLogDialog); 2401 2254 if (fAllowToShowActionLogDialog) 2402 pMenu->addAction( gpActionPool->action(UIActionIndex_Simple_LogDialog));2255 pMenu->addAction(action(UIActionIndex_Simple_LogDialog)); 2403 2256 } 2404 2257 #endif /* VBOX_WITH_DEBUGGER_GUI */ … … 2407 2260 { 2408 2261 /* Get corresponding menu: */ 2409 QMenu *pMenu = gpActionPool->action(UIActionIndex_Menu_Help)->menu();2262 QMenu *pMenu = action(UIActionIndex_Menu_Help)->menu(); 2410 2263 AssertPtrReturnVoid(pMenu); 2411 2264 /* Clear contents: */ … … 2418 2271 /* 'Contents' action: */ 2419 2272 const bool fAllowToShowActionContents = isAllowedInMenuHelp(RuntimeMenuHelpActionType_Contents); 2420 gpActionPool->action(UIActionIndex_Simple_Contents)->setEnabled(fAllowToShowActionContents);2273 action(UIActionIndex_Simple_Contents)->setEnabled(fAllowToShowActionContents); 2421 2274 if (fAllowToShowActionContents) 2422 2275 { 2423 pMenu->addAction( gpActionPool->action(UIActionIndex_Simple_Contents));2424 VBoxGlobal::connect( gpActionPool->action(UIActionIndex_Simple_Contents), SIGNAL(triggered()),2276 pMenu->addAction(action(UIActionIndex_Simple_Contents)); 2277 VBoxGlobal::connect(action(UIActionIndex_Simple_Contents), SIGNAL(triggered()), 2425 2278 &msgCenter(), SLOT(sltShowHelpHelpDialog()), Qt::UniqueConnection); 2426 2279 fSeparator1 = true; … … 2429 2282 /* 'Web Site' action: */ 2430 2283 const bool fAllowToShowActionWebSite = isAllowedInMenuHelp(RuntimeMenuHelpActionType_WebSite); 2431 gpActionPool->action(RuntimeMenuHelpActionType_WebSite)->setEnabled(fAllowToShowActionWebSite);2284 action(RuntimeMenuHelpActionType_WebSite)->setEnabled(fAllowToShowActionWebSite); 2432 2285 if (fAllowToShowActionWebSite) 2433 2286 { 2434 pMenu->addAction( gpActionPool->action(UIActionIndex_Simple_WebSite));2435 VBoxGlobal::connect( gpActionPool->action(UIActionIndex_Simple_WebSite), SIGNAL(triggered()),2287 pMenu->addAction(action(UIActionIndex_Simple_WebSite)); 2288 VBoxGlobal::connect(action(UIActionIndex_Simple_WebSite), SIGNAL(triggered()), 2436 2289 &msgCenter(), SLOT(sltShowHelpWebDialog()), Qt::UniqueConnection); 2437 2290 fSeparator1 = true; … … 2448 2301 /* 'Reset Warnings' action: */ 2449 2302 const bool fAllowToShowActionResetWarnings = isAllowedInMenuHelp(RuntimeMenuHelpActionType_ResetWarnings); 2450 gpActionPool->action(UIActionIndex_Simple_ResetWarnings)->setEnabled(fAllowToShowActionResetWarnings);2303 action(UIActionIndex_Simple_ResetWarnings)->setEnabled(fAllowToShowActionResetWarnings); 2451 2304 if (fAllowToShowActionResetWarnings) 2452 2305 { 2453 pMenu->addAction( gpActionPool->action(UIActionIndex_Simple_ResetWarnings));2454 VBoxGlobal::connect( gpActionPool->action(UIActionIndex_Simple_ResetWarnings), SIGNAL(triggered()),2306 pMenu->addAction(action(UIActionIndex_Simple_ResetWarnings)); 2307 VBoxGlobal::connect(action(UIActionIndex_Simple_ResetWarnings), SIGNAL(triggered()), 2455 2308 &msgCenter(), SLOT(sltResetSuppressedMessages()), Qt::UniqueConnection); 2456 2309 fSeparator2 = true; … … 2470 2323 /* 'Network Manager' action: */ 2471 2324 const bool fAllowToShowActionNetworkManager = isAllowedInMenuHelp(RuntimeMenuHelpActionType_NetworkAccessManager); 2472 gpActionPool->action(UIActionIndex_Simple_NetworkAccessManager)->setEnabled(fAllowToShowActionNetworkManager);2325 action(UIActionIndex_Simple_NetworkAccessManager)->setEnabled(fAllowToShowActionNetworkManager); 2473 2326 if (fAllowToShowActionNetworkManager) 2474 2327 { 2475 pMenu->addAction( gpActionPool->action(UIActionIndex_Simple_NetworkAccessManager));2476 VBoxGlobal::connect( gpActionPool->action(UIActionIndex_Simple_NetworkAccessManager), SIGNAL(triggered()),2328 pMenu->addAction(action(UIActionIndex_Simple_NetworkAccessManager)); 2329 VBoxGlobal::connect(action(UIActionIndex_Simple_NetworkAccessManager), SIGNAL(triggered()), 2477 2330 gNetworkManager, SLOT(show()), Qt::UniqueConnection); 2478 2331 # ifndef Q_WS_MAC … … 2496 2349 isAllowedInMenuHelp(RuntimeMenuHelpActionType_About); 2497 2350 #endif /* Q_WS_MAC */ 2498 gpActionPool->action(UIActionIndex_Simple_About)->setEnabled(fAllowToShowActionAbout);2351 action(UIActionIndex_Simple_About)->setEnabled(fAllowToShowActionAbout); 2499 2352 if (fAllowToShowActionAbout) 2500 2353 { 2501 pMenu->addAction( gpActionPool->action(UIActionIndex_Simple_About));2502 VBoxGlobal::connect( gpActionPool->action(UIActionIndex_Simple_About), SIGNAL(triggered()),2354 pMenu->addAction(action(UIActionIndex_Simple_About)); 2355 VBoxGlobal::connect(action(UIActionIndex_Simple_About), SIGNAL(triggered()), 2503 2356 &msgCenter(), SLOT(sltShowHelpAboutDialog()), Qt::UniqueConnection); 2504 2357 } … … 2511 2364 isAllowedInMenuHelp(RuntimeMenuHelpActionType_Preferences); 2512 2365 #endif /* Q_WS_MAC */ 2513 gpActionPool->action(UIActionIndex_Simple_Preferences)->setEnabled(fAllowToShowActionPreferences);2366 action(UIActionIndex_Simple_Preferences)->setEnabled(fAllowToShowActionPreferences); 2514 2367 if (fAllowToShowActionPreferences) 2515 pMenu->addAction( gpActionPool->action(UIActionIndex_Simple_Preferences));2368 pMenu->addAction(action(UIActionIndex_Simple_Preferences)); 2516 2369 } 2517 2370 … … 2521 2374 foreach (const int iActionPoolKey, m_pool.keys()) 2522 2375 m_pool[iActionPoolKey]->retranslateUi(); 2523 /* Re-apply Runtime UI shortcuts: */ 2524 sltApplyShortcuts(); 2525 /* Temporary create Selector UI pool to do the same: */ 2526 UIActionPool::createTemporary(UIActionPoolType_Selector); 2376 /* Update Runtime UI shortcuts: */ 2377 updateShortcuts(); 2378 /* Create temporary Selector UI pool to do the same: */ 2379 if (!m_fTemporary) 2380 UIActionPool::createTemporary(UIActionPoolType_Selector); 2527 2381 } 2528 2382 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.h
r52186 r52202 174 174 protected: 175 175 176 /** Constructor. */ 177 UIActionPoolRuntime(); 176 /** Constructor, 177 * @param fTemporary is used to determine whether this action-pool is temporary, 178 * which can be created to re-initialize shortcuts-pool. */ 179 UIActionPoolRuntime(bool fTemporary = false); 178 180 179 181 /** Prepare pool routine. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp
r52195 r52202 840 840 } 841 841 842 /* Action-pool getter: */ 843 UIActionPool* UIKeyboardHandler::actionPool() const 844 { 845 return machineLogic()->actionPool(); 846 } 847 842 848 /* UI Session getter: */ 843 849 UISession* UIKeyboardHandler::uisession() const … … 1003 1009 } 1004 1010 /* Process hot keys not processed in keyEvent() (as in case of non-alphanumeric keys): */ 1005 gpActionPool->processHotKey(QKeySequence(pKeyEvent->key()));1011 actionPool()->processHotKey(QKeySequence(pKeyEvent->key())); 1006 1012 } 1007 1013 else if (!m_bIsHostComboPressed && pEvent->type() == QEvent::KeyRelease) … … 1582 1588 symbol = 0; 1583 1589 if (symbol) 1584 fWasProcessed = gpActionPool->processHotKey(QKeySequence((Qt::UNICODE_ACCEL + QChar(symbol).toUpper().unicode())));1590 fWasProcessed = actionPool()->processHotKey(QKeySequence((Qt::UNICODE_ACCEL + QChar(symbol).toUpper().unicode()))); 1585 1591 } 1586 1592 delete[] pList; … … 1600 1606 { 1601 1607 QChar qtSymbol = QString::fromLocal8Bit(&symbol, 1)[0]; 1602 fWasProcessed = gpActionPool->processHotKey(QKeySequence((Qt::UNICODE_ACCEL + qtSymbol.toUpper().unicode())));1608 fWasProcessed = actionPool()->processHotKey(QKeySequence((Qt::UNICODE_ACCEL + qtSymbol.toUpper().unicode()))); 1603 1609 } 1604 1610 } … … 1608 1614 Q_UNUSED(iHotKey); 1609 1615 if (pHotKey && pHotKey[0] && !pHotKey[1]) 1610 fWasProcessed = gpActionPool->processHotKey(QKeySequence(Qt::UNICODE_ACCEL + QChar(pHotKey[0]).toUpper().unicode()));1616 fWasProcessed = actionPool()->processHotKey(QKeySequence(Qt::UNICODE_ACCEL + QChar(pHotKey[0]).toUpper().unicode())); 1611 1617 #endif /* Q_WS_MAC */ 1612 1618 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.h
r52014 r52202 38 38 class CSession; 39 39 class UISession; 40 class UIActionPool; 40 41 class UIMachineLogic; 41 42 class UIMachineWindow; … … 115 116 /* Common getters: */ 116 117 UIMachineLogic* machineLogic() const; 118 UIActionPool* actionPool() const; 117 119 UISession* uisession() const; 118 120 CSession& session() const; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r52200 r52202 234 234 } 235 235 236 UIActionPool* UIMachineLogic::actionPool() const 237 { 238 return uisession()->actionPool(); 239 } 240 236 241 CSession& UIMachineLogic::session() const 237 242 { … … 447 452 case KMachineState_TeleportingPausedVM: 448 453 { 449 QAction *pPauseAction = gpActionPool->action(UIActionIndexRT_M_Machine_T_Pause);454 QAction *pPauseAction = actionPool()->action(UIActionIndexRT_M_Machine_T_Pause); 450 455 if (!pPauseAction->isChecked()) 451 456 { … … 461 466 case KMachineState_LiveSnapshotting: 462 467 { 463 QAction *pPauseAction = gpActionPool->action(UIActionIndexRT_M_Machine_T_Pause);468 QAction *pPauseAction = actionPool()->action(UIActionIndexRT_M_Machine_T_Pause); 464 469 if (pPauseAction->isChecked()) 465 470 { … … 509 514 { 510 515 /* Update action states: */ 511 gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize)->setEnabled(uisession()->isGuestSupportsGraphics());512 gpActionPool->action(UIActionIndexRT_M_View_T_Seamless)->setEnabled(uisession()->isVisualStateAllowed(UIVisualStateType_Seamless) &&516 actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize)->setEnabled(uisession()->isGuestSupportsGraphics()); 517 actionPool()->action(UIActionIndexRT_M_View_T_Seamless)->setEnabled(uisession()->isVisualStateAllowed(UIVisualStateType_Seamless) && 513 518 uisession()->isGuestSupportsSeamless()); 514 519 } … … 526 531 527 532 /* Update action state: */ 528 QAction *pAction = gpActionPool->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration);533 QAction *pAction = actionPool()->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration); 529 534 pAction->setEnabled(fIsMouseSupportsAbsolute && fIsMouseSupportsRelative && !fIsMouseHostCursorNeeded); 530 535 if (fIsMouseHostCursorNeeded) … … 827 832 828 833 /* Move actions into running actions group: */ 829 m_pRunningActions->addAction( gpActionPool->action(UIActionIndexRT_M_Machine_S_TypeCAD));834 m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_S_TypeCAD)); 830 835 #ifdef Q_WS_X11 831 m_pRunningActions->addAction( gpActionPool->action(UIActionIndexRT_M_Machine_S_TypeCABS));836 m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_S_TypeCABS)); 832 837 #endif 833 m_pRunningActions->addAction( gpActionPool->action(UIActionIndexRT_M_Machine_S_Reset));834 m_pRunningActions->addAction( gpActionPool->action(UIActionIndexRT_M_Machine_S_Shutdown));835 m_pRunningActions->addAction( gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen));836 m_pRunningActions->addAction( gpActionPool->action(UIActionIndexRT_M_View_T_Seamless));837 m_pRunningActions->addAction( gpActionPool->action(UIActionIndexRT_M_View_T_Scale));838 m_pRunningActions->addAction( gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize));839 m_pRunningActions->addAction( gpActionPool->action(UIActionIndexRT_M_View_S_AdjustWindow));838 m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_S_Reset)); 839 m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_S_Shutdown)); 840 m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen)); 841 m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_View_T_Seamless)); 842 m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_View_T_Scale)); 843 m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize)); 844 m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_View_S_AdjustWindow)); 840 845 841 846 /* Move actions into running-n-paused actions group: */ 842 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Machine_S_Save));843 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Machine_S_Settings));844 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Machine_S_TakeSnapshot));845 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Machine_S_TakeScreenshot));846 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Machine_S_ShowInformation));847 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard));848 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings));849 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Machine_M_Mouse));850 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration));851 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Machine_T_Pause));852 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar));853 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings));854 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility));855 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives));856 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings));857 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices));858 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices));859 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices));860 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings));861 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_WebCams));862 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedClipboard));863 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_DragAndDrop));864 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_Network));865 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_Network_S_Settings));866 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders));867 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings));868 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer));869 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture));870 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start));871 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings));872 m_pRunningOrPausedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_S_InstallGuestTools));847 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_S_Save)); 848 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_S_Settings)); 849 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_S_TakeSnapshot)); 850 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_S_TakeScreenshot)); 851 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_S_ShowInformation)); 852 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_M_Keyboard)); 853 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings)); 854 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_M_Mouse)); 855 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration)); 856 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_T_Pause)); 857 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar)); 858 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings)); 859 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)); 860 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_HardDrives)); 861 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings)); 862 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_OpticalDevices)); 863 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_FloppyDevices)); 864 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_USBDevices)); 865 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings)); 866 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_WebCams)); 867 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_SharedClipboard)); 868 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_DragAndDrop)); 869 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_Network)); 870 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_Network_S_Settings)); 871 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_SharedFolders)); 872 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings)); 873 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_T_VRDEServer)); 874 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_VideoCapture)); 875 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start)); 876 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings)); 877 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_S_InstallGuestTools)); 873 878 874 879 /* Move actions into running-n-paused-n-stucked actions group: */ 875 m_pRunningOrPausedOrStackedActions->addAction( gpActionPool->action(UIActionIndexRT_M_Machine_S_PowerOff));880 m_pRunningOrPausedOrStackedActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_S_PowerOff)); 876 881 } 877 882 … … 879 884 { 880 885 /* 'Machine' actions connections: */ 881 connect( gpActionPool->action(UIActionIndexRT_M_Machine_S_Settings), SIGNAL(triggered()),886 connect(actionPool()->action(UIActionIndexRT_M_Machine_S_Settings), SIGNAL(triggered()), 882 887 this, SLOT(sltOpenVMSettingsDialog())); 883 connect( gpActionPool->action(UIActionIndexRT_M_Machine_S_TakeSnapshot), SIGNAL(triggered()),888 connect(actionPool()->action(UIActionIndexRT_M_Machine_S_TakeSnapshot), SIGNAL(triggered()), 884 889 this, SLOT(sltTakeSnapshot())); 885 connect( gpActionPool->action(UIActionIndexRT_M_Machine_S_TakeScreenshot), SIGNAL(triggered()),890 connect(actionPool()->action(UIActionIndexRT_M_Machine_S_TakeScreenshot), SIGNAL(triggered()), 886 891 this, SLOT(sltTakeScreenshot())); 887 connect( gpActionPool->action(UIActionIndexRT_M_Machine_S_ShowInformation), SIGNAL(triggered()),892 connect(actionPool()->action(UIActionIndexRT_M_Machine_S_ShowInformation), SIGNAL(triggered()), 888 893 this, SLOT(sltShowInformationDialog())); 889 connect( gpActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings), SIGNAL(triggered()),894 connect(actionPool()->action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings), SIGNAL(triggered()), 890 895 this, SLOT(sltShowKeyboardSettings())); 891 connect( gpActionPool->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration), SIGNAL(toggled(bool)),896 connect(actionPool()->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration), SIGNAL(toggled(bool)), 892 897 this, SLOT(sltToggleMouseIntegration(bool))); 893 connect( gpActionPool->action(UIActionIndexRT_M_Machine_S_TypeCAD), SIGNAL(triggered()),898 connect(actionPool()->action(UIActionIndexRT_M_Machine_S_TypeCAD), SIGNAL(triggered()), 894 899 this, SLOT(sltTypeCAD())); 895 900 #ifdef Q_WS_X11 896 connect( gpActionPool->action(UIActionIndexRT_M_Machine_S_TypeCABS), SIGNAL(triggered()),901 connect(actionPool()->action(UIActionIndexRT_M_Machine_S_TypeCABS), SIGNAL(triggered()), 897 902 this, SLOT(sltTypeCABS())); 898 903 #endif 899 connect( gpActionPool->action(UIActionIndexRT_M_Machine_T_Pause), SIGNAL(toggled(bool)),904 connect(actionPool()->action(UIActionIndexRT_M_Machine_T_Pause), SIGNAL(toggled(bool)), 900 905 this, SLOT(sltPause(bool))); 901 connect( gpActionPool->action(UIActionIndexRT_M_Machine_S_Reset), SIGNAL(triggered()),906 connect(actionPool()->action(UIActionIndexRT_M_Machine_S_Reset), SIGNAL(triggered()), 902 907 this, SLOT(sltReset())); 903 connect( gpActionPool->action(UIActionIndexRT_M_Machine_S_Save), SIGNAL(triggered()),908 connect(actionPool()->action(UIActionIndexRT_M_Machine_S_Save), SIGNAL(triggered()), 904 909 this, SLOT(sltSaveState())); 905 connect( gpActionPool->action(UIActionIndexRT_M_Machine_S_Shutdown), SIGNAL(triggered()),910 connect(actionPool()->action(UIActionIndexRT_M_Machine_S_Shutdown), SIGNAL(triggered()), 906 911 this, SLOT(sltShutdown())); 907 connect( gpActionPool->action(UIActionIndexRT_M_Machine_S_PowerOff), SIGNAL(triggered()),912 connect(actionPool()->action(UIActionIndexRT_M_Machine_S_PowerOff), SIGNAL(triggered()), 908 913 this, SLOT(sltPowerOff())); 909 connect( gpActionPool->action(UIActionIndexRT_M_Machine_S_Close), SIGNAL(triggered()),914 connect(actionPool()->action(UIActionIndexRT_M_Machine_S_Close), SIGNAL(triggered()), 910 915 this, SLOT(sltClose())); 911 916 912 917 /* 'View' actions connections: */ 913 connect( gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize), SIGNAL(toggled(bool)),918 connect(actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize), SIGNAL(toggled(bool)), 914 919 this, SLOT(sltToggleGuestAutoresize(bool))); 915 connect( gpActionPool->action(UIActionIndexRT_M_View_S_AdjustWindow), SIGNAL(triggered()),920 connect(actionPool()->action(UIActionIndexRT_M_View_S_AdjustWindow), SIGNAL(triggered()), 916 921 this, SLOT(sltAdjustWindow())); 917 922 918 923 /* 'Devices' actions connections: */ 919 connect( gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings), SIGNAL(triggered()),924 connect(actionPool()->action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings), SIGNAL(triggered()), 920 925 this, SLOT(sltOpenStorageSettingsDialog())); 921 connect( gpActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices)->menu(), SIGNAL(aboutToShow()),926 connect(actionPool()->action(UIActionIndexRT_M_Devices_M_OpticalDevices)->menu(), SIGNAL(aboutToShow()), 922 927 this, SLOT(sltPrepareStorageMenu())); 923 connect( gpActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices)->menu(), SIGNAL(aboutToShow()),928 connect(actionPool()->action(UIActionIndexRT_M_Devices_M_FloppyDevices)->menu(), SIGNAL(aboutToShow()), 924 929 this, SLOT(sltPrepareStorageMenu())); 925 connect( gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices)->menu(), SIGNAL(aboutToShow()),930 connect(actionPool()->action(UIActionIndexRT_M_Devices_M_USBDevices)->menu(), SIGNAL(aboutToShow()), 926 931 this, SLOT(sltPrepareUSBMenu())); 927 connect( gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings), SIGNAL(triggered()),932 connect(actionPool()->action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings), SIGNAL(triggered()), 928 933 this, SLOT(sltOpenUSBDevicesSettingsDialog())); 929 connect( gpActionPool->action(UIActionIndexRT_M_Devices_M_WebCams)->menu(), SIGNAL(aboutToShow()),934 connect(actionPool()->action(UIActionIndexRT_M_Devices_M_WebCams)->menu(), SIGNAL(aboutToShow()), 930 935 this, SLOT(sltPrepareWebCamMenu())); 931 connect( gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedClipboard)->menu(), SIGNAL(aboutToShow()),936 connect(actionPool()->action(UIActionIndexRT_M_Devices_M_SharedClipboard)->menu(), SIGNAL(aboutToShow()), 932 937 this, SLOT(sltPrepareSharedClipboardMenu())); 933 connect( gpActionPool->action(UIActionIndexRT_M_Devices_M_DragAndDrop)->menu(), SIGNAL(aboutToShow()),938 connect(actionPool()->action(UIActionIndexRT_M_Devices_M_DragAndDrop)->menu(), SIGNAL(aboutToShow()), 934 939 this, SLOT(sltPrepareDragAndDropMenu())); 935 connect( gpActionPool->action(UIActionIndexRT_M_Devices_M_Network)->menu(), SIGNAL(aboutToShow()),940 connect(actionPool()->action(UIActionIndexRT_M_Devices_M_Network)->menu(), SIGNAL(aboutToShow()), 936 941 this, SLOT(sltPrepareNetworkMenu())); 937 connect( gpActionPool->action(UIActionIndexRT_M_Devices_M_Network_S_Settings), SIGNAL(triggered()),942 connect(actionPool()->action(UIActionIndexRT_M_Devices_M_Network_S_Settings), SIGNAL(triggered()), 938 943 this, SLOT(sltOpenNetworkSettingsDialog())); 939 connect( gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings), SIGNAL(triggered()),944 connect(actionPool()->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings), SIGNAL(triggered()), 940 945 this, SLOT(sltOpenSharedFoldersSettingsDialog())); 941 connect( gpActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer), SIGNAL(toggled(bool)),946 connect(actionPool()->action(UIActionIndexRT_M_Devices_T_VRDEServer), SIGNAL(toggled(bool)), 942 947 this, SLOT(sltToggleVRDE(bool))); 943 connect( gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start), SIGNAL(toggled(bool)),948 connect(actionPool()->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start), SIGNAL(toggled(bool)), 944 949 this, SLOT(sltToggleVideoCapture(bool))); 945 connect( gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings), SIGNAL(triggered()),950 connect(actionPool()->action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings), SIGNAL(triggered()), 946 951 this, SLOT(sltOpenVideoCaptureOptions())); 947 connect( gpActionPool->action(UIActionIndexRT_M_Devices_S_InstallGuestTools), SIGNAL(triggered()),952 connect(actionPool()->action(UIActionIndexRT_M_Devices_S_InstallGuestTools), SIGNAL(triggered()), 948 953 this, SLOT(sltInstallGuestAdditions())); 949 954 950 955 #ifdef VBOX_WITH_DEBUGGER_GUI 951 956 /* 'Debug' actions connections: */ 952 connect( gpActionPool->action(UIActionIndexRT_M_Debug)->menu(), SIGNAL(aboutToShow()),957 connect(actionPool()->action(UIActionIndexRT_M_Debug)->menu(), SIGNAL(aboutToShow()), 953 958 this, SLOT(sltPrepareDebugMenu())); 954 connect( gpActionPool->action(UIActionIndexRT_M_Debug_S_ShowStatistics), SIGNAL(triggered()),959 connect(actionPool()->action(UIActionIndexRT_M_Debug_S_ShowStatistics), SIGNAL(triggered()), 955 960 this, SLOT(sltShowDebugStatistics())); 956 connect( gpActionPool->action(UIActionIndexRT_M_Debug_S_ShowCommandLine), SIGNAL(triggered()),961 connect(actionPool()->action(UIActionIndexRT_M_Debug_S_ShowCommandLine), SIGNAL(triggered()), 957 962 this, SLOT(sltShowDebugCommandLine())); 958 connect( gpActionPool->action(UIActionIndexRT_M_Debug_T_Logging), SIGNAL(toggled(bool)),963 connect(actionPool()->action(UIActionIndexRT_M_Debug_T_Logging), SIGNAL(toggled(bool)), 959 964 this, SLOT(sltLoggingToggled(bool))); 960 connect( gpActionPool->action(UIActionIndex_Simple_LogDialog), SIGNAL(triggered()),965 connect(actionPool()->action(UIActionIndex_Simple_LogDialog), SIGNAL(triggered()), 961 966 this, SLOT(sltShowLogDialog())); 962 967 #endif /* VBOX_WITH_DEBUGGER_GUI */ 963 968 964 969 /* 'Help' actions connections: */ 965 connect( gpActionPool->action(UIActionIndex_Simple_Preferences), SIGNAL(triggered()),970 connect(actionPool()->action(UIActionIndex_Simple_Preferences), SIGNAL(triggered()), 966 971 this, SLOT(sltShowGlobalPreferences()), Qt::UniqueConnection); 967 972 } … … 986 991 void UIMachineLogic::prepareDock() 987 992 { 988 QMenu *pDockMenu = gpActionPool->action(UIActionIndexRT_M_Dock)->menu();993 QMenu *pDockMenu = actionPool()->action(UIActionIndexRT_M_Dock)->menu(); 989 994 990 995 /* Add all VM menu entries to the dock menu. Leave out close and stuff like 991 996 * this. */ 992 QList<QAction*> actions = gpActionPool->action(UIActionIndexRT_M_Machine)->menu()->actions();997 QList<QAction*> actions = actionPool()->action(UIActionIndexRT_M_Machine)->menu()->actions(); 993 998 for (int i=0; i < actions.size(); ++i) 994 999 if (actions.at(i)->menuRole() == QAction::NoRole) … … 996 1001 pDockMenu->addSeparator(); 997 1002 998 QMenu *pDockSettingsMenu = gpActionPool->action(UIActionIndexRT_M_Dock_M_DockSettings)->menu();1003 QMenu *pDockSettingsMenu = actionPool()->action(UIActionIndexRT_M_Dock_M_DockSettings)->menu(); 999 1004 QActionGroup *pDockPreviewModeGroup = new QActionGroup(this); 1000 QAction *pDockDisablePreview = gpActionPool->action(UIActionIndexRT_M_Dock_M_DockSettings_T_DisableMonitor);1005 QAction *pDockDisablePreview = actionPool()->action(UIActionIndexRT_M_Dock_M_DockSettings_T_DisableMonitor); 1001 1006 pDockPreviewModeGroup->addAction(pDockDisablePreview); 1002 QAction *pDockEnablePreviewMonitor = gpActionPool->action(UIActionIndexRT_M_Dock_M_DockSettings_T_PreviewMonitor);1007 QAction *pDockEnablePreviewMonitor = actionPool()->action(UIActionIndexRT_M_Dock_M_DockSettings_T_PreviewMonitor); 1003 1008 pDockPreviewModeGroup->addAction(pDockEnablePreviewMonitor); 1004 1009 pDockSettingsMenu->addActions(pDockPreviewModeGroup->actions()); … … 1489 1494 } 1490 1495 /* Pass that list to the action-pool to update 'View' menu accordingly: */ 1491 gpActionPool->toRuntime()->setCurrentFrameBufferSizes(frameBufferSizes);1496 actionPool()->toRuntime()->setCurrentFrameBufferSizes(frameBufferSizes); 1492 1497 } 1493 1498 … … 1557 1562 1558 1563 /* Determine device-type: */ 1559 const QMenu *pOpticalDevicesMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices)->menu();1560 const QMenu *pFloppyDevicesMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices)->menu();1564 const QMenu *pOpticalDevicesMenu = actionPool()->action(UIActionIndexRT_M_Devices_M_OpticalDevices)->menu(); 1565 const QMenu *pFloppyDevicesMenu = actionPool()->action(UIActionIndexRT_M_Devices_M_FloppyDevices)->menu(); 1561 1566 const KDeviceType deviceType = pMenu == pOpticalDevicesMenu ? KDeviceType_DVD : 1562 1567 pMenu == pFloppyDevicesMenu ? KDeviceType_Floppy : … … 1626 1631 /* Get and check the sender menu object: */ 1627 1632 QMenu *pMenu = qobject_cast<QMenu*>(sender()); 1628 QMenu *pUSBDevicesMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices)->menu();1633 QMenu *pUSBDevicesMenu = actionPool()->action(UIActionIndexRT_M_Devices_M_USBDevices)->menu(); 1629 1634 AssertMsg(pMenu == pUSBDevicesMenu, ("This slot should only be called on hovering USB menu!\n")); 1630 1635 Q_UNUSED(pUSBDevicesMenu); … … 1634 1639 1635 1640 /* Add settings action: */ 1636 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings));1641 pMenu->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings)); 1637 1642 1638 1643 /* Get current host: */ … … 1698 1703 /* Get and check the sender menu object: */ 1699 1704 QMenu *pMenu = qobject_cast<QMenu*>(sender()); 1700 QMenu *pWebCamMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_WebCams)->menu();1705 QMenu *pWebCamMenu = actionPool()->action(UIActionIndexRT_M_Devices_M_WebCams)->menu(); 1701 1706 AssertReturnVoid(pMenu == pWebCamMenu); Q_UNUSED(pWebCamMenu); 1702 1707 … … 1833 1838 /* Get and check the sender menu object: */ 1834 1839 QMenu *pMenu = qobject_cast<QMenu*>(sender()); 1835 QMenu *pSharedClipboardMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedClipboard)->menu();1840 QMenu *pSharedClipboardMenu = actionPool()->action(UIActionIndexRT_M_Devices_M_SharedClipboard)->menu(); 1836 1841 AssertMsg(pMenu == pSharedClipboardMenu, ("This slot should only be called on hovering Shared Clipboard menu!\n")); 1837 1842 Q_UNUSED(pSharedClipboardMenu); … … 1871 1876 /* Get and check the sender menu object: */ 1872 1877 QMenu *pMenu = qobject_cast<QMenu*>(sender()); 1873 QMenu *pDragAndDropMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_DragAndDrop)->menu();1878 QMenu *pDragAndDropMenu = actionPool()->action(UIActionIndexRT_M_Devices_M_DragAndDrop)->menu(); 1874 1879 AssertMsg(pMenu == pDragAndDropMenu, ("This slot should only be called on hovering Drag'n'drop menu!\n")); 1875 1880 Q_UNUSED(pDragAndDropMenu); … … 1903 1908 /* Get and check 'the sender' menu object: */ 1904 1909 QMenu *pMenu = qobject_cast<QMenu*>(sender()); 1905 QMenu *pNetworkMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_Network)->menu();1910 QMenu *pNetworkMenu = actionPool()->action(UIActionIndexRT_M_Devices_M_Network)->menu(); 1906 1911 AssertReturnVoid(pMenu == pNetworkMenu); 1907 1912 Q_UNUSED(pNetworkMenu); … … 2137 2142 } 2138 2143 } 2139 if (fEnabled != gpActionPool->action(UIActionIndexRT_M_Debug_T_Logging)->isEnabled())2140 gpActionPool->action(UIActionIndexRT_M_Debug_T_Logging)->setEnabled(fEnabled);2141 if (fChecked != gpActionPool->action(UIActionIndexRT_M_Debug_T_Logging)->isChecked())2142 gpActionPool->action(UIActionIndexRT_M_Debug_T_Logging)->setChecked(fChecked);2144 if (fEnabled != actionPool()->action(UIActionIndexRT_M_Debug_T_Logging)->isEnabled()) 2145 actionPool()->action(UIActionIndexRT_M_Debug_T_Logging)->setEnabled(fEnabled); 2146 if (fChecked != actionPool()->action(UIActionIndexRT_M_Debug_T_Logging)->isChecked()) 2147 actionPool()->action(UIActionIndexRT_M_Debug_T_Logging)->setChecked(fChecked); 2143 2148 } 2144 2149 … … 2187 2192 if (!machine.isNull()) 2188 2193 { 2189 bool fEnabled = pAction != gpActionPool->action(UIActionIndexRT_M_Dock_M_DockSettings_T_DisableMonitor);2194 bool fEnabled = pAction != actionPool()->action(UIActionIndexRT_M_Dock_M_DockSettings_T_DisableMonitor); 2190 2195 gEDataManager->setRealtimeDockIconUpdateEnabled(fEnabled, vboxGlobal().managedVMUuid()); 2191 2196 updateDockOverlay(); … … 2298 2303 2299 2304 /* Check that we do NOT handling that already: */ 2300 if ( gpActionPool->action(UIActionIndex_Simple_Preferences)->data().toBool())2305 if (actionPool()->action(UIActionIndex_Simple_Preferences)->data().toBool()) 2301 2306 return; 2302 2307 /* Remember that we handling that already: */ 2303 gpActionPool->action(UIActionIndex_Simple_Preferences)->setData(true);2308 actionPool()->action(UIActionIndex_Simple_Preferences)->setData(true); 2304 2309 2305 2310 /* Create and execute global settings window: */ … … 2311 2316 2312 2317 /* Remember that we do NOT handling that already: */ 2313 gpActionPool->action(UIActionIndex_Simple_Preferences)->setData(false);2318 actionPool()->action(UIActionIndex_Simple_Preferences)->setData(false); 2314 2319 } 2315 2320 … … 2404 2409 { 2405 2410 m_pDbgGuiVT->pfnSetParent(m_pDbgGui, activeMachineWindow()); 2406 m_pDbgGuiVT->pfnSetMenu(m_pDbgGui, gpActionPool->action(UIActionIndexRT_M_Debug));2411 m_pDbgGuiVT->pfnSetMenu(m_pDbgGui, actionPool()->action(UIActionIndexRT_M_Debug)); 2407 2412 dbgAdjustRelativePos(); 2408 2413 return true; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
r52186 r52202 32 32 class QActionGroup; 33 33 class UISession; 34 class UIActionPool; 34 35 class UIKeyboardHandler; 35 36 class UIMouseHandler; … … 71 72 /* Main getters/setters: */ 72 73 UISession* uisession() const { return m_pSession; } 74 UIActionPool* actionPool() const; 73 75 CSession& session() const; 74 76 UIVisualStateType visualStateType() const { return m_visualStateType; } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r52200 r52202 544 544 /* Detach framebuffer from view: */ 545 545 m_pFrameBuffer->setView(NULL); 546 } 547 548 UIActionPool* UIMachineView::actionPool() const 549 { 550 return machineWindow()->actionPool(); 546 551 } 547 552 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
r52179 r52202 36 36 /* Forward declarations: */ 37 37 class UISession; 38 class UIActionPool; 38 39 class UIMachineLogic; 39 40 class UIMachineWindow; … … 145 146 /* Protected getters: */ 146 147 UIMachineWindow* machineWindow() const { return m_pMachineWindow; } 148 UIActionPool* actionPool() const; 147 149 UIMachineLogic* machineLogic() const; 148 150 UISession* uisession() const; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
r52179 r52202 190 190 } 191 191 192 UIActionPool* UIMachineWindow::actionPool() const 193 { 194 return machineLogic()->actionPool(); 195 } 196 192 197 UISession* UIMachineWindow::uisession() const 193 198 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h
r52179 r52202 39 39 class UIMachineLogic; 40 40 class UIMachineView; 41 class UIActionPool; 41 42 42 43 /* Machine-window interface: */ … … 64 65 UIMachineView* machineView() const { return m_pMachineView; } 65 66 UIMachineLogic* machineLogic() const { return m_pMachineLogic; } 67 UIActionPool* actionPool() const; 66 68 UISession* uisession() const; 67 69 CSession& session() const; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp
r52151 r52202 359 359 360 360 /* Get the list of all view-menu actions: */ 361 QList<QAction*> viewMenuActions = gpActionPool->action(UIActionIndexRT_M_View)->menu()->actions();361 QList<QAction*> viewMenuActions = m_pMachineLogic->actionPool()->action(UIActionIndexRT_M_View)->menu()->actions(); 362 362 /* Get the list of all view related actions: */ 363 363 QList<QAction*> viewActions; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r52195 r52202 125 125 , m_pMachine(pMachine) 126 126 , m_session(sessionReference) 127 , m_pActionPool(0) 127 128 #ifdef Q_WS_MAC 128 129 , m_pMenuBar(0) … … 766 767 bool fIsVRDEServerAvailable = !server.isNull(); 767 768 /* Show/Hide VRDE action depending on VRDE server availability status: */ 768 gpActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer)->setVisible(fIsVRDEServerAvailable);769 actionPool()->action(UIActionIndexRT_M_Devices_T_VRDEServer)->setVisible(fIsVRDEServerAvailable); 769 770 /* Check/Uncheck VRDE action depending on VRDE server activity status: */ 770 771 if (fIsVRDEServerAvailable) 771 gpActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer)->setChecked(server.GetEnabled());772 actionPool()->action(UIActionIndexRT_M_Devices_T_VRDEServer)->setChecked(server.GetEnabled()); 772 773 /* Notify listeners about VRDE change: */ 773 774 emit sigVRDEChange(); … … 779 780 const CMachine machine = session().GetMachine(); 780 781 /* Check/Uncheck Video Capture action depending on feature status: */ 781 gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start)->setChecked(machine.GetVideoCaptureEnabled());782 actionPool()->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start)->setChecked(machine.GetVideoCaptureEnabled()); 782 783 /* Notify listeners about Video Capture change: */ 783 784 emit sigVideoCaptureChange(); … … 980 981 void UISession::prepareActions() 981 982 { 983 /* Create action-pool: */ 984 m_pActionPool = UIActionPool::create(UIActionPoolType_Runtime); 985 982 986 /* Get host/machine: */ 983 987 const CHost host = vboxGlobal().host(); … … 997 1001 ++iDevicesCountFD; 998 1002 } 999 QAction *pOpticalDevicesMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices);1000 QAction *pFloppyDevicesMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices);1003 QAction *pOpticalDevicesMenu = actionPool()->action(UIActionIndexRT_M_Devices_M_OpticalDevices); 1004 QAction *pFloppyDevicesMenu = actionPool()->action(UIActionIndexRT_M_Devices_M_FloppyDevices); 1001 1005 pOpticalDevicesMenu->setData(iDevicesCountCD); 1002 1006 pFloppyDevicesMenu->setData(iDevicesCountFD); … … 1046 1050 1047 1051 /* Apply cumulative restriction: */ 1048 gpActionPool->toRuntime()->setRestrictionForMenuDevices(UIActionPool::UIActionRestrictionLevel_Session, restriction);1052 actionPool()->toRuntime()->setRestrictionForMenuDevices(UIActionRestrictionLevel_Session, restriction); 1049 1053 1050 1054 #ifdef Q_WS_MAC … … 1054 1058 { 1055 1059 /* Prepare menu-bar: */ 1056 foreach (QMenu *pMenu, gpActionPool->menus())1060 foreach (QMenu *pMenu, actionPool()->menus()) 1057 1061 m_pMenuBar->addMenu(pMenu); 1058 1062 } … … 1125 1129 m_frameBufferVector.resize(uMonitorCount); 1126 1130 QVector<QSize> sizes(uMonitorCount); 1127 gpActionPool->toRuntime()->setCurrentFrameBufferSizes(sizes.toList(), true);1131 actionPool()->toRuntime()->setCurrentFrameBufferSizes(sizes.toList(), true); 1128 1132 } 1129 1133 … … 1161 1165 1162 1166 /* Should guest autoresize? */ 1163 QAction *pGuestAutoresizeSwitch = gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize);1167 QAction *pGuestAutoresizeSwitch = actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize); 1164 1168 pGuestAutoresizeSwitch->setChecked(gEDataManager->guestScreenAutoResizeEnabled(strMachineID)); 1165 1169 … … 1168 1172 const bool fEnabledForMachine = gEDataManager->statusBarEnabled(strMachineID); 1169 1173 const bool fEnabled = fEnabledGlobally && fEnabledForMachine; 1170 QAction *pActionStatusBarSettings = gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings);1174 QAction *pActionStatusBarSettings = actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings); 1171 1175 pActionStatusBarSettings->setEnabled(fEnabled); 1172 QAction *pActionStatusBarSwitch = gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility);1176 QAction *pActionStatusBarSwitch = actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility); 1173 1177 pActionStatusBarSwitch->blockSignals(true); 1174 1178 pActionStatusBarSwitch->setChecked(fEnabled); … … 1194 1198 1195 1199 /* Remember if guest should autoresize: */ 1196 gEDataManager->setGuestScreenAutoResizeEnabled( gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked(), vboxGlobal().managedVMUuid());1200 gEDataManager->setGuestScreenAutoResizeEnabled(actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked(), vboxGlobal().managedVMUuid()); 1197 1201 1198 1202 #ifndef Q_WS_MAC … … 1244 1248 m_pMenuBar = 0; 1245 1249 #endif /* Q_WS_MAC */ 1250 1251 /* Destroy action-pool: */ 1252 UIActionPool::destroy(m_pActionPool); 1246 1253 } 1247 1254 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r52195 r52202 36 36 class UIMachine; 37 37 class UIMachineLogic; 38 class UIActionPool; 38 39 class CSession; 39 40 class CUSBDevice; … … 89 90 /* Common getters: */ 90 91 CSession& session() { return m_session; } 92 UIActionPool* actionPool() const { return m_pActionPool; } 91 93 KMachineState machineStatePrevious() const { return m_machineStatePrevious; } 92 94 KMachineState machineState() const { return m_machineState; } … … 317 319 CSession &m_session; 318 320 321 /** Holds the action-pool instance. */ 322 UIActionPool *m_pActionPool; 323 319 324 #ifdef Q_WS_MAC 320 325 /** Holds the menu-bar instance. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
r52184 r52202 75 75 * the linked key without the 'Host+' part we are adding it here. */ 76 76 QString hotKey = QString("Host+%1") 77 .arg(VBoxGlobal::extractKeyFromActionText( gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen)->text()));77 .arg(VBoxGlobal::extractKeyFromActionText(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen)->text())); 78 78 Assert(!hotKey.isEmpty()); 79 79 … … 446 446 447 447 /* Restrict 'Adjust Window', 'Status Bar' and 'Resize' actions for 'View' menu: */ 448 gpActionPool->toRuntime()->setRestrictionForMenuView(UIActionPool::UIActionRestrictionLevel_Logic,448 actionPool()->toRuntime()->setRestrictionForMenuView(UIActionRestrictionLevel_Logic, 449 449 (RuntimeMenuViewActionType) 450 450 (RuntimeMenuViewActionType_AdjustWindow | … … 453 453 454 454 /* Take care of view-action toggle state: */ 455 UIAction *pActionFullscreen = gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen);455 UIAction *pActionFullscreen = actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen); 456 456 if (!pActionFullscreen->isChecked()) 457 457 { … … 468 468 469 469 /* "View" actions connections: */ 470 connect( gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),470 connect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)), 471 471 this, SLOT(sltChangeVisualStateToNormal())); 472 connect( gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),472 connect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)), 473 473 this, SLOT(sltChangeVisualStateToSeamless())); 474 connect( gpActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),474 connect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)), 475 475 this, SLOT(sltChangeVisualStateToScale())); 476 476 } … … 509 509 510 510 // TODO: Make this through action-pool. 511 m_pScreenLayout->setViewMenu( gpActionPool->action(UIActionIndexRT_M_View)->menu());511 m_pScreenLayout->setViewMenu(actionPool()->action(UIActionIndexRT_M_View)->menu()); 512 512 513 513 /* Create machine-window(s): */ … … 576 576 { 577 577 /* Prepare popup-menu: */ 578 foreach (QMenu *pMenu, gpActionPool->menus())578 foreach (QMenu *pMenu, actionPool()->menus()) 579 579 m_pPopupMenu->addMenu(pMenu); 580 580 } … … 619 619 { 620 620 /* "View" actions disconnections: */ 621 disconnect( gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),621 disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)), 622 622 this, SLOT(sltChangeVisualStateToNormal())); 623 disconnect( gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),623 disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)), 624 624 this, SLOT(sltChangeVisualStateToSeamless())); 625 disconnect( gpActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),625 disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)), 626 626 this, SLOT(sltChangeVisualStateToScale())); 627 627 … … 633 633 { 634 634 /* Take care of view-action toggle state: */ 635 UIAction *pActionFullscreen = gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen);635 UIAction *pActionFullscreen = actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen); 636 636 if (pActionFullscreen->isChecked()) 637 637 { … … 642 642 643 643 /* Allow 'Adjust Window', 'Status Bar' and 'Resize' actions for 'View' menu: */ 644 gpActionPool->toRuntime()->setRestrictionForMenuView(UIActionPool::UIActionRestrictionLevel_Logic,644 actionPool()->toRuntime()->setRestrictionForMenuView(UIActionRestrictionLevel_Logic, 645 645 RuntimeMenuViewActionType_Invalid); 646 646 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
r52151 r52202 51 51 #endif 52 52 ) 53 , m_bIsGuestAutoresizeEnabled( gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked())53 , m_bIsGuestAutoresizeEnabled(actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked()) 54 54 { 55 55 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
r52184 r52202 221 221 gEDataManager->miniToolbarAlignment(vboxGlobal().managedVMUuid()), 222 222 gEDataManager->autoHideMiniToolbar(vboxGlobal().managedVMUuid())); 223 m_pMiniToolBar->addMenus( gpActionPool->menus());223 m_pMiniToolBar->addMenus(actionPool()->menus()); 224 224 #ifndef RT_OS_DARWIN 225 225 connect(m_pMiniToolBar, SIGNAL(sigMinimizeAction()), this, SLOT(showMinimized())); 226 226 #endif /* !RT_OS_DARWIN */ 227 227 connect(m_pMiniToolBar, SIGNAL(sigExitAction()), 228 gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SLOT(trigger()));228 actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SLOT(trigger())); 229 229 connect(m_pMiniToolBar, SIGNAL(sigCloseAction()), 230 gpActionPool->action(UIActionIndexRT_M_Machine_S_Close), SLOT(trigger()));230 actionPool()->action(UIActionIndexRT_M_Machine_S_Close), SLOT(trigger())); 231 231 connect(m_pMiniToolBar, SIGNAL(sigNotifyAboutFocusStolen()), this, SLOT(sltRevokeFocus())); 232 232 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp
r52184 r52202 81 81 82 82 /* Make sure status-bar is enabled: */ 83 const bool fEnabled = gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->isChecked();83 const bool fEnabled = actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->isChecked(); 84 84 AssertReturnVoid(fEnabled); 85 85 86 86 /* Prevent user from opening another one editor or toggle status-bar: */ 87 gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings)->setEnabled(false);88 gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->setEnabled(false);87 actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings)->setEnabled(false); 88 actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->setEnabled(false); 89 89 /* Create status-bar editor: */ 90 90 UIStatusBarEditorWindow *pStatusBarEditor = new UIStatusBarEditorWindow(activeMachineWindow()); … … 106 106 { 107 107 /* Make sure status-bar is enabled: */ 108 const bool fEnabled = gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->isChecked();108 const bool fEnabled = actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->isChecked(); 109 109 AssertReturnVoid(fEnabled); 110 110 111 111 /* Allow user to open editor and toggle status-bar again: */ 112 gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings)->setEnabled(true);113 gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->setEnabled(true);112 actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings)->setEnabled(true); 113 actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->setEnabled(true); 114 114 } 115 115 … … 137 137 AssertMsg(pMenu, ("This slot should be called only on Hard Disks menu show!\n")); 138 138 pMenu->clear(); 139 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings));139 pMenu->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings)); 140 140 } 141 141 … … 145 145 AssertMsg(menu, ("This slot should be called only on Shared Folders menu show!\n")); 146 146 menu->clear(); 147 menu->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings));147 menu->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings)); 148 148 } 149 149 … … 153 153 AssertMsg(pMenu, ("This slot should be called only on Video Capture menu show!\n")); 154 154 pMenu->clear(); 155 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings));156 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start));155 pMenu->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings)); 156 pMenu->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start)); 157 157 } 158 158 … … 162 162 AssertMsg(pMenu, ("This slot should be called only on Keyboard menu show!\n")); 163 163 pMenu->clear(); 164 pMenu->addAction( gpActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings));164 pMenu->addAction(actionPool()->action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings)); 165 165 } 166 166 … … 170 170 AssertMsg(menu, ("This slot should be called only on Mouse Integration Menu show!\n")); 171 171 menu->clear(); 172 menu->addAction( gpActionPool->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration));172 menu->addAction(actionPool()->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration)); 173 173 } 174 174 … … 179 179 180 180 /* "View" actions connections: */ 181 connect( gpActionPool, SIGNAL(sigNotifyAboutTriggeringViewResize(int, const QSize&)),181 connect(actionPool(), SIGNAL(sigNotifyAboutTriggeringViewResize(int, const QSize&)), 182 182 this, SLOT(sltHandleActionTriggerViewResize(int, const QSize&))); 183 connect( gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),183 connect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)), 184 184 this, SLOT(sltChangeVisualStateToFullscreen())); 185 connect( gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),185 connect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)), 186 186 this, SLOT(sltChangeVisualStateToSeamless())); 187 connect( gpActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),187 connect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)), 188 188 this, SLOT(sltChangeVisualStateToScale())); 189 connect( gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings), SIGNAL(triggered(bool)),189 connect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings), SIGNAL(triggered(bool)), 190 190 this, SLOT(sltOpenStatusBarSettings())); 191 connect( gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility), SIGNAL(triggered(bool)),191 connect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility), SIGNAL(triggered(bool)), 192 192 this, SLOT(sltToggleStatusBar())); 193 193 194 194 /* "Device" actions connections: */ 195 connect( gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives)->menu(), SIGNAL(aboutToShow()),195 connect(actionPool()->action(UIActionIndexRT_M_Devices_M_HardDrives)->menu(), SIGNAL(aboutToShow()), 196 196 this, SLOT(sltPrepareHardDisksMenu())); 197 connect( gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders)->menu(), SIGNAL(aboutToShow()),197 connect(actionPool()->action(UIActionIndexRT_M_Devices_M_SharedFolders)->menu(), SIGNAL(aboutToShow()), 198 198 this, SLOT(sltPrepareSharedFoldersMenu())); 199 connect( gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture)->menu(), SIGNAL(aboutToShow()),199 connect(actionPool()->action(UIActionIndexRT_M_Devices_M_VideoCapture)->menu(), SIGNAL(aboutToShow()), 200 200 this, SLOT(sltPrepareVideoCaptureMenu())); 201 connect( gpActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard)->menu(), SIGNAL(aboutToShow()),201 connect(actionPool()->action(UIActionIndexRT_M_Machine_M_Keyboard)->menu(), SIGNAL(aboutToShow()), 202 202 this, SLOT(sltPrepareKeyboardMenu())); 203 connect( gpActionPool->action(UIActionIndexRT_M_Machine_M_Mouse)->menu(), SIGNAL(aboutToShow()),203 connect(actionPool()->action(UIActionIndexRT_M_Machine_M_Mouse)->menu(), SIGNAL(aboutToShow()), 204 204 this, SLOT(sltPrepareMouseIntegrationMenu())); 205 205 } … … 252 252 { 253 253 /* "View" actions disconnections: */ 254 disconnect( gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),254 disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)), 255 255 this, SLOT(sltChangeVisualStateToFullscreen())); 256 disconnect( gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),256 disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)), 257 257 this, SLOT(sltChangeVisualStateToSeamless())); 258 disconnect( gpActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),258 disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)), 259 259 this, SLOT(sltChangeVisualStateToScale())); 260 disconnect( gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings), SIGNAL(triggered(bool)),260 disconnect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings), SIGNAL(triggered(bool)), 261 261 this, SLOT(sltOpenStatusBarSettings())); 262 disconnect( gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility), SIGNAL(triggered(bool)),262 disconnect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility), SIGNAL(triggered(bool)), 263 263 this, SLOT(sltToggleStatusBar())); 264 264 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
r52151 r52202 48 48 #endif 49 49 ) 50 , m_bIsGuestAutoresizeEnabled( gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked())50 , m_bIsGuestAutoresizeEnabled(actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked()) 51 51 { 52 52 /* Resend the last resize hint if there was a fullscreen or -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r52184 r52202 120 120 const bool fEnabled = gEDataManager->statusBarEnabled(vboxGlobal().managedVMUuid()); 121 121 /* Update settings action 'enable' state: */ 122 QAction *pActionStatusBarSettings = gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings);122 QAction *pActionStatusBarSettings = actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings); 123 123 pActionStatusBarSettings->setEnabled(fEnabled); 124 124 /* Update switch action 'checked' state: */ 125 QAction *pActionStatusBarSwitch = gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility);125 QAction *pActionStatusBarSwitch = actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility); 126 126 pActionStatusBarSwitch->blockSignals(true); 127 127 pActionStatusBarSwitch->setChecked(fEnabled); … … 139 139 { 140 140 /* Raise action's context-menu: */ 141 gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar)->menu()->exec(statusBar()->mapToGlobal(position));141 actionPool()->action(UIActionIndexRT_M_View_M_StatusBar)->menu()->exec(statusBar()->mapToGlobal(position)); 142 142 } 143 143 … … 148 148 switch (indicatorType) 149 149 { 150 case IndicatorType_HardDisks: pAction = gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives); break;151 case IndicatorType_OpticalDisks: pAction = gpActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices); break;152 case IndicatorType_FloppyDisks: pAction = gpActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices); break;153 case IndicatorType_USB: pAction = gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices); break;154 case IndicatorType_Network: pAction = gpActionPool->action(UIActionIndexRT_M_Devices_M_Network); break;155 case IndicatorType_SharedFolders: pAction = gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders); break;156 case IndicatorType_Display: pAction = gpActionPool->action(UIActionIndexRT_M_ViewPopup); break;157 case IndicatorType_VideoCapture: pAction = gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture); break;158 case IndicatorType_Mouse: pAction = gpActionPool->action(UIActionIndexRT_M_Machine_M_Mouse); break;159 case IndicatorType_Keyboard: pAction = gpActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard); break;150 case IndicatorType_HardDisks: pAction = actionPool()->action(UIActionIndexRT_M_Devices_M_HardDrives); break; 151 case IndicatorType_OpticalDisks: pAction = actionPool()->action(UIActionIndexRT_M_Devices_M_OpticalDevices); break; 152 case IndicatorType_FloppyDisks: pAction = actionPool()->action(UIActionIndexRT_M_Devices_M_FloppyDevices); break; 153 case IndicatorType_USB: pAction = actionPool()->action(UIActionIndexRT_M_Devices_M_USBDevices); break; 154 case IndicatorType_Network: pAction = actionPool()->action(UIActionIndexRT_M_Devices_M_Network); break; 155 case IndicatorType_SharedFolders: pAction = actionPool()->action(UIActionIndexRT_M_Devices_M_SharedFolders); break; 156 case IndicatorType_Display: pAction = actionPool()->action(UIActionIndexRT_M_ViewPopup); break; 157 case IndicatorType_VideoCapture: pAction = actionPool()->action(UIActionIndexRT_M_Devices_M_VideoCapture); break; 158 case IndicatorType_Mouse: pAction = actionPool()->action(UIActionIndexRT_M_Machine_M_Mouse); break; 159 case IndicatorType_Keyboard: pAction = actionPool()->action(UIActionIndexRT_M_Machine_M_Keyboard); break; 160 160 default: break; 161 161 } … … 207 207 { 208 208 /* Prepare menu-bar: */ 209 foreach (QMenu *pMenu, gpActionPool->menus())209 foreach (QMenu *pMenu, actionPool()->menus()) 210 210 menuBar()->addMenu(pMenu); 211 211 } … … 286 286 #endif /* !Q_WS_MAC */ 287 287 /* Update status-bar visibility: */ 288 statusBar()->setVisible( gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->isChecked());288 statusBar()->setVisible(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->isChecked()); 289 289 m_pIndicatorsPool->setAutoUpdateIndicatorStates(statusBar()->isVisible()); 290 290 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.cpp
r52184 r52202 48 48 * the linked key without the 'Host+' part we are adding it here. */ 49 49 QString strHotKey = QString("Host+%1") 50 .arg(VBoxGlobal::extractKeyFromActionText( gpActionPool->action(UIActionIndexRT_M_View_T_Scale)->text()));50 .arg(VBoxGlobal::extractKeyFromActionText(actionPool()->action(UIActionIndexRT_M_View_T_Scale)->text())); 51 51 Assert(!strHotKey.isEmpty()); 52 52 … … 76 76 77 77 /* Restrict 'Adjust Window', 'Guest Autoresize', 'Status Bar' and 'Resize' actions for 'View' menu: */ 78 gpActionPool->toRuntime()->setRestrictionForMenuView(UIActionPool::UIActionRestrictionLevel_Logic,78 actionPool()->toRuntime()->setRestrictionForMenuView(UIActionRestrictionLevel_Logic, 79 79 (RuntimeMenuViewActionType) 80 80 (RuntimeMenuViewActionType_AdjustWindow | … … 84 84 85 85 /* Take care of view-action toggle state: */ 86 UIAction *pActionScale = gpActionPool->action(UIActionIndexRT_M_View_T_Scale);86 UIAction *pActionScale = actionPool()->action(UIActionIndexRT_M_View_T_Scale); 87 87 if (!pActionScale->isChecked()) 88 88 { … … 99 99 100 100 /* "View" actions connections: */ 101 connect( gpActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),101 connect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)), 102 102 this, SLOT(sltChangeVisualStateToNormal())); 103 connect( gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),103 connect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)), 104 104 this, SLOT(sltChangeVisualStateToFullscreen())); 105 connect( gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),105 connect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)), 106 106 this, SLOT(sltChangeVisualStateToSeamless())); 107 107 } … … 145 145 { 146 146 /* Prepare popup-menu: */ 147 foreach (QMenu *pMenu, gpActionPool->menus())147 foreach (QMenu *pMenu, actionPool()->menus()) 148 148 m_pPopupMenu->addMenu(pMenu); 149 149 } … … 177 177 { 178 178 /* "View" actions disconnections: */ 179 disconnect( gpActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),179 disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)), 180 180 this, SLOT(sltChangeVisualStateToNormal())); 181 disconnect( gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),181 disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)), 182 182 this, SLOT(sltChangeVisualStateToFullscreen())); 183 disconnect( gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),183 disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)), 184 184 this, SLOT(sltChangeVisualStateToSeamless())); 185 185 … … 192 192 { 193 193 /* Take care of view-action toggle state: */ 194 UIAction *pActionScale = gpActionPool->action(UIActionIndexRT_M_View_T_Scale);194 UIAction *pActionScale = actionPool()->action(UIActionIndexRT_M_View_T_Scale); 195 195 if (pActionScale->isChecked()) 196 196 { … … 201 201 202 202 /* Allow 'Adjust Window', 'Guest Autoresize', 'Status Bar' and 'Resize' actions for 'View' menu: */ 203 gpActionPool->toRuntime()->setRestrictionForMenuView(UIActionPool::UIActionRestrictionLevel_Logic,203 actionPool()->toRuntime()->setRestrictionForMenuView(UIActionRestrictionLevel_Logic, 204 204 RuntimeMenuViewActionType_Invalid); 205 205 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp
r52184 r52202 75 75 * the linked key without the 'Host+' part we are adding it here. */ 76 76 QString hotKey = QString("Host+%1") 77 .arg(VBoxGlobal::extractKeyFromActionText( gpActionPool->action(UIActionIndexRT_M_View_T_Seamless)->text()));77 .arg(VBoxGlobal::extractKeyFromActionText(actionPool()->action(UIActionIndexRT_M_View_T_Seamless)->text())); 78 78 Assert(!hotKey.isEmpty()); 79 79 … … 204 204 205 205 /* Restrict 'Disable Mouse Integration' action for 'Machine' menu: */ 206 gpActionPool->toRuntime()->setRestrictionForMenuMachine(UIActionPool::UIActionRestrictionLevel_Logic,206 actionPool()->toRuntime()->setRestrictionForMenuMachine(UIActionRestrictionLevel_Logic, 207 207 RuntimeMenuMachineActionType_MouseIntegration); 208 208 /* Restrict 'Adjust Window', 'Guest Autoresize', 'Status Bar' and 'Resize' actions for 'View' menu: */ 209 gpActionPool->toRuntime()->setRestrictionForMenuView(UIActionPool::UIActionRestrictionLevel_Logic,209 actionPool()->toRuntime()->setRestrictionForMenuView(UIActionRestrictionLevel_Logic, 210 210 (RuntimeMenuViewActionType) 211 211 (RuntimeMenuViewActionType_AdjustWindow | … … 215 215 216 216 /* Take care of view-action toggle state: */ 217 UIAction *pActionSeamless = gpActionPool->action(UIActionIndexRT_M_View_T_Seamless);217 UIAction *pActionSeamless = actionPool()->action(UIActionIndexRT_M_View_T_Seamless); 218 218 if (!pActionSeamless->isChecked()) 219 219 { … … 230 230 231 231 /* "View" actions connections: */ 232 connect( gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),232 connect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)), 233 233 this, SLOT(sltChangeVisualStateToNormal())); 234 connect( gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),234 connect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)), 235 235 this, SLOT(sltChangeVisualStateToFullscreen())); 236 connect( gpActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),236 connect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)), 237 237 this, SLOT(sltChangeVisualStateToScale())); 238 238 } … … 254 254 255 255 // TODO: Make this through action-pool. 256 m_pScreenLayout->setViewMenu( gpActionPool->action(UIActionIndexRT_M_View)->menu());256 m_pScreenLayout->setViewMenu(actionPool()->action(UIActionIndexRT_M_View)->menu()); 257 257 258 258 /* Create machine-window(s): */ … … 281 281 { 282 282 /* Prepare popup-menu: */ 283 foreach (QMenu *pMenu, gpActionPool->menus())283 foreach (QMenu *pMenu, actionPool()->menus()) 284 284 m_pPopupMenu->addMenu(pMenu); 285 285 } … … 313 313 { 314 314 /* "View" actions disconnections: */ 315 disconnect( gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),315 disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)), 316 316 this, SLOT(sltChangeVisualStateToNormal())); 317 disconnect( gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),317 disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)), 318 318 this, SLOT(sltChangeVisualStateToFullscreen())); 319 disconnect( gpActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),319 disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)), 320 320 this, SLOT(sltChangeVisualStateToScale())); 321 321 … … 327 327 { 328 328 /* Take care of view-action toggle state: */ 329 UIAction *pActionSeamless = gpActionPool->action(UIActionIndexRT_M_View_T_Seamless);329 UIAction *pActionSeamless = actionPool()->action(UIActionIndexRT_M_View_T_Seamless); 330 330 if (pActionSeamless->isChecked()) 331 331 { … … 336 336 337 337 /* Allow 'Disable Mouse Integration' action for 'Machine' menu: */ 338 gpActionPool->toRuntime()->setRestrictionForMenuMachine(UIActionPool::UIActionRestrictionLevel_Logic,338 actionPool()->toRuntime()->setRestrictionForMenuMachine(UIActionRestrictionLevel_Logic, 339 339 RuntimeMenuMachineActionType_Invalid); 340 340 /* Allow 'Adjust Window', 'Guest Autoresize', 'Status Bar' and 'Resize' actions for 'View' menu: */ 341 gpActionPool->toRuntime()->setRestrictionForMenuView(UIActionPool::UIActionRestrictionLevel_Logic,341 actionPool()->toRuntime()->setRestrictionForMenuView(UIActionRestrictionLevel_Logic, 342 342 RuntimeMenuViewActionType_Invalid); 343 343 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
r52184 r52202 116 116 gEDataManager->autoHideMiniToolbar(vboxGlobal().managedVMUuid())); 117 117 m_pMiniToolBar->show(); 118 m_pMiniToolBar->addMenus( gpActionPool->menus());118 m_pMiniToolBar->addMenus(actionPool()->menus()); 119 119 connect(m_pMiniToolBar, SIGNAL(sigMinimizeAction()), this, SLOT(showMinimized())); 120 120 connect(m_pMiniToolBar, SIGNAL(sigExitAction()), 121 gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SLOT(trigger()));121 actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SLOT(trigger())); 122 122 connect(m_pMiniToolBar, SIGNAL(sigCloseAction()), 123 gpActionPool->action(UIActionIndexRT_M_Machine_S_Close), SLOT(trigger()));123 actionPool()->action(UIActionIndexRT_M_Machine_S_Close), SLOT(trigger())); 124 124 connect(m_pMiniToolBar, SIGNAL(sigNotifyAboutFocusStolen()), this, SLOT(sltRevokeFocus())); 125 125 } -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.cpp
r52184 r52202 33 33 34 34 UIActionMenuFile(UIActionPool *pParent) 35 : UIActionMenu(pParent) 36 { 37 retranslateUi(); 38 } 35 : UIActionMenu(pParent) {} 39 36 40 37 protected: … … 57 54 58 55 UIActionSimpleMediumManagerDialog(UIActionPool *pParent) 59 : UIActionSimple(pParent, ":/diskimage_16px.png") 60 { 61 retranslateUi(); 62 } 56 : UIActionSimple(pParent, ":/diskimage_16px.png") {} 63 57 64 58 protected: … … 88 82 89 83 UIActionSimpleImportApplianceWizard(UIActionPool *pParent) 90 : UIActionSimple(pParent, ":/import_16px.png") 91 { 92 retranslateUi(); 93 } 84 : UIActionSimple(pParent, ":/import_16px.png") {} 94 85 95 86 protected: … … 119 110 120 111 UIActionSimpleExportApplianceWizard(UIActionPool *pParent) 121 : UIActionSimple(pParent, ":/export_16px.png") 122 { 123 retranslateUi(); 124 } 112 : UIActionSimple(pParent, ":/export_16px.png") {} 125 113 126 114 protected: … … 151 139 152 140 UIActionSimpleExtraDataManagerWindow(UIActionPool *pParent) 153 : UIActionSimple(pParent, ":/edataman_16px.png") 154 { 155 retranslateUi(); 156 } 141 : UIActionSimple(pParent, ":/edataman_16px.png") {} 157 142 158 143 protected: … … 186 171 { 187 172 setMenuRole(QAction::QuitRole); 188 retranslateUi();189 173 } 190 174 … … 216 200 217 201 UIActionMenuGroup(UIActionPool *pParent) 218 : UIActionMenu(pParent) 219 { 220 retranslateUi(); 221 } 202 : UIActionMenu(pParent) {} 222 203 223 204 protected: … … 236 217 237 218 UIActionSimpleGroupNew(UIActionPool *pParent) 238 : UIActionSimple(pParent, ":/vm_new_32px.png", ":/vm_new_16px.png") 239 { 240 retranslateUi(); 241 } 219 : UIActionSimple(pParent, ":/vm_new_32px.png", ":/vm_new_16px.png") {} 242 220 243 221 protected: … … 269 247 270 248 UIActionSimpleGroupAdd(UIActionPool *pParent) 271 : UIActionSimple(pParent, ":/vm_add_16px.png") 272 { 273 retranslateUi(); 274 } 249 : UIActionSimple(pParent, ":/vm_add_16px.png") {} 275 250 276 251 protected: … … 300 275 301 276 UIActionSimpleGroupRename(UIActionPool *pParent) 302 : UIActionSimple(pParent, ":/vm_group_name_16px.png", ":/vm_group_name_disabled_16px.png") 303 { 304 retranslateUi(); 305 } 277 : UIActionSimple(pParent, ":/vm_group_name_16px.png", ":/vm_group_name_disabled_16px.png") {} 306 278 307 279 protected: … … 331 303 332 304 UIActionSimpleGroupRemove(UIActionPool *pParent) 333 : UIActionSimple(pParent, ":/vm_group_remove_16px.png", ":/vm_group_remove_disabled_16px.png") 334 { 335 retranslateUi(); 336 } 305 : UIActionSimple(pParent, ":/vm_group_remove_16px.png", ":/vm_group_remove_disabled_16px.png") {} 337 306 338 307 protected: … … 362 331 363 332 UIActionSimpleGroupSort(UIActionPool *pParent) 364 : UIActionSimple(pParent, ":/sort_16px.png", ":/sort_disabled_16px.png") 365 { 366 retranslateUi(); 367 } 333 : UIActionSimple(pParent, ":/sort_16px.png", ":/sort_disabled_16px.png") {} 368 334 369 335 protected: … … 389 355 390 356 UIActionMenuMachineSelector(UIActionPool *pParent) 391 : UIActionMenu(pParent) 392 { 393 retranslateUi(); 394 } 357 : UIActionMenu(pParent) {} 395 358 396 359 protected: … … 409 372 410 373 UIActionSimpleMachineNew(UIActionPool *pParent) 411 : UIActionSimple(pParent, ":/vm_new_32px.png", ":/vm_new_16px.png") 412 { 413 retranslateUi(); 414 } 374 : UIActionSimple(pParent, ":/vm_new_32px.png", ":/vm_new_16px.png") {} 415 375 416 376 protected: … … 442 402 443 403 UIActionSimpleMachineAdd(UIActionPool *pParent) 444 : UIActionSimple(pParent, ":/vm_add_16px.png") 445 { 446 retranslateUi(); 447 } 404 : UIActionSimple(pParent, ":/vm_add_16px.png") {} 448 405 449 406 protected: … … 473 430 474 431 UIActionSimpleMachineAddGroup(UIActionPool *pParent) 475 : UIActionSimple(pParent, ":/vm_group_create_16px.png", ":/vm_group_create_disabled_16px.png") 476 { 477 retranslateUi(); 478 } 432 : UIActionSimple(pParent, ":/vm_group_create_16px.png", ":/vm_group_create_disabled_16px.png") {} 479 433 480 434 protected: … … 506 460 : UIActionSimple(pParent, 507 461 ":/vm_settings_32px.png", ":/vm_settings_16px.png", 508 ":/vm_settings_disabled_32px.png", ":/vm_settings_disabled_16px.png") 509 { 510 retranslateUi(); 511 } 462 ":/vm_settings_disabled_32px.png", ":/vm_settings_disabled_16px.png") {} 512 463 513 464 protected: … … 539 490 540 491 UIActionSimpleMachineClone(UIActionPool *pParent) 541 : UIActionSimple(pParent, ":/vm_clone_16px.png", ":/vm_clone_disabled_16px.png") 542 { 543 retranslateUi(); 544 } 492 : UIActionSimple(pParent, ":/vm_clone_16px.png", ":/vm_clone_disabled_16px.png") {} 545 493 546 494 protected: … … 572 520 : UIActionSimple(pParent, 573 521 ":/vm_delete_32px.png", ":/vm_delete_16px.png", 574 ":/vm_delete_disabled_32px.png", ":/vm_delete_disabled_16px.png") 575 { 576 retranslateUi(); 577 } 522 ":/vm_delete_disabled_32px.png", ":/vm_delete_disabled_16px.png") {} 578 523 579 524 protected: … … 606 551 : UIActionPolymorphic(pParent, 607 552 ":/vm_start_32px.png", ":/vm_start_16px.png", 608 ":/vm_start_disabled_32px.png", ":/vm_start_disabled_16px.png") 609 { 610 retranslateUi(); 611 } 553 ":/vm_start_disabled_32px.png", ":/vm_start_disabled_16px.png") {} 612 554 613 555 protected: … … 653 595 : UIActionToggle(pParent, 654 596 ":/vm_pause_32px.png", ":/vm_pause_16px.png", 655 ":/vm_pause_disabled_32px.png", ":/vm_pause_disabled_16px.png") 656 { 657 retranslateUi(); 658 } 597 ":/vm_pause_disabled_32px.png", ":/vm_pause_disabled_16px.png") {} 659 598 660 599 protected: … … 684 623 685 624 UIActionSimpleCommonReset(UIActionPool *pParent) 686 : UIActionSimple(pParent, ":/vm_reset_16px.png", ":/vm_reset_disabled_16px.png") 687 { 688 retranslateUi(); 689 } 625 : UIActionSimple(pParent, ":/vm_reset_16px.png", ":/vm_reset_disabled_16px.png") {} 690 626 691 627 protected: … … 717 653 : UIActionSimple(pParent, 718 654 ":/vm_discard_32px.png", ":/vm_discard_16px.png", 719 ":/vm_discard_disabled_32px.png", ":/vm_discard_disabled_16px.png") 720 { 721 retranslateUi(); 722 } 655 ":/vm_discard_disabled_32px.png", ":/vm_discard_disabled_16px.png") {} 723 656 724 657 protected: … … 753 686 : UIActionSimple(pParent, 754 687 ":/refresh_32px.png", ":/refresh_16px.png", 755 ":/refresh_disabled_32px.png", ":/refresh_disabled_16px.png") 756 { 757 retranslateUi(); 758 } 688 ":/refresh_disabled_32px.png", ":/refresh_disabled_16px.png") {} 759 689 760 690 protected: … … 779 709 780 710 UIActionSimpleCommonShowInFileManager(UIActionPool *pParent) 781 : UIActionSimple(pParent, ":/vm_open_filemanager_16px.png", ":/vm_open_filemanager_disabled_16px.png") 782 { 783 retranslateUi(); 784 } 711 : UIActionSimple(pParent, ":/vm_open_filemanager_16px.png", ":/vm_open_filemanager_disabled_16px.png") {} 785 712 786 713 protected: … … 813 740 814 741 UIActionSimpleCommonCreateShortcut(UIActionPool *pParent) 815 : UIActionSimple(pParent, ":/vm_create_shortcut_16px.png", ":/vm_create_shortcut_disabled_16px.png") 816 { 817 retranslateUi(); 818 } 742 : UIActionSimple(pParent, ":/vm_create_shortcut_16px.png", ":/vm_create_shortcut_disabled_16px.png") {} 819 743 820 744 protected: … … 844 768 845 769 UIActionSimpleMachineSortParent(UIActionPool *pParent) 846 : UIActionSimple(pParent, ":/sort_16px.png", ":/sort_disabled_16px.png") 847 { 848 retranslateUi(); 849 } 770 : UIActionSimple(pParent, ":/sort_16px.png", ":/sort_disabled_16px.png") {} 850 771 851 772 protected: … … 871 792 872 793 UIActionMenuClose(UIActionPool *pParent) 873 : UIActionMenu(pParent, ":/exit_16px.png") 874 { 875 retranslateUi(); 876 } 794 : UIActionMenu(pParent, ":/exit_16px.png") {} 877 795 878 796 protected: … … 891 809 892 810 UIActionSimpleSave(UIActionPool *pParent) 893 : UIActionSimple(pParent, ":/vm_save_state_16px.png", ":/vm_save_state_disabled_16px.png") 894 { 895 retranslateUi(); 896 } 811 : UIActionSimple(pParent, ":/vm_save_state_16px.png", ":/vm_save_state_disabled_16px.png") {} 897 812 898 813 protected: … … 922 837 923 838 UIActionSimpleACPIShutdown(UIActionPool *pParent) 924 : UIActionSimple(pParent, ":/vm_shutdown_16px.png", ":/vm_shutdown_disabled_16px.png") 925 { 926 retranslateUi(); 927 } 839 : UIActionSimple(pParent, ":/vm_shutdown_16px.png", ":/vm_shutdown_disabled_16px.png") {} 928 840 929 841 protected: … … 953 865 954 866 UIActionSimplePowerOff(UIActionPool *pParent) 955 : UIActionSimple(pParent, ":/vm_poweroff_16px.png", ":/vm_poweroff_disabled_16px.png") 956 { 957 retranslateUi(); 958 } 867 : UIActionSimple(pParent, ":/vm_poweroff_16px.png", ":/vm_poweroff_disabled_16px.png") {} 959 868 960 869 protected: … … 978 887 979 888 980 UIActionPoolSelector::UIActionPoolSelector( )981 : UIActionPool(UIActionPoolType_Selector )889 UIActionPoolSelector::UIActionPoolSelector(bool fTemporary /* = false */) 890 : UIActionPool(UIActionPoolType_Selector, fTemporary) 982 891 { 983 892 } … … 1037 946 m_pool[UIActionIndexST_M_Machine_S_CreateShortcut] = new UIActionSimpleCommonCreateShortcut(this); 1038 947 m_pool[UIActionIndexST_M_Machine_S_SortParent] = new UIActionSimpleMachineSortParent(this); 948 949 /* Retranslate finally: */ 950 retranslateUi(); 1039 951 } 1040 952 … … 1055 967 foreach (const int iActionPoolKey, m_pool.keys()) 1056 968 m_pool[iActionPoolKey]->retranslateUi(); 1057 /* Re-apply Selector UI shortcuts: */ 1058 sltApplyShortcuts(); 1059 /* Temporary create Runtime UI pool to do the same: */ 1060 UIActionPool::createTemporary(UIActionPoolType_Runtime); 969 /* Update Selector UI shortcuts: */ 970 updateShortcuts(); 971 /* Create temporary Runtime UI pool to do the same: */ 972 if (!m_fTemporary) 973 UIActionPool::createTemporary(UIActionPoolType_Runtime); 1061 974 } 1062 975 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.h
r52184 r52202 92 92 protected: 93 93 94 /** Constructor. */ 95 UIActionPoolSelector(); 94 /** Constructor, 95 * @param fTemporary is used to determine whether this action-pool is temporary, 96 * which can be created to re-initialize shortcuts-pool. */ 97 UIActionPoolSelector(bool fTemporary = false); 96 98 97 99 /** Prepare pool routine. */ -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
r52155 r52202 83 83 , m_fPolished(false) 84 84 , m_fWarningAboutInaccessibleMediumShown(false) 85 , m_pActionPool(0) 85 86 , m_pSplitter(0) 86 87 #ifndef Q_WS_MAC … … 146 147 #endif /* Q_WS_MAC */ 147 148 148 /* Cleanup connections: */149 cleanupConnections();150 151 149 /* Save settings: */ 152 150 saveSettings(); 151 152 /* Cleanup: */ 153 cleanupConnections(); 154 cleanupMenuBar(); 153 155 } 154 156 … … 320 322 { 321 323 /* Check that we do NOT handling that already: */ 322 if ( gpActionPool->action(UIActionIndex_Simple_Preferences)->data().toBool())324 if (actionPool()->action(UIActionIndex_Simple_Preferences)->data().toBool()) 323 325 return; 324 326 /* Remember that we handling that already: */ 325 gpActionPool->action(UIActionIndex_Simple_Preferences)->setData(true);327 actionPool()->action(UIActionIndex_Simple_Preferences)->setData(true); 326 328 327 329 /* Don't show the inaccessible warning … … 334 336 335 337 /* Remember that we do NOT handling that already: */ 336 gpActionPool->action(UIActionIndex_Simple_Preferences)->setData(false);338 actionPool()->action(UIActionIndex_Simple_Preferences)->setData(false); 337 339 } 338 340 … … 393 395 { 394 396 /* Check that we do NOT handling that already: */ 395 if ( gpActionPool->action(UIActionIndexST_M_Machine_S_Settings)->data().toBool())397 if (actionPool()->action(UIActionIndexST_M_Machine_S_Settings)->data().toBool()) 396 398 return; 397 399 /* Remember that we handling that already: */ 398 gpActionPool->action(UIActionIndexST_M_Machine_S_Settings)->setData(true);400 actionPool()->action(UIActionIndexST_M_Machine_S_Settings)->setData(true); 399 401 400 402 /* Process href from VM details / description: */ … … 430 432 431 433 /* Remember that we do NOT handling that already: */ 432 gpActionPool->action(UIActionIndexST_M_Machine_S_Settings)->setData(false);434 actionPool()->action(UIActionIndexST_M_Machine_S_Settings)->setData(false); 433 435 } 434 436 … … 798 800 AssertMsgReturnVoid(!items.isEmpty(), ("At least one item should be selected!\n")); 799 801 800 gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_M_Close_S_Shutdown, items));802 actionPool()->action(UIActionIndexST_M_Group_M_Close_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_M_Close_S_Shutdown, items)); 801 803 } 802 804 … … 807 809 AssertMsgReturnVoid(!items.isEmpty(), ("At least one item should be selected!\n")); 808 810 809 gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_Shutdown, items));811 actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_Shutdown, items)); 810 812 } 811 813 … … 1096 1098 void UISelectorWindow::prepareMenuBar() 1097 1099 { 1100 /* Create action-pool: */ 1101 m_pActionPool = UIActionPool::create(UIActionPoolType_Selector); 1102 1098 1103 /* Prepare File-menu: */ 1099 prepareMenuFile( gpActionPool->action(UIActionIndexST_M_File)->menu());1100 menuBar()->addMenu( gpActionPool->action(UIActionIndexST_M_File)->menu());1104 prepareMenuFile(actionPool()->action(UIActionIndexST_M_File)->menu()); 1105 menuBar()->addMenu(actionPool()->action(UIActionIndexST_M_File)->menu()); 1101 1106 1102 1107 /* Prepare 'Group' / 'Close' menu: */ 1103 prepareMenuGroupClose( gpActionPool->action(UIActionIndexST_M_Group_M_Close)->menu());1108 prepareMenuGroupClose(actionPool()->action(UIActionIndexST_M_Group_M_Close)->menu()); 1104 1109 1105 1110 /* Prepare 'Machine' / 'Close' menu: */ 1106 prepareMenuMachineClose( gpActionPool->action(UIActionIndexST_M_Machine_M_Close)->menu());1111 prepareMenuMachineClose(actionPool()->action(UIActionIndexST_M_Machine_M_Close)->menu()); 1107 1112 1108 1113 /* Prepare Group-menu: */ 1109 prepareMenuGroup( gpActionPool->action(UIActionIndexST_M_Group)->menu());1110 m_pGroupMenuAction = menuBar()->addMenu( gpActionPool->action(UIActionIndexST_M_Group)->menu());1114 prepareMenuGroup(actionPool()->action(UIActionIndexST_M_Group)->menu()); 1115 m_pGroupMenuAction = menuBar()->addMenu(actionPool()->action(UIActionIndexST_M_Group)->menu()); 1111 1116 1112 1117 /* Prepare Machine-menu: */ 1113 prepareMenuMachine( gpActionPool->action(UIActionIndexST_M_Machine)->menu());1114 m_pMachineMenuAction = menuBar()->addMenu( gpActionPool->action(UIActionIndexST_M_Machine)->menu());1118 prepareMenuMachine(actionPool()->action(UIActionIndexST_M_Machine)->menu()); 1119 m_pMachineMenuAction = menuBar()->addMenu(actionPool()->action(UIActionIndexST_M_Machine)->menu()); 1115 1120 1116 1121 #ifdef Q_WS_MAC … … 1119 1124 1120 1125 /* Prepare Help-menu: */ 1121 prepareMenuHelp( gpActionPool->action(UIActionIndex_Menu_Help)->menu());1122 menuBar()->addMenu( gpActionPool->action(UIActionIndex_Menu_Help)->menu());1126 prepareMenuHelp(actionPool()->action(UIActionIndex_Menu_Help)->menu()); 1127 menuBar()->addMenu(actionPool()->action(UIActionIndex_Menu_Help)->menu()); 1123 1128 1124 1129 /* Setup menubar policy: */ … … 1133 1138 1134 1139 /* Populate File-menu: */ 1135 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_File_S_ShowMediumManager));1136 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_File_S_ImportAppliance));1137 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_File_S_ExportAppliance));1140 pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowMediumManager)); 1141 pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_ImportAppliance)); 1142 pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_ExportAppliance)); 1138 1143 #ifndef Q_WS_MAC 1139 1144 pMenu->addSeparator(); 1140 1145 #endif /* Q_WS_MAC */ 1141 1146 #ifdef DEBUG 1142 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_File_S_ShowExtraDataManager));1147 pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowExtraDataManager)); 1143 1148 #endif /* DEBUG */ 1144 pMenu->addAction( gpActionPool->action(UIActionIndex_Simple_Preferences));1149 pMenu->addAction(actionPool()->action(UIActionIndex_Simple_Preferences)); 1145 1150 #ifndef Q_WS_MAC 1146 1151 pMenu->addSeparator(); 1147 1152 #endif /* Q_WS_MAC */ 1148 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_File_S_Close));1153 pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_Close)); 1149 1154 } 1150 1155 … … 1156 1161 1157 1162 /* Populate Machine-menu: */ 1158 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Group_S_New));1159 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Group_S_Add));1163 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_S_New)); 1164 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Add)); 1160 1165 pMenu->addSeparator(); 1161 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Group_S_Rename));1162 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Group_S_Remove));1166 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Rename)); 1167 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Remove)); 1163 1168 pMenu->addSeparator(); 1164 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Group_P_StartOrShow));1165 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Group_T_Pause));1166 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Group_S_Reset));1167 pMenu->addMenu( gpActionPool->action(UIActionIndexST_M_Group_M_Close)->menu());1169 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_P_StartOrShow)); 1170 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_T_Pause)); 1171 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Reset)); 1172 pMenu->addMenu(actionPool()->action(UIActionIndexST_M_Group_M_Close)->menu()); 1168 1173 pMenu->addSeparator(); 1169 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Group_S_Discard));1170 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Group_S_Refresh));1174 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Discard)); 1175 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Refresh)); 1171 1176 pMenu->addSeparator(); 1172 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Group_S_ShowInFileManager));1173 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Group_S_CreateShortcut));1177 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_S_ShowInFileManager)); 1178 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_S_CreateShortcut)); 1174 1179 pMenu->addSeparator(); 1175 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Group_S_Sort));1180 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Sort)); 1176 1181 1177 1182 /* Remember action list: */ 1178 m_groupActions << gpActionPool->action(UIActionIndexST_M_Group_S_New)1179 << gpActionPool->action(UIActionIndexST_M_Group_S_Add)1180 << gpActionPool->action(UIActionIndexST_M_Group_S_Rename)1181 << gpActionPool->action(UIActionIndexST_M_Group_S_Remove)1182 << gpActionPool->action(UIActionIndexST_M_Group_P_StartOrShow)1183 << gpActionPool->action(UIActionIndexST_M_Group_T_Pause)1184 << gpActionPool->action(UIActionIndexST_M_Group_S_Reset)1185 << gpActionPool->action(UIActionIndexST_M_Group_S_Discard)1186 << gpActionPool->action(UIActionIndexST_M_Group_S_Refresh)1187 << gpActionPool->action(UIActionIndexST_M_Group_S_ShowInFileManager)1188 << gpActionPool->action(UIActionIndexST_M_Group_S_CreateShortcut)1189 << gpActionPool->action(UIActionIndexST_M_Group_S_Sort);1183 m_groupActions << actionPool()->action(UIActionIndexST_M_Group_S_New) 1184 << actionPool()->action(UIActionIndexST_M_Group_S_Add) 1185 << actionPool()->action(UIActionIndexST_M_Group_S_Rename) 1186 << actionPool()->action(UIActionIndexST_M_Group_S_Remove) 1187 << actionPool()->action(UIActionIndexST_M_Group_P_StartOrShow) 1188 << actionPool()->action(UIActionIndexST_M_Group_T_Pause) 1189 << actionPool()->action(UIActionIndexST_M_Group_S_Reset) 1190 << actionPool()->action(UIActionIndexST_M_Group_S_Discard) 1191 << actionPool()->action(UIActionIndexST_M_Group_S_Refresh) 1192 << actionPool()->action(UIActionIndexST_M_Group_S_ShowInFileManager) 1193 << actionPool()->action(UIActionIndexST_M_Group_S_CreateShortcut) 1194 << actionPool()->action(UIActionIndexST_M_Group_S_Sort); 1190 1195 } 1191 1196 … … 1197 1202 1198 1203 /* Populate Machine-menu: */ 1199 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Machine_S_New));1200 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Machine_S_Add));1201 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Machine_S_Settings));1202 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Machine_S_Clone));1203 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Machine_S_Remove));1204 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Machine_S_AddGroup));1204 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_New)); 1205 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Add)); 1206 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Settings)); 1207 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Clone)); 1208 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Remove)); 1209 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_AddGroup)); 1205 1210 pMenu->addSeparator(); 1206 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow));1207 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Machine_T_Pause));1208 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Machine_S_Reset));1209 pMenu->addMenu( gpActionPool->action(UIActionIndexST_M_Machine_M_Close)->menu());1211 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_P_StartOrShow)); 1212 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_T_Pause)); 1213 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Reset)); 1214 pMenu->addMenu(actionPool()->action(UIActionIndexST_M_Machine_M_Close)->menu()); 1210 1215 pMenu->addSeparator(); 1211 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Machine_S_Discard));1212 pMenu->addAction( gpActionPool->action(UIActionIndex_Simple_LogDialog));1213 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Machine_S_Refresh));1216 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Discard)); 1217 pMenu->addAction(actionPool()->action(UIActionIndex_Simple_LogDialog)); 1218 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Refresh)); 1214 1219 pMenu->addSeparator(); 1215 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Machine_S_ShowInFileManager));1216 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Machine_S_CreateShortcut));1220 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_ShowInFileManager)); 1221 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_CreateShortcut)); 1217 1222 pMenu->addSeparator(); 1218 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Machine_S_SortParent));1223 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_SortParent)); 1219 1224 1220 1225 /* Remember action list: */ 1221 m_machineActions << gpActionPool->action(UIActionIndexST_M_Machine_S_New)1222 << gpActionPool->action(UIActionIndexST_M_Machine_S_Add)1223 << gpActionPool->action(UIActionIndexST_M_Machine_S_Settings)1224 << gpActionPool->action(UIActionIndexST_M_Machine_S_Clone)1225 << gpActionPool->action(UIActionIndexST_M_Machine_S_Remove)1226 << gpActionPool->action(UIActionIndexST_M_Machine_S_AddGroup)1227 << gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow)1228 << gpActionPool->action(UIActionIndexST_M_Machine_T_Pause)1229 << gpActionPool->action(UIActionIndexST_M_Machine_S_Reset)1230 << gpActionPool->action(UIActionIndexST_M_Machine_S_Discard)1231 << gpActionPool->action(UIActionIndex_Simple_LogDialog)1232 << gpActionPool->action(UIActionIndexST_M_Machine_S_Refresh)1233 << gpActionPool->action(UIActionIndexST_M_Machine_S_ShowInFileManager)1234 << gpActionPool->action(UIActionIndexST_M_Machine_S_CreateShortcut)1235 << gpActionPool->action(UIActionIndexST_M_Machine_S_SortParent);1226 m_machineActions << actionPool()->action(UIActionIndexST_M_Machine_S_New) 1227 << actionPool()->action(UIActionIndexST_M_Machine_S_Add) 1228 << actionPool()->action(UIActionIndexST_M_Machine_S_Settings) 1229 << actionPool()->action(UIActionIndexST_M_Machine_S_Clone) 1230 << actionPool()->action(UIActionIndexST_M_Machine_S_Remove) 1231 << actionPool()->action(UIActionIndexST_M_Machine_S_AddGroup) 1232 << actionPool()->action(UIActionIndexST_M_Machine_P_StartOrShow) 1233 << actionPool()->action(UIActionIndexST_M_Machine_T_Pause) 1234 << actionPool()->action(UIActionIndexST_M_Machine_S_Reset) 1235 << actionPool()->action(UIActionIndexST_M_Machine_S_Discard) 1236 << actionPool()->action(UIActionIndex_Simple_LogDialog) 1237 << actionPool()->action(UIActionIndexST_M_Machine_S_Refresh) 1238 << actionPool()->action(UIActionIndexST_M_Machine_S_ShowInFileManager) 1239 << actionPool()->action(UIActionIndexST_M_Machine_S_CreateShortcut) 1240 << actionPool()->action(UIActionIndexST_M_Machine_S_SortParent); 1236 1241 } 1237 1242 … … 1243 1248 1244 1249 /* Populate 'Group' / 'Close' menu: */ 1245 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_SaveState));1246 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_Shutdown));1247 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_PowerOff));1250 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_M_Close_S_SaveState)); 1251 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_M_Close_S_Shutdown)); 1252 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_M_Close_S_PowerOff)); 1248 1253 1249 1254 /* Remember action list: */ 1250 m_groupActions << gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_SaveState)1251 << gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_Shutdown)1252 << gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_PowerOff);1255 m_groupActions << actionPool()->action(UIActionIndexST_M_Group_M_Close_S_SaveState) 1256 << actionPool()->action(UIActionIndexST_M_Group_M_Close_S_Shutdown) 1257 << actionPool()->action(UIActionIndexST_M_Group_M_Close_S_PowerOff); 1253 1258 } 1254 1259 … … 1260 1265 1261 1266 /* Populate 'Machine' / 'Close' menu: */ 1262 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_SaveState));1263 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown));1264 pMenu->addAction( gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff));1267 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_SaveState)); 1268 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown)); 1269 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff)); 1265 1270 1266 1271 /* Remember action list: */ 1267 m_machineActions << gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_SaveState)1268 << gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown)1269 << gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff);1272 m_machineActions << actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_SaveState) 1273 << actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown) 1274 << actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff); 1270 1275 } 1271 1276 … … 1277 1282 1278 1283 /* Populate Help-menu: */ 1279 pMenu->addAction( gpActionPool->action(UIActionIndex_Simple_Contents));1280 pMenu->addAction( gpActionPool->action(UIActionIndex_Simple_WebSite));1284 pMenu->addAction(actionPool()->action(UIActionIndex_Simple_Contents)); 1285 pMenu->addAction(actionPool()->action(UIActionIndex_Simple_WebSite)); 1281 1286 pMenu->addSeparator(); 1282 pMenu->addAction( gpActionPool->action(UIActionIndex_Simple_ResetWarnings));1287 pMenu->addAction(actionPool()->action(UIActionIndex_Simple_ResetWarnings)); 1283 1288 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER 1284 1289 pMenu->addSeparator(); 1285 pMenu->addAction( gpActionPool->action(UIActionIndex_Simple_NetworkAccessManager));1290 pMenu->addAction(actionPool()->action(UIActionIndex_Simple_NetworkAccessManager)); 1286 1291 if (gEDataManager->applicationUpdateEnabled()) 1287 pMenu->addAction( gpActionPool->action(UIActionIndex_Simple_CheckForUpdates));1292 pMenu->addAction(actionPool()->action(UIActionIndex_Simple_CheckForUpdates)); 1288 1293 else 1289 gpActionPool->action(UIActionIndex_Simple_CheckForUpdates)->setEnabled(false);1294 actionPool()->action(UIActionIndex_Simple_CheckForUpdates)->setEnabled(false); 1290 1295 #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */ 1291 1296 #ifndef Q_WS_MAC 1292 1297 pMenu->addSeparator(); 1293 1298 #endif /* !Q_WS_MAC */ 1294 pMenu->addAction( gpActionPool->action(UIActionIndex_Simple_About));1299 pMenu->addAction(actionPool()->action(UIActionIndex_Simple_About)); 1295 1300 } 1296 1301 … … 1321 1326 mVMToolBar->setIconSize(QSize(32, 32)); 1322 1327 mVMToolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); 1323 mVMToolBar->addAction( gpActionPool->action(UIActionIndexST_M_Machine_S_New));1324 mVMToolBar->addAction( gpActionPool->action(UIActionIndexST_M_Machine_S_Settings));1325 mVMToolBar->addAction( gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow));1326 mVMToolBar->addAction( gpActionPool->action(UIActionIndexST_M_Machine_S_Discard));1328 mVMToolBar->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_New)); 1329 mVMToolBar->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Settings)); 1330 mVMToolBar->addAction(actionPool()->action(UIActionIndexST_M_Machine_P_StartOrShow)); 1331 mVMToolBar->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Discard)); 1327 1332 1328 1333 /* Prepare graphics VM list: */ … … 1338 1343 1339 1344 /* Prepare details and snapshots tabs: */ 1340 m_pVMDesktop = new UIVMDesktop(mVMToolBar, gpActionPool->action(UIActionIndexST_M_Group_S_Refresh), this);1345 m_pVMDesktop = new UIVMDesktop(mVMToolBar, actionPool()->action(UIActionIndexST_M_Group_S_Refresh), this); 1341 1346 1342 1347 /* Crate container: */ … … 1382 1387 1383 1388 /* 'File' menu connections: */ 1384 connect( gpActionPool->action(UIActionIndexST_M_File_S_ShowMediumManager), SIGNAL(triggered()), this, SLOT(sltShowMediumManager()));1385 connect( gpActionPool->action(UIActionIndexST_M_File_S_ImportAppliance), SIGNAL(triggered()), this, SLOT(sltShowImportApplianceWizard()));1386 connect( gpActionPool->action(UIActionIndexST_M_File_S_ExportAppliance), SIGNAL(triggered()), this, SLOT(sltShowExportApplianceWizard()));1389 connect(actionPool()->action(UIActionIndexST_M_File_S_ShowMediumManager), SIGNAL(triggered()), this, SLOT(sltShowMediumManager())); 1390 connect(actionPool()->action(UIActionIndexST_M_File_S_ImportAppliance), SIGNAL(triggered()), this, SLOT(sltShowImportApplianceWizard())); 1391 connect(actionPool()->action(UIActionIndexST_M_File_S_ExportAppliance), SIGNAL(triggered()), this, SLOT(sltShowExportApplianceWizard())); 1387 1392 #ifdef DEBUG 1388 connect( gpActionPool->action(UIActionIndexST_M_File_S_ShowExtraDataManager), SIGNAL(triggered()), this, SLOT(sltOpenExtraDataManagerWindow()));1393 connect(actionPool()->action(UIActionIndexST_M_File_S_ShowExtraDataManager), SIGNAL(triggered()), this, SLOT(sltOpenExtraDataManagerWindow())); 1389 1394 #endif /* DEBUG */ 1390 connect( gpActionPool->action(UIActionIndex_Simple_Preferences), SIGNAL(triggered()), this, SLOT(sltShowPreferencesDialog()));1391 connect( gpActionPool->action(UIActionIndexST_M_File_S_Close), SIGNAL(triggered()), this, SLOT(sltPerformExit()));1395 connect(actionPool()->action(UIActionIndex_Simple_Preferences), SIGNAL(triggered()), this, SLOT(sltShowPreferencesDialog())); 1396 connect(actionPool()->action(UIActionIndexST_M_File_S_Close), SIGNAL(triggered()), this, SLOT(sltPerformExit())); 1392 1397 1393 1398 /* 'Group' menu connections: */ 1394 connect( gpActionPool->action(UIActionIndexST_M_Group_S_Add), SIGNAL(triggered()), this, SLOT(sltShowAddMachineDialog()));1395 connect( gpActionPool->action(UIActionIndexST_M_Group_P_StartOrShow), SIGNAL(triggered()), this, SLOT(sltPerformStartOrShowAction()));1396 connect( gpActionPool->action(UIActionIndexST_M_Group_T_Pause), SIGNAL(toggled(bool)), this, SLOT(sltPerformPauseResumeAction(bool)));1397 connect( gpActionPool->action(UIActionIndexST_M_Group_S_Reset), SIGNAL(triggered()), this, SLOT(sltPerformResetAction()));1398 connect( gpActionPool->action(UIActionIndexST_M_Group_S_Discard), SIGNAL(triggered()), this, SLOT(sltPerformDiscardAction()));1399 connect( gpActionPool->action(UIActionIndexST_M_Group_S_ShowInFileManager), SIGNAL(triggered()), this, SLOT(sltShowMachineInFileManager()));1400 connect( gpActionPool->action(UIActionIndexST_M_Group_S_CreateShortcut), SIGNAL(triggered()), this, SLOT(sltPerformCreateShortcutAction()));1399 connect(actionPool()->action(UIActionIndexST_M_Group_S_Add), SIGNAL(triggered()), this, SLOT(sltShowAddMachineDialog())); 1400 connect(actionPool()->action(UIActionIndexST_M_Group_P_StartOrShow), SIGNAL(triggered()), this, SLOT(sltPerformStartOrShowAction())); 1401 connect(actionPool()->action(UIActionIndexST_M_Group_T_Pause), SIGNAL(toggled(bool)), this, SLOT(sltPerformPauseResumeAction(bool))); 1402 connect(actionPool()->action(UIActionIndexST_M_Group_S_Reset), SIGNAL(triggered()), this, SLOT(sltPerformResetAction())); 1403 connect(actionPool()->action(UIActionIndexST_M_Group_S_Discard), SIGNAL(triggered()), this, SLOT(sltPerformDiscardAction())); 1404 connect(actionPool()->action(UIActionIndexST_M_Group_S_ShowInFileManager), SIGNAL(triggered()), this, SLOT(sltShowMachineInFileManager())); 1405 connect(actionPool()->action(UIActionIndexST_M_Group_S_CreateShortcut), SIGNAL(triggered()), this, SLOT(sltPerformCreateShortcutAction())); 1401 1406 1402 1407 /* 'Machine' menu connections: */ 1403 connect( gpActionPool->action(UIActionIndexST_M_Machine_S_Add), SIGNAL(triggered()), this, SLOT(sltShowAddMachineDialog()));1404 connect( gpActionPool->action(UIActionIndexST_M_Machine_S_Settings), SIGNAL(triggered()), this, SLOT(sltShowMachineSettingsDialog()));1405 connect( gpActionPool->action(UIActionIndexST_M_Machine_S_Clone), SIGNAL(triggered()), this, SLOT(sltShowCloneMachineWizard()));1406 connect( gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow), SIGNAL(triggered()), this, SLOT(sltPerformStartOrShowAction()));1407 connect( gpActionPool->action(UIActionIndexST_M_Machine_T_Pause), SIGNAL(toggled(bool)), this, SLOT(sltPerformPauseResumeAction(bool)));1408 connect( gpActionPool->action(UIActionIndexST_M_Machine_S_Reset), SIGNAL(triggered()), this, SLOT(sltPerformResetAction()));1409 connect( gpActionPool->action(UIActionIndex_Simple_LogDialog), SIGNAL(triggered()), this, SLOT(sltShowLogDialog()));1410 connect( gpActionPool->action(UIActionIndexST_M_Machine_S_Discard), SIGNAL(triggered()), this, SLOT(sltPerformDiscardAction()));1411 connect( gpActionPool->action(UIActionIndexST_M_Machine_S_ShowInFileManager), SIGNAL(triggered()), this, SLOT(sltShowMachineInFileManager()));1412 connect( gpActionPool->action(UIActionIndexST_M_Machine_S_CreateShortcut), SIGNAL(triggered()), this, SLOT(sltPerformCreateShortcutAction()));1408 connect(actionPool()->action(UIActionIndexST_M_Machine_S_Add), SIGNAL(triggered()), this, SLOT(sltShowAddMachineDialog())); 1409 connect(actionPool()->action(UIActionIndexST_M_Machine_S_Settings), SIGNAL(triggered()), this, SLOT(sltShowMachineSettingsDialog())); 1410 connect(actionPool()->action(UIActionIndexST_M_Machine_S_Clone), SIGNAL(triggered()), this, SLOT(sltShowCloneMachineWizard())); 1411 connect(actionPool()->action(UIActionIndexST_M_Machine_P_StartOrShow), SIGNAL(triggered()), this, SLOT(sltPerformStartOrShowAction())); 1412 connect(actionPool()->action(UIActionIndexST_M_Machine_T_Pause), SIGNAL(toggled(bool)), this, SLOT(sltPerformPauseResumeAction(bool))); 1413 connect(actionPool()->action(UIActionIndexST_M_Machine_S_Reset), SIGNAL(triggered()), this, SLOT(sltPerformResetAction())); 1414 connect(actionPool()->action(UIActionIndex_Simple_LogDialog), SIGNAL(triggered()), this, SLOT(sltShowLogDialog())); 1415 connect(actionPool()->action(UIActionIndexST_M_Machine_S_Discard), SIGNAL(triggered()), this, SLOT(sltPerformDiscardAction())); 1416 connect(actionPool()->action(UIActionIndexST_M_Machine_S_ShowInFileManager), SIGNAL(triggered()), this, SLOT(sltShowMachineInFileManager())); 1417 connect(actionPool()->action(UIActionIndexST_M_Machine_S_CreateShortcut), SIGNAL(triggered()), this, SLOT(sltPerformCreateShortcutAction())); 1413 1418 1414 1419 /* 'Group/Close' menu connections: */ 1415 connect( gpActionPool->action(UIActionIndexST_M_Group_M_Close)->menu(), SIGNAL(aboutToShow()), this, SLOT(sltGroupCloseMenuAboutToShow()));1416 connect( gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_SaveState), SIGNAL(triggered()), this, SLOT(sltPerformSaveAction()));1417 connect( gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_Shutdown), SIGNAL(triggered()), this, SLOT(sltPerformACPIShutdownAction()));1418 connect( gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_PowerOff), SIGNAL(triggered()), this, SLOT(sltPerformPowerOffAction()));1420 connect(actionPool()->action(UIActionIndexST_M_Group_M_Close)->menu(), SIGNAL(aboutToShow()), this, SLOT(sltGroupCloseMenuAboutToShow())); 1421 connect(actionPool()->action(UIActionIndexST_M_Group_M_Close_S_SaveState), SIGNAL(triggered()), this, SLOT(sltPerformSaveAction())); 1422 connect(actionPool()->action(UIActionIndexST_M_Group_M_Close_S_Shutdown), SIGNAL(triggered()), this, SLOT(sltPerformACPIShutdownAction())); 1423 connect(actionPool()->action(UIActionIndexST_M_Group_M_Close_S_PowerOff), SIGNAL(triggered()), this, SLOT(sltPerformPowerOffAction())); 1419 1424 1420 1425 /* 'Machine/Close' menu connections: */ 1421 connect( gpActionPool->action(UIActionIndexST_M_Machine_M_Close)->menu(), SIGNAL(aboutToShow()), this, SLOT(sltMachineCloseMenuAboutToShow()));1422 connect( gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_SaveState), SIGNAL(triggered()), this, SLOT(sltPerformSaveAction()));1423 connect( gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown), SIGNAL(triggered()), this, SLOT(sltPerformACPIShutdownAction()));1424 connect( gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff), SIGNAL(triggered()), this, SLOT(sltPerformPowerOffAction()));1426 connect(actionPool()->action(UIActionIndexST_M_Machine_M_Close)->menu(), SIGNAL(aboutToShow()), this, SLOT(sltMachineCloseMenuAboutToShow())); 1427 connect(actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_SaveState), SIGNAL(triggered()), this, SLOT(sltPerformSaveAction())); 1428 connect(actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown), SIGNAL(triggered()), this, SLOT(sltPerformACPIShutdownAction())); 1429 connect(actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff), SIGNAL(triggered()), this, SLOT(sltPerformPowerOffAction())); 1425 1430 1426 1431 /* 'Help' menu connections: */ 1427 connect( gpActionPool->action(UIActionIndex_Simple_Contents), SIGNAL(triggered()), &msgCenter(), SLOT(sltShowHelpHelpDialog()));1428 connect( gpActionPool->action(UIActionIndex_Simple_WebSite), SIGNAL(triggered()), &msgCenter(), SLOT(sltShowHelpWebDialog()));1429 connect( gpActionPool->action(UIActionIndex_Simple_ResetWarnings), SIGNAL(triggered()), &msgCenter(), SLOT(sltResetSuppressedMessages()));1432 connect(actionPool()->action(UIActionIndex_Simple_Contents), SIGNAL(triggered()), &msgCenter(), SLOT(sltShowHelpHelpDialog())); 1433 connect(actionPool()->action(UIActionIndex_Simple_WebSite), SIGNAL(triggered()), &msgCenter(), SLOT(sltShowHelpWebDialog())); 1434 connect(actionPool()->action(UIActionIndex_Simple_ResetWarnings), SIGNAL(triggered()), &msgCenter(), SLOT(sltResetSuppressedMessages())); 1430 1435 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER 1431 connect( gpActionPool->action(UIActionIndex_Simple_NetworkAccessManager), SIGNAL(triggered()), gNetworkManager, SLOT(show()));1432 connect( gpActionPool->action(UIActionIndex_Simple_CheckForUpdates), SIGNAL(triggered()), gUpdateManager, SLOT(sltForceCheck()));1436 connect(actionPool()->action(UIActionIndex_Simple_NetworkAccessManager), SIGNAL(triggered()), gNetworkManager, SLOT(show())); 1437 connect(actionPool()->action(UIActionIndex_Simple_CheckForUpdates), SIGNAL(triggered()), gUpdateManager, SLOT(sltForceCheck())); 1433 1438 #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */ 1434 connect( gpActionPool->action(UIActionIndex_Simple_About), SIGNAL(triggered()), &msgCenter(), SLOT(sltShowHelpAboutDialog()));1439 connect(actionPool()->action(UIActionIndex_Simple_About), SIGNAL(triggered()), &msgCenter(), SLOT(sltShowHelpAboutDialog())); 1435 1440 1436 1441 /* Status-bar connections: */ … … 1550 1555 } 1551 1556 1557 void UISelectorWindow::cleanupMenuBar() 1558 { 1559 /* Destroy action-pool: */ 1560 UIActionPool::destroy(m_pActionPool); 1561 } 1562 1552 1563 UIVMItem* UISelectorWindow::currentItem() const 1553 1564 { … … 1567 1578 1568 1579 /* Enable/disable group actions: */ 1569 gpActionPool->action(UIActionIndexST_M_Group_S_Rename)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Rename, items));1570 gpActionPool->action(UIActionIndexST_M_Group_S_Remove)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Remove, items));1571 gpActionPool->action(UIActionIndexST_M_Group_P_StartOrShow)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_P_StartOrShow, items));1572 gpActionPool->action(UIActionIndexST_M_Group_T_Pause)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_T_Pause, items));1573 gpActionPool->action(UIActionIndexST_M_Group_S_Reset)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Reset, items));1574 gpActionPool->action(UIActionIndexST_M_Group_S_Discard)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Discard, items));1575 gpActionPool->action(UIActionIndexST_M_Group_S_Refresh)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Refresh, items));1576 gpActionPool->action(UIActionIndexST_M_Group_S_ShowInFileManager)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_ShowInFileManager, items));1577 gpActionPool->action(UIActionIndexST_M_Group_S_CreateShortcut)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_CreateShortcut, items));1578 gpActionPool->action(UIActionIndexST_M_Group_S_Sort)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Sort, items));1580 actionPool()->action(UIActionIndexST_M_Group_S_Rename)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Rename, items)); 1581 actionPool()->action(UIActionIndexST_M_Group_S_Remove)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Remove, items)); 1582 actionPool()->action(UIActionIndexST_M_Group_P_StartOrShow)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_P_StartOrShow, items)); 1583 actionPool()->action(UIActionIndexST_M_Group_T_Pause)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_T_Pause, items)); 1584 actionPool()->action(UIActionIndexST_M_Group_S_Reset)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Reset, items)); 1585 actionPool()->action(UIActionIndexST_M_Group_S_Discard)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Discard, items)); 1586 actionPool()->action(UIActionIndexST_M_Group_S_Refresh)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Refresh, items)); 1587 actionPool()->action(UIActionIndexST_M_Group_S_ShowInFileManager)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_ShowInFileManager, items)); 1588 actionPool()->action(UIActionIndexST_M_Group_S_CreateShortcut)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_CreateShortcut, items)); 1589 actionPool()->action(UIActionIndexST_M_Group_S_Sort)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Sort, items)); 1579 1590 1580 1591 /* Enable/disable machine actions: */ 1581 gpActionPool->action(UIActionIndexST_M_Machine_S_Settings)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Settings, items));1582 gpActionPool->action(UIActionIndexST_M_Machine_S_Clone)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Clone, items));1583 gpActionPool->action(UIActionIndexST_M_Machine_S_Remove)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Remove, items));1584 gpActionPool->action(UIActionIndexST_M_Machine_S_AddGroup)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_AddGroup, items));1585 gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_P_StartOrShow, items));1586 gpActionPool->action(UIActionIndexST_M_Machine_T_Pause)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_T_Pause, items));1587 gpActionPool->action(UIActionIndexST_M_Machine_S_Reset)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Reset, items));1588 gpActionPool->action(UIActionIndexST_M_Machine_S_Discard)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Discard, items));1589 gpActionPool->action(UIActionIndex_Simple_LogDialog)->setEnabled(isActionEnabled(UIActionIndex_Simple_LogDialog, items));1590 gpActionPool->action(UIActionIndexST_M_Machine_S_Refresh)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Refresh, items));1591 gpActionPool->action(UIActionIndexST_M_Machine_S_ShowInFileManager)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_ShowInFileManager, items));1592 gpActionPool->action(UIActionIndexST_M_Machine_S_CreateShortcut)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_CreateShortcut, items));1593 gpActionPool->action(UIActionIndexST_M_Machine_S_SortParent)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_SortParent, items));1592 actionPool()->action(UIActionIndexST_M_Machine_S_Settings)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Settings, items)); 1593 actionPool()->action(UIActionIndexST_M_Machine_S_Clone)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Clone, items)); 1594 actionPool()->action(UIActionIndexST_M_Machine_S_Remove)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Remove, items)); 1595 actionPool()->action(UIActionIndexST_M_Machine_S_AddGroup)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_AddGroup, items)); 1596 actionPool()->action(UIActionIndexST_M_Machine_P_StartOrShow)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_P_StartOrShow, items)); 1597 actionPool()->action(UIActionIndexST_M_Machine_T_Pause)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_T_Pause, items)); 1598 actionPool()->action(UIActionIndexST_M_Machine_S_Reset)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Reset, items)); 1599 actionPool()->action(UIActionIndexST_M_Machine_S_Discard)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Discard, items)); 1600 actionPool()->action(UIActionIndex_Simple_LogDialog)->setEnabled(isActionEnabled(UIActionIndex_Simple_LogDialog, items)); 1601 actionPool()->action(UIActionIndexST_M_Machine_S_Refresh)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Refresh, items)); 1602 actionPool()->action(UIActionIndexST_M_Machine_S_ShowInFileManager)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_ShowInFileManager, items)); 1603 actionPool()->action(UIActionIndexST_M_Machine_S_CreateShortcut)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_CreateShortcut, items)); 1604 actionPool()->action(UIActionIndexST_M_Machine_S_SortParent)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_SortParent, items)); 1594 1605 1595 1606 /* Enable/disable group-close actions: */ 1596 gpActionPool->action(UIActionIndexST_M_Group_M_Close)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_M_Close, items));1597 gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_SaveState)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_M_Close_S_SaveState, items));1598 gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_M_Close_S_Shutdown, items));1599 gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_PowerOff)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_M_Close_S_PowerOff, items));1607 actionPool()->action(UIActionIndexST_M_Group_M_Close)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_M_Close, items)); 1608 actionPool()->action(UIActionIndexST_M_Group_M_Close_S_SaveState)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_M_Close_S_SaveState, items)); 1609 actionPool()->action(UIActionIndexST_M_Group_M_Close_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_M_Close_S_Shutdown, items)); 1610 actionPool()->action(UIActionIndexST_M_Group_M_Close_S_PowerOff)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_M_Close_S_PowerOff, items)); 1600 1611 1601 1612 /* Enable/disable machine-close actions: */ 1602 gpActionPool->action(UIActionIndexST_M_Machine_M_Close)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Close, items));1603 gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_SaveState)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_SaveState, items));1604 gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_Shutdown, items));1605 gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_PowerOff, items));1613 actionPool()->action(UIActionIndexST_M_Machine_M_Close)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Close, items)); 1614 actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_SaveState)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_SaveState, items)); 1615 actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_Shutdown, items)); 1616 actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_PowerOff, items)); 1606 1617 1607 1618 /* Start/Show action is deremined by 1st item: */ 1608 1619 if (pItem && pItem->accessible()) 1609 1620 { 1610 gpActionPool->action(UIActionIndexST_M_Group_P_StartOrShow)->toActionPolymorphic()->setState(UIVMItem::isItemPoweredOff(pItem) ? 0 : 1);1611 gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow)->toActionPolymorphic()->setState(UIVMItem::isItemPoweredOff(pItem) ? 0 : 1);1621 actionPool()->action(UIActionIndexST_M_Group_P_StartOrShow)->toActionPolymorphic()->setState(UIVMItem::isItemPoweredOff(pItem) ? 0 : 1); 1622 actionPool()->action(UIActionIndexST_M_Machine_P_StartOrShow)->toActionPolymorphic()->setState(UIVMItem::isItemPoweredOff(pItem) ? 0 : 1); 1612 1623 } 1613 1624 else 1614 1625 { 1615 gpActionPool->action(UIActionIndexST_M_Group_P_StartOrShow)->toActionPolymorphic()->setState(0);1616 gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow)->toActionPolymorphic()->setState(0);1626 actionPool()->action(UIActionIndexST_M_Group_P_StartOrShow)->toActionPolymorphic()->setState(0); 1627 actionPool()->action(UIActionIndexST_M_Machine_P_StartOrShow)->toActionPolymorphic()->setState(0); 1617 1628 } 1618 1629 … … 1623 1634 pFirstStartedAction = pSelectedItem; 1624 1635 /* Update the Pause/Resume action appearance: */ 1625 gpActionPool->action(UIActionIndexST_M_Group_T_Pause)->blockSignals(true);1626 gpActionPool->action(UIActionIndexST_M_Group_T_Pause)->setChecked(pFirstStartedAction && UIVMItem::isItemPaused(pFirstStartedAction));1627 gpActionPool->action(UIActionIndexST_M_Group_T_Pause)->retranslateUi();1628 gpActionPool->action(UIActionIndexST_M_Group_T_Pause)->blockSignals(false);1636 actionPool()->action(UIActionIndexST_M_Group_T_Pause)->blockSignals(true); 1637 actionPool()->action(UIActionIndexST_M_Group_T_Pause)->setChecked(pFirstStartedAction && UIVMItem::isItemPaused(pFirstStartedAction)); 1638 actionPool()->action(UIActionIndexST_M_Group_T_Pause)->retranslateUi(); 1639 actionPool()->action(UIActionIndexST_M_Group_T_Pause)->blockSignals(false); 1629 1640 1630 1641 #ifdef QT_MAC_USE_COCOA -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.h
r52155 r52202 38 38 class UIGChooser; 39 39 class UIGDetails; 40 class UIActionPool; 40 41 class QStackedWidget; 41 42 … … 52 53 Qt::WindowFlags flags = Qt::Window); 53 54 ~UISelectorWindow(); 55 56 /** Returns the action-pool instance. */ 57 UIActionPool* actionPool() const { return m_pActionPool; } 54 58 55 59 private slots: … … 132 136 void saveSettings(); 133 137 void cleanupConnections(); 138 void cleanupMenuBar(); 134 139 135 140 /* Helpers: Current item stuff: */ … … 156 161 bool m_fPolished : 1; 157 162 bool m_fWarningAboutInaccessibleMediumShown : 1; 163 164 /** Holds the action-pool instance. */ 165 UIActionPool *m_pActionPool; 158 166 159 167 /* Central splitter window: */ -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooser.cpp
r44051 r52202 26 26 #include "UIGChooserModel.h" 27 27 #include "UIGChooserView.h" 28 #include "UISelectorWindow.h" 28 29 #include "VBoxGlobal.h" 29 30 30 UIGChooser::UIGChooser( QWidget*pParent)31 UIGChooser::UIGChooser(UISelectorWindow *pParent) 31 32 : QWidget(pParent) 33 , m_pSelectorWindow(pParent) 32 34 , m_pMainLayout(0) 33 35 , m_pChooserModel(0) … … 58 60 /* Save: */ 59 61 save(); 62 } 63 64 UIActionPool* UIGChooser::actionPool() const 65 { 66 return selector()->actionPool(); 60 67 } 61 68 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooser.h
r43514 r52202 29 29 class UIVMItem; 30 30 class QVBoxLayout; 31 class UISelectorWindow; 32 class UIActionPool; 31 33 class UIGChooserModel; 32 34 class UIGChooserView; … … 56 58 57 59 /* Constructor/destructor: */ 58 UIGChooser( QWidget*pParent);60 UIGChooser(UISelectorWindow *pParent); 59 61 ~UIGChooser(); 62 63 /** Returns the selector-window reference. */ 64 UISelectorWindow* selector() const { return m_pSelectorWindow; } 65 /** Returns the action-pool reference. */ 66 UIActionPool* actionPool() const; 60 67 61 68 /* API: Current-item stuff: */ … … 84 91 void save(); 85 92 93 /** Holds the selector-window reference. */ 94 UISelectorWindow* m_pSelectorWindow; 95 86 96 /* Variables: */ 87 97 QVBoxLayout *m_pMainLayout; -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.cpp
r50932 r52202 115 115 } 116 116 117 UIActionPool* UIGChooserItem::actionPool() const 118 { 119 return model()->actionPool(); 120 } 121 117 122 UIGChooserItem* UIGChooserItem::parentItem() const 118 123 { -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.h
r50932 r52202 31 31 32 32 /* Forward declaration: */ 33 class UIActionPool; 33 34 class UIGChooserModel; 34 35 class UIGChooserItemGroup; … … 87 88 /* API: Model stuff: */ 88 89 UIGChooserModel* model() const; 90 91 /** Returns the action-pool reference. */ 92 UIActionPool* actionPool() const; 89 93 90 94 /* API: Parent stuff: */ -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp
r52155 r52202 1141 1141 1142 1142 connect(m_pSettingsButton, SIGNAL(sigButtonClicked()), 1143 gpActionPool->action(UIActionIndexST_M_Machine_S_Settings), SLOT(trigger()),1143 actionPool()->action(UIActionIndexST_M_Machine_S_Settings), SLOT(trigger()), 1144 1144 Qt::QueuedConnection); 1145 1145 connect(m_pStartButton, SIGNAL(sigButtonClicked()), 1146 gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow), SLOT(trigger()),1146 actionPool()->action(UIActionIndexST_M_Machine_P_StartOrShow), SLOT(trigger()), 1147 1147 Qt::QueuedConnection); 1148 1148 connect(m_pPauseButton, SIGNAL(sigButtonClicked()), 1149 gpActionPool->action(UIActionIndexST_M_Machine_T_Pause), SLOT(trigger()),1149 actionPool()->action(UIActionIndexST_M_Machine_T_Pause), SLOT(trigger()), 1150 1150 Qt::QueuedConnection); 1151 1151 connect(m_pCloseButton, SIGNAL(sigButtonClicked()), 1152 gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff), SLOT(trigger()),1152 actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff), SLOT(trigger()), 1153 1153 Qt::QueuedConnection); 1154 1154 } -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp
r52155 r52202 30 30 31 31 /* GUI includes: */ 32 #include "UIGChooser.h" 32 33 #include "UIGChooserModel.h" 33 34 #include "UIGChooserItemGroup.h" … … 52 53 typedef QSet<QString> UIStringSet; 53 54 54 UIGChooserModel::UIGChooserModel( QObject*pParent)55 UIGChooserModel::UIGChooserModel(UIGChooser *pParent) 55 56 : QObject(pParent) 57 , m_pChooser(pParent) 56 58 , m_pScene(0) 57 59 , m_fSliding(false) … … 133 135 makeSureGroupDefinitionsSaveIsFinished(); 134 136 makeSureGroupOrdersSaveIsFinished(); 137 } 138 139 UIActionPool* UIGChooserModel::actionPool() const 140 { 141 return chooser()->actionPool(); 135 142 } 136 143 … … 530 537 void UIGChooserModel::activateMachineItem() 531 538 { 532 gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow)->activate(QAction::Trigger);539 actionPool()->action(UIActionIndexST_M_Machine_P_StartOrShow)->activate(QAction::Trigger); 533 540 } 534 541 … … 699 706 { 700 707 /* Check if action is enabled: */ 701 if (! gpActionPool->action(UIActionIndexST_M_Group_S_Rename)->isEnabled())708 if (!actionPool()->action(UIActionIndexST_M_Group_S_Rename)->isEnabled()) 702 709 return; 703 710 … … 713 720 { 714 721 /* Check if action is enabled: */ 715 if (! gpActionPool->action(UIActionIndexST_M_Group_S_Sort)->isEnabled())722 if (!actionPool()->action(UIActionIndexST_M_Group_S_Sort)->isEnabled()) 716 723 return; 717 724 … … 727 734 { 728 735 /* Check if action is enabled: */ 729 if (! gpActionPool->action(UIActionIndexST_M_Group_S_Remove)->isEnabled())736 if (!actionPool()->action(UIActionIndexST_M_Group_S_Remove)->isEnabled()) 730 737 return; 731 738 … … 803 810 { 804 811 /* Check if action is enabled: */ 805 if (! gpActionPool->action(UIActionIndexST_M_Machine_S_New)->isEnabled())812 if (!actionPool()->action(UIActionIndexST_M_Machine_S_New)->isEnabled()) 806 813 return; 807 814 … … 827 834 { 828 835 /* Check if action is enabled: */ 829 if (! gpActionPool->action(UIActionIndexST_M_Machine_S_AddGroup)->isEnabled())836 if (!actionPool()->action(UIActionIndexST_M_Machine_S_AddGroup)->isEnabled()) 830 837 return; 831 838 … … 902 909 { 903 910 /* Check if action is enabled: */ 904 if (! gpActionPool->action(UIActionIndexST_M_Machine_S_SortParent)->isEnabled())911 if (!actionPool()->action(UIActionIndexST_M_Machine_S_SortParent)->isEnabled()) 905 912 return; 906 913 … … 916 923 { 917 924 /* Check if action is enabled: */ 918 if (! gpActionPool->action(UIActionIndexST_M_Group_S_Refresh)->isEnabled())925 if (!actionPool()->action(UIActionIndexST_M_Group_S_Refresh)->isEnabled()) 919 926 return; 920 927 … … 957 964 { 958 965 /* Check if action is enabled: */ 959 if (! gpActionPool->action(UIActionIndexST_M_Machine_S_Remove)->isEnabled())966 if (!actionPool()->action(UIActionIndexST_M_Machine_S_Remove)->isEnabled()) 960 967 return; 961 968 … … 1126 1133 /* Context menu for group(s): */ 1127 1134 m_pContextMenuGroup = new QMenu; 1128 m_pContextMenuGroup->addAction( gpActionPool->action(UIActionIndexST_M_Group_S_New));1129 m_pContextMenuGroup->addAction( gpActionPool->action(UIActionIndexST_M_Group_S_Add));1135 m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_S_New)); 1136 m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Add)); 1130 1137 m_pContextMenuGroup->addSeparator(); 1131 m_pContextMenuGroup->addAction( gpActionPool->action(UIActionIndexST_M_Group_S_Rename));1132 m_pContextMenuGroup->addAction( gpActionPool->action(UIActionIndexST_M_Group_S_Remove));1138 m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Rename)); 1139 m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Remove)); 1133 1140 m_pContextMenuGroup->addSeparator(); 1134 m_pContextMenuGroup->addAction( gpActionPool->action(UIActionIndexST_M_Group_P_StartOrShow));1135 m_pContextMenuGroup->addAction( gpActionPool->action(UIActionIndexST_M_Group_T_Pause));1136 m_pContextMenuGroup->addAction( gpActionPool->action(UIActionIndexST_M_Group_S_Reset));1137 m_pContextMenuGroup->addMenu( gpActionPool->action(UIActionIndexST_M_Group_M_Close)->menu());1141 m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_P_StartOrShow)); 1142 m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_T_Pause)); 1143 m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Reset)); 1144 m_pContextMenuGroup->addMenu(actionPool()->action(UIActionIndexST_M_Group_M_Close)->menu()); 1138 1145 m_pContextMenuGroup->addSeparator(); 1139 m_pContextMenuGroup->addAction( gpActionPool->action(UIActionIndexST_M_Group_S_Discard));1140 m_pContextMenuGroup->addAction( gpActionPool->action(UIActionIndexST_M_Group_S_Refresh));1146 m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Discard)); 1147 m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Refresh)); 1141 1148 m_pContextMenuGroup->addSeparator(); 1142 m_pContextMenuGroup->addAction( gpActionPool->action(UIActionIndexST_M_Group_S_ShowInFileManager));1143 m_pContextMenuGroup->addAction( gpActionPool->action(UIActionIndexST_M_Group_S_CreateShortcut));1149 m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_S_ShowInFileManager)); 1150 m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_S_CreateShortcut)); 1144 1151 m_pContextMenuGroup->addSeparator(); 1145 m_pContextMenuGroup->addAction( gpActionPool->action(UIActionIndexST_M_Group_S_Sort));1152 m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Sort)); 1146 1153 1147 1154 /* Context menu for machine(s): */ 1148 1155 m_pContextMenuMachine = new QMenu; 1149 m_pContextMenuMachine->addAction( gpActionPool->action(UIActionIndexST_M_Machine_S_Settings));1150 m_pContextMenuMachine->addAction( gpActionPool->action(UIActionIndexST_M_Machine_S_Clone));1151 m_pContextMenuMachine->addAction( gpActionPool->action(UIActionIndexST_M_Machine_S_Remove));1152 m_pContextMenuMachine->addAction( gpActionPool->action(UIActionIndexST_M_Machine_S_AddGroup));1156 m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Settings)); 1157 m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Clone)); 1158 m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Remove)); 1159 m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_AddGroup)); 1153 1160 m_pContextMenuMachine->addSeparator(); 1154 m_pContextMenuMachine->addAction( gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow));1155 m_pContextMenuMachine->addAction( gpActionPool->action(UIActionIndexST_M_Machine_T_Pause));1156 m_pContextMenuMachine->addAction( gpActionPool->action(UIActionIndexST_M_Machine_S_Reset));1157 m_pContextMenuMachine->addMenu( gpActionPool->action(UIActionIndexST_M_Machine_M_Close)->menu());1161 m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_P_StartOrShow)); 1162 m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_T_Pause)); 1163 m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Reset)); 1164 m_pContextMenuMachine->addMenu(actionPool()->action(UIActionIndexST_M_Machine_M_Close)->menu()); 1158 1165 m_pContextMenuMachine->addSeparator(); 1159 m_pContextMenuMachine->addAction( gpActionPool->action(UIActionIndexST_M_Machine_S_Discard));1160 m_pContextMenuMachine->addAction( gpActionPool->action(UIActionIndex_Simple_LogDialog));1161 m_pContextMenuMachine->addAction( gpActionPool->action(UIActionIndexST_M_Machine_S_Refresh));1166 m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Discard)); 1167 m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndex_Simple_LogDialog)); 1168 m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Refresh)); 1162 1169 m_pContextMenuMachine->addSeparator(); 1163 m_pContextMenuMachine->addAction( gpActionPool->action(UIActionIndexST_M_Machine_S_ShowInFileManager));1164 m_pContextMenuMachine->addAction( gpActionPool->action(UIActionIndexST_M_Machine_S_CreateShortcut));1170 m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_ShowInFileManager)); 1171 m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_CreateShortcut)); 1165 1172 m_pContextMenuMachine->addSeparator(); 1166 m_pContextMenuMachine->addAction( gpActionPool->action(UIActionIndexST_M_Machine_S_SortParent));1173 m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_SortParent)); 1167 1174 1168 1175 connect(m_pContextMenuGroup, SIGNAL(hovered(QAction*)), this, SLOT(sltActionHovered(QAction*))); 1169 1176 connect(m_pContextMenuMachine, SIGNAL(hovered(QAction*)), this, SLOT(sltActionHovered(QAction*))); 1170 1177 1171 connect( gpActionPool->action(UIActionIndexST_M_Group_S_New), SIGNAL(triggered()),1178 connect(actionPool()->action(UIActionIndexST_M_Group_S_New), SIGNAL(triggered()), 1172 1179 this, SLOT(sltCreateNewMachine())); 1173 connect( gpActionPool->action(UIActionIndexST_M_Machine_S_New), SIGNAL(triggered()),1180 connect(actionPool()->action(UIActionIndexST_M_Machine_S_New), SIGNAL(triggered()), 1174 1181 this, SLOT(sltCreateNewMachine())); 1175 connect( gpActionPool->action(UIActionIndexST_M_Group_S_Rename), SIGNAL(triggered()),1182 connect(actionPool()->action(UIActionIndexST_M_Group_S_Rename), SIGNAL(triggered()), 1176 1183 this, SLOT(sltEditGroupName())); 1177 connect( gpActionPool->action(UIActionIndexST_M_Group_S_Remove), SIGNAL(triggered()),1184 connect(actionPool()->action(UIActionIndexST_M_Group_S_Remove), SIGNAL(triggered()), 1178 1185 this, SLOT(sltUngroupSelectedGroup())); 1179 connect( gpActionPool->action(UIActionIndexST_M_Machine_S_Remove), SIGNAL(triggered()),1186 connect(actionPool()->action(UIActionIndexST_M_Machine_S_Remove), SIGNAL(triggered()), 1180 1187 this, SLOT(sltRemoveSelectedMachine())); 1181 connect( gpActionPool->action(UIActionIndexST_M_Machine_S_AddGroup), SIGNAL(triggered()),1188 connect(actionPool()->action(UIActionIndexST_M_Machine_S_AddGroup), SIGNAL(triggered()), 1182 1189 this, SLOT(sltGroupSelectedMachines())); 1183 connect( gpActionPool->action(UIActionIndexST_M_Group_S_Refresh), SIGNAL(triggered()),1190 connect(actionPool()->action(UIActionIndexST_M_Group_S_Refresh), SIGNAL(triggered()), 1184 1191 this, SLOT(sltPerformRefreshAction())); 1185 connect( gpActionPool->action(UIActionIndexST_M_Machine_S_Refresh), SIGNAL(triggered()),1192 connect(actionPool()->action(UIActionIndexST_M_Machine_S_Refresh), SIGNAL(triggered()), 1186 1193 this, SLOT(sltPerformRefreshAction())); 1187 connect( gpActionPool->action(UIActionIndexST_M_Machine_S_SortParent), SIGNAL(triggered()),1194 connect(actionPool()->action(UIActionIndexST_M_Machine_S_SortParent), SIGNAL(triggered()), 1188 1195 this, SLOT(sltSortParentGroup())); 1189 connect( gpActionPool->action(UIActionIndexST_M_Group_S_Sort), SIGNAL(triggered()),1196 connect(actionPool()->action(UIActionIndexST_M_Group_S_Sort), SIGNAL(triggered()), 1190 1197 this, SLOT(sltSortGroup())); 1191 1198 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.h
r48310 r52202 43 43 class QPaintDevice; 44 44 class UIVMItem; 45 class UIGChooser; 46 class UIActionPool; 45 47 class UIGChooserHandlerMouse; 46 48 class UIGChooserHandlerKeyboard; … … 87 89 88 90 /* Constructor/destructor: */ 89 UIGChooserModel( QObject*pParent);91 UIGChooserModel(UIGChooser *pParent); 90 92 ~UIGChooserModel(); 91 93 … … 93 95 void prepare(); 94 96 void cleanup(); 97 98 /** Returns the chooser reference. */ 99 UIGChooser* chooser() const { return m_pChooser; } 100 /** Returns the action-pool reference. */ 101 UIActionPool* actionPool() const; 95 102 96 103 /* API: Scene stuff: */ … … 272 279 void makeSureGroupOrdersSaveIsFinished(); 273 280 281 /** Holds the chooser reference. */ 282 UIGChooser *m_pChooser; 283 274 284 /* Variables: */ 275 285 QGraphicsScene *m_pScene;
Note:
See TracChangeset
for help on using the changeset viewer.