- Timestamp:
- Oct 16, 2018 4:32:08 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/cloud/UICloudProfileManager.cpp
r74855 r74868 101 101 QMenu *UICloudProfileManagerWidget::menu() const 102 102 { 103 /// @todo implement menu action! 104 return 0; 103 return m_pActionPool->action(UIActionIndexST_M_CloudWindow)->menu(); 105 104 } 106 105 … … 207 206 208 207 /* Update actions availability: */ 209 /// @todo implement % enable/disable actions! 208 m_pActionPool->action(UIActionIndexST_M_Cloud_S_Remove)->setEnabled(pItem); 209 m_pActionPool->action(UIActionIndexST_M_Cloud_T_Details)->setEnabled(pItem); 210 210 211 211 /* If there is an item => update details data: */ … … 224 224 /* Compose temporary context-menu: */ 225 225 QMenu menu; 226 /// @todo implement & insert actions! 226 if (m_pTreeWidget->itemAt(position)) 227 { 228 menu.addAction(m_pActionPool->action(UIActionIndexST_M_Cloud_S_Remove)); 229 menu.addSeparator(); 230 menu.addAction(m_pActionPool->action(UIActionIndexST_M_Cloud_T_Details)); 231 } 232 else 233 { 234 menu.addAction(m_pActionPool->action(UIActionIndexST_M_Cloud_S_Create)); 235 // menu.addSeparator(); 236 // menu.addAction(m_pActionPool->action(UIActionIndexST_M_Cloud_S_Refresh)); 237 } 227 238 228 239 /* And show it: */ … … 250 261 { 251 262 /* Connect actions: */ 252 /// @todo implement & connect actions! 263 connect(m_pActionPool->action(UIActionIndexST_M_Cloud_S_Create), &QAction::triggered, 264 this, &UICloudProfileManagerWidget::sltCreateCloudProfile); 265 connect(m_pActionPool->action(UIActionIndexST_M_Cloud_S_Remove), &QAction::triggered, 266 this, &UICloudProfileManagerWidget::sltRemoveCloudProfile); 267 connect(m_pActionPool->action(UIActionIndexST_M_Cloud_T_Details), &QAction::toggled, 268 this, &UICloudProfileManagerWidget::sltToggleCloudProfileDetailsVisibility); 269 connect(m_pActionPool->action(UIActionIndexST_M_Cloud_S_Refresh), &QAction::triggered, 270 this, &UICloudProfileManagerWidget::sltRefreshCloudProfiles); 253 271 } 254 272 … … 289 307 290 308 /* Add toolbar actions: */ 291 /// @todo implement & add actions! 309 m_pToolBar->addAction(m_pActionPool->action(UIActionIndexST_M_Cloud_S_Create)); 310 m_pToolBar->addAction(m_pActionPool->action(UIActionIndexST_M_Cloud_S_Remove)); 311 m_pToolBar->addSeparator(); 312 m_pToolBar->addAction(m_pActionPool->action(UIActionIndexST_M_Cloud_T_Details)); 313 // m_pToolBar->addSeparator(); 314 // m_pToolBar->addAction(m_pActionPool->action(UIActionIndexST_M_Cloud_S_Refresh)); 292 315 293 316 #ifdef VBOX_WS_MAC … … 326 349 connect(m_pTreeWidget, &QITreeWidget::itemChanged, 327 350 this, &UICloudProfileManagerWidget::sltHandleItemChange); 328 /// @todo implement & connect actions! 351 connect(m_pTreeWidget, &QITreeWidget::itemDoubleClicked, 352 m_pActionPool->action(UIActionIndexST_M_Cloud_T_Details), &QAction::setChecked); 329 353 330 354 /* Add into layout: */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolSelector.cpp
r74866 r74868 128 128 setName(QApplication::translate("UIActionPool", "&Host Network Manager...")); 129 129 setStatusTip(QApplication::translate("UIActionPool", "Display the Host Network Manager window")); 130 } 131 }; 132 133 /** Simple action extension, used as 'Show Cloud Profile Manager' action class. */ 134 class UIActionSimpleSelectorFileShowCloudProfileManager : public UIActionSimple 135 { 136 Q_OBJECT; 137 138 public: 139 140 /** Constructs action passing @a pParent to the base-class. */ 141 UIActionSimpleSelectorFileShowCloudProfileManager(UIActionPool *pParent) 142 : UIActionSimple(pParent, ":/host_iface_manager_16px.png", ":/host_iface_manager_16px.png") 143 {} 144 145 protected: 146 147 /** Returns shortcut extra-data ID. */ 148 virtual QString shortcutExtraDataID() const /* override */ 149 { 150 return QString("CloudProfileManager"); 151 } 152 153 /** Returns default shortcut. */ 154 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 155 { 156 return QKeySequence("Ctrl+C"); 157 } 158 159 /** Handles translation event. */ 160 virtual void retranslateUi() /* override */ 161 { 162 setName(QApplication::translate("UIActionPool", "&Cloud Profile Manager...")); 163 setStatusTip(QApplication::translate("UIActionPool", "Display the Cloud Profile Manager window")); 130 164 } 131 165 }; … … 1557 1591 }; 1558 1592 1593 /** Simple action extension, used as 'Show Cloud Profile Manager' action class. */ 1594 class UIActionSimpleSelectorToolsGlobalShowCloudProfileManager : public UIActionSimple 1595 { 1596 Q_OBJECT; 1597 1598 public: 1599 1600 /** Constructs action passing @a pParent to the base-class. */ 1601 UIActionSimpleSelectorToolsGlobalShowCloudProfileManager(UIActionPool *pParent) 1602 : UIActionSimple(pParent, 1603 ":/host_iface_manager_24px.png", ":/host_iface_manager_16px.png", 1604 ":/host_iface_manager_24px.png", ":/host_iface_manager_16px.png") 1605 {} 1606 1607 protected: 1608 1609 /** Returns shortcut extra-data ID. */ 1610 virtual QString shortcutExtraDataID() const /* override */ 1611 { 1612 return QString("ToolsGlobalCloudProfileManager"); 1613 } 1614 1615 /** Handles translation event. */ 1616 virtual void retranslateUi() /* override */ 1617 { 1618 setName(QApplication::translate("UIActionPool", "&Cloud Profile Manager")); 1619 setStatusTip(QApplication::translate("UIActionPool", "Open the Cloud Profile Manager")); 1620 } 1621 }; 1622 1559 1623 1560 1624 /** Menu action extension, used as 'Snapshot' menu class. */ … … 2283 2347 2284 2348 2349 /** Menu action extension, used as 'Cloud' menu class. */ 2350 class UIActionMenuSelectorCloud : public UIActionMenu 2351 { 2352 Q_OBJECT; 2353 2354 public: 2355 2356 /** Constructs action passing @a pParent to the base-class. */ 2357 UIActionMenuSelectorCloud(UIActionPool *pParent) 2358 : UIActionMenu(pParent) 2359 {} 2360 2361 protected: 2362 2363 /** Returns shortcut extra-data ID. */ 2364 virtual QString shortcutExtraDataID() const /* override */ 2365 { 2366 return QString("CloudProfileMenu"); 2367 } 2368 2369 /** Handles translation event. */ 2370 virtual void retranslateUi() /* override */ 2371 { 2372 setName(QApplication::translate("UIActionPool", "&Cloud")); 2373 setStatusTip(QApplication::translate("UIActionPool", "Open the cloud menu")); 2374 } 2375 }; 2376 2377 /** Simple action extension, used as 'Perform Create' action class. */ 2378 class UIActionMenuSelectorCloudPerformCreate : public UIActionSimple 2379 { 2380 Q_OBJECT; 2381 2382 public: 2383 2384 /** Constructs action passing @a pParent to the base-class. */ 2385 UIActionMenuSelectorCloudPerformCreate(UIActionPool *pParent) 2386 : UIActionSimple(pParent, 2387 ":/host_iface_add_32px.png", ":/host_iface_add_16px.png", 2388 ":/host_iface_add_disabled_32px.png", ":/host_iface_add_disabled_16px.png") 2389 {} 2390 2391 protected: 2392 2393 /** Returns shortcut extra-data ID. */ 2394 virtual QString shortcutExtraDataID() const /* override */ 2395 { 2396 return QString("CreateCloudProfile"); 2397 } 2398 2399 /** Returns default shortcut. */ 2400 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 2401 { 2402 return QKeySequence("Ctrl+Shift+C"); 2403 } 2404 2405 /** Handles translation event. */ 2406 virtual void retranslateUi() /* override */ 2407 { 2408 setName(QApplication::translate("UIActionPool", "&Create...")); 2409 setShortcutScope(QApplication::translate("UIActionPool", "Cloud Profile Manager")); 2410 setStatusTip(QApplication::translate("UIActionPool", "Create new cloud profile")); 2411 setToolTip(tr("Create Cloud Profile (%1)").arg(shortcut().toString())); 2412 } 2413 }; 2414 2415 /** Simple action extension, used as 'Perform Remove' action class. */ 2416 class UIActionMenuSelectorCloudPerformRemove : public UIActionSimple 2417 { 2418 Q_OBJECT; 2419 2420 public: 2421 2422 /** Constructs action passing @a pParent to the base-class. */ 2423 UIActionMenuSelectorCloudPerformRemove(UIActionPool *pParent) 2424 : UIActionSimple(pParent, 2425 ":/host_iface_remove_32px.png", ":/host_iface_remove_16px.png", 2426 ":/host_iface_remove_disabled_32px.png", ":/host_iface_remove_disabled_16px.png") 2427 {} 2428 2429 protected: 2430 2431 /** Returns shortcut extra-data ID. */ 2432 virtual QString shortcutExtraDataID() const /* override */ 2433 { 2434 return QString("RemoveCloudProfile"); 2435 } 2436 2437 /** Returns default shortcut. */ 2438 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 2439 { 2440 return QKeySequence("Ctrl+Shift+R"); 2441 } 2442 2443 /** Handles translation event. */ 2444 virtual void retranslateUi() /* override */ 2445 { 2446 setName(QApplication::translate("UIActionPool", "&Remove...")); 2447 setShortcutScope(QApplication::translate("UIActionPool", "Cloud Profile Manager")); 2448 setStatusTip(QApplication::translate("UIActionPool", "Remove selected cloud profile")); 2449 setToolTip(tr("Remove Cloud Profile (%1)").arg(shortcut().toString())); 2450 } 2451 }; 2452 2453 /** Toggle action extension, used as 'Toggle Properties' action class. */ 2454 class UIActionMenuSelectorCloudToggleProperties : public UIActionToggle 2455 { 2456 Q_OBJECT; 2457 2458 public: 2459 2460 /** Constructs action passing @a pParent to the base-class. */ 2461 UIActionMenuSelectorCloudToggleProperties(UIActionPool *pParent) 2462 : UIActionToggle(pParent, 2463 ":/host_iface_edit_32px.png", ":/host_iface_edit_16px.png", 2464 ":/host_iface_edit_disabled_32px.png", ":/host_iface_edit_disabled_16px.png") 2465 {} 2466 2467 protected: 2468 2469 /** Returns shortcut extra-data ID. */ 2470 virtual QString shortcutExtraDataID() const /* override */ 2471 { 2472 return QString("ToggleCloudProfileProperties"); 2473 } 2474 2475 /** Returns default shortcut. */ 2476 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 2477 { 2478 return QKeySequence("Ctrl+Space"); 2479 } 2480 2481 /** Handles translation event. */ 2482 virtual void retranslateUi() /* override */ 2483 { 2484 setName(QApplication::translate("UIActionPool", "&Properties")); 2485 setShortcutScope(QApplication::translate("UIActionPool", "Cloud Profile Manager")); 2486 setStatusTip(QApplication::translate("UIActionPool", "Open pane with selected cloud profile properties")); 2487 setToolTip(tr("Open Cloud Profile Properties (%1)").arg(shortcut().toString())); 2488 } 2489 }; 2490 2491 /** Simple action extension, used as 'Perform Refresh' action class. */ 2492 class UIActionMenuSelectorCloudPerformRefresh : public UIActionSimple 2493 { 2494 Q_OBJECT; 2495 2496 public: 2497 2498 /** Constructs action passing @a pParent to the base-class. */ 2499 UIActionMenuSelectorCloudPerformRefresh(UIActionPool *pParent) 2500 : UIActionSimple(pParent, 2501 ":/refresh_32px.png", ":/refresh_16px.png", 2502 ":/refresh_disabled_32px.png", ":/refresh_disabled_16px.png") 2503 {} 2504 2505 protected: 2506 2507 /** Returns shortcut extra-data ID. */ 2508 virtual QString shortcutExtraDataID() const /* override */ 2509 { 2510 return QString("RefreshCloudProfiles"); 2511 } 2512 2513 /** Returns default shortcut. */ 2514 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 2515 { 2516 return QKeySequence("Ctrl+Shift+F"); 2517 } 2518 2519 /** Handles translation event. */ 2520 virtual void retranslateUi() /* override */ 2521 { 2522 setName(QApplication::translate("UIActionPool", "Re&fresh...")); 2523 setShortcutScope(QApplication::translate("UIActionPool", "Cloud Profile Manager")); 2524 setStatusTip(QApplication::translate("UIActionPool", "Refresh the list of cloud profiles")); 2525 setToolTip(tr("Refresh Cloud Profiles (%1)").arg(shortcut().toString())); 2526 } 2527 }; 2528 2529 2285 2530 /********************************************************************************************************************************* 2286 2531 * Class UIActionPoolSelector implementation. * … … 2298 2543 m_pool[UIActionIndexST_M_File_S_ShowVirtualMediumManager] = new UIActionSimpleSelectorFileShowVirtualMediaManager(this); 2299 2544 m_pool[UIActionIndexST_M_File_S_ShowHostNetworkManager] = new UIActionSimpleSelectorFileShowHostNetworkManager(this); 2545 m_pool[UIActionIndexST_M_File_S_ShowCloudProfileManager] = new UIActionSimpleSelectorFileShowCloudProfileManager(this); 2300 2546 m_pool[UIActionIndexST_M_File_S_ImportAppliance] = new UIActionSimpleSelectorFileShowImportApplianceWizard(this); 2301 2547 m_pool[UIActionIndexST_M_File_S_ExportAppliance] = new UIActionSimpleSelectorFileShowExportApplianceWizard(this); … … 2368 2614 m_pool[UIActionIndexST_M_Tools_M_Global_S_VirtualMediaManager] = new UIActionSimpleSelectorToolsGlobalShowVirtualMediaManager(this); 2369 2615 m_pool[UIActionIndexST_M_Tools_M_Global_S_HostNetworkManager] = new UIActionSimpleSelectorToolsGlobalShowHostNetworkManager(this); 2616 m_pool[UIActionIndexST_M_Tools_M_Global_S_CloudProfileManager] = new UIActionSimpleSelectorToolsGlobalShowCloudProfileManager(this); 2370 2617 2371 2618 /* Snapshot Pane actions: */ … … 2396 2643 m_pool[UIActionIndexST_M_Network_S_Refresh] = new UIActionMenuSelectorNetworkPerformRefresh(this); 2397 2644 2645 /* Cloud Profile Manager actions: */ 2646 m_pool[UIActionIndexST_M_CloudWindow] = new UIActionMenuSelectorCloud(this); 2647 m_pool[UIActionIndexST_M_Cloud] = new UIActionMenuSelectorCloud(this); 2648 m_pool[UIActionIndexST_M_Cloud_S_Create] = new UIActionMenuSelectorCloudPerformCreate(this); 2649 m_pool[UIActionIndexST_M_Cloud_S_Remove] = new UIActionMenuSelectorCloudPerformRemove(this); 2650 m_pool[UIActionIndexST_M_Cloud_T_Details] = new UIActionMenuSelectorCloudToggleProperties(this); 2651 m_pool[UIActionIndexST_M_Cloud_S_Refresh] = new UIActionMenuSelectorCloudPerformRefresh(this); 2652 2398 2653 /* Prepare update-handlers for known menus: */ 2399 2654 m_menuUpdateHandlers[UIActionIndexST_M_MediumWindow].ptfs = &UIActionPoolSelector::updateMenuMediumWindow; … … 2401 2656 m_menuUpdateHandlers[UIActionIndexST_M_NetworkWindow].ptfs = &UIActionPoolSelector::updateMenuNetworkWindow; 2402 2657 m_menuUpdateHandlers[UIActionIndexST_M_Network].ptfs = &UIActionPoolSelector::updateMenuNetwork; 2658 m_menuUpdateHandlers[UIActionIndexST_M_CloudWindow].ptfs = &UIActionPoolSelector::updateMenuCloudWindow; 2659 m_menuUpdateHandlers[UIActionIndexST_M_Cloud].ptfs = &UIActionPoolSelector::updateMenuCloud; 2403 2660 2404 2661 /* Call to base-class: */ … … 2543 2800 } 2544 2801 2802 void UIActionPoolSelector::updateMenuCloudWindow() 2803 { 2804 /* Update corresponding menu: */ 2805 updateMenuCloudWrapper(action(UIActionIndexST_M_CloudWindow)->menu()); 2806 2807 /* Mark menu as valid: */ 2808 m_invalidations.remove(UIActionIndexST_M_CloudWindow); 2809 } 2810 2811 void UIActionPoolSelector::updateMenuCloud() 2812 { 2813 /* Update corresponding menu: */ 2814 updateMenuCloudWrapper(action(UIActionIndexST_M_Cloud)->menu()); 2815 2816 /* Mark menu as valid: */ 2817 m_invalidations.remove(UIActionIndexST_M_Cloud); 2818 } 2819 2820 void UIActionPoolSelector::updateMenuCloudWrapper(UIMenu *pMenu) 2821 { 2822 /* Clear contents: */ 2823 pMenu->clear(); 2824 2825 /* Separator? */ 2826 bool fSeparator = false; 2827 2828 /* 'Create' action: */ 2829 fSeparator = addAction(pMenu, action(UIActionIndexST_M_Cloud_S_Create)) || fSeparator; 2830 /* 'Remove' action: */ 2831 fSeparator = addAction(pMenu, action(UIActionIndexST_M_Cloud_S_Remove)) || fSeparator; 2832 2833 /* Separator? */ 2834 if (fSeparator) 2835 { 2836 pMenu->addSeparator(); 2837 fSeparator = false; 2838 } 2839 2840 /* 'Properties' action: */ 2841 fSeparator = addAction(pMenu, action(UIActionIndexST_M_Cloud_T_Details)) || fSeparator; 2842 2843 // /* Separator? */ 2844 // if (fSeparator) 2845 // { 2846 // pMenu->addSeparator(); 2847 // fSeparator = false; 2848 // } 2849 2850 // /* 'Refresh' action: */ 2851 // fSeparator = addAction(pMenu, action(UIActionIndexST_M_Cloud_S_Refresh)) || fSeparator;; 2852 } 2853 2545 2854 void UIActionPoolSelector::updateShortcuts() 2546 2855 { -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolSelector.h
r74866 r74868 37 37 UIActionIndexST_M_File_S_ShowVirtualMediumManager, 38 38 UIActionIndexST_M_File_S_ShowHostNetworkManager, 39 UIActionIndexST_M_File_S_ShowCloudProfileManager, 39 40 UIActionIndexST_M_File_S_ImportAppliance, 40 41 UIActionIndexST_M_File_S_ExportAppliance, … … 107 108 UIActionIndexST_M_Tools_M_Global_S_VirtualMediaManager, 108 109 UIActionIndexST_M_Tools_M_Global_S_HostNetworkManager, 110 UIActionIndexST_M_Tools_M_Global_S_CloudProfileManager, 109 111 110 112 /* Snapshot Pane actions: */ … … 135 137 UIActionIndexST_M_Network_S_Refresh, 136 138 139 /* Host Cloud Profile actions: */ 140 UIActionIndexST_M_CloudWindow, 141 UIActionIndexST_M_Cloud, 142 UIActionIndexST_M_Cloud_S_Create, 143 UIActionIndexST_M_Cloud_S_Remove, 144 UIActionIndexST_M_Cloud_T_Details, 145 UIActionIndexST_M_Cloud_S_Refresh, 146 137 147 /* Maximum index: */ 138 148 UIActionIndexST_Max … … 175 185 void updateMenuNetworkWrapper(UIMenu *pMenu); 176 186 187 /** Updates 'Cloud' window menu. */ 188 void updateMenuCloudWindow(); 189 /** Updates 'Cloud' menu. */ 190 void updateMenuCloud(); 191 /** Updates 'Cloud' @a pMenu. */ 192 void updateMenuCloudWrapper(UIMenu *pMenu); 193 177 194 /** Updates shortcuts. */ 178 195 virtual void updateShortcuts() /* override */; -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolbarTools.cpp
r74556 r74868 227 227 m_pActionPool->action(UIActionIndexST_M_Tools_M_Global_S_HostNetworkManager) 228 228 ->setProperty("ToolTypeGlobal", QVariant::fromValue(ToolTypeGlobal_Network)); 229 230 /* Add 'Cloud Profile Manager' action: */ 231 pMenuGlobal->addAction(m_pActionPool->action(UIActionIndexST_M_Tools_M_Global_S_CloudProfileManager)); 232 connect(m_pActionPool->action(UIActionIndexST_M_Tools_M_Global_S_CloudProfileManager), &UIAction::triggered, 233 this, &UIToolbarTools::sltHandleOpenToolGlobal); 229 234 } 230 235 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r74854 r74868 30 30 # include "QIFileDialog.h" 31 31 # include "UIActionPoolSelector.h" 32 # include "UICloudProfileManager.h" 32 33 # include "UIDesktopServices.h" 33 34 # include "UIExtraDataManager.h" … … 117 118 , m_pVirtualMediaManagerMenuAction(0) 118 119 , m_pHostNetworkManagerMenuAction(0) 120 , m_pCloudProfileManagerMenuAction(0) 119 121 , m_pManagerVirtualMedia(0) 120 122 , m_pManagerHostNetwork(0) 123 , m_pManagerCloudProfile(0) 121 124 { 122 125 s_pInstance = this; … … 445 448 } 446 449 450 void UIVirtualBoxManager::sltOpenCloudProfileManagerWindow() 451 { 452 /* Create instance if not yet created: */ 453 if (!m_pManagerCloudProfile) 454 { 455 UICloudProfileManagerFactory(m_pActionPool).prepare(m_pManagerCloudProfile, this); 456 connect(m_pManagerCloudProfile, &QIManagerDialog::sigClose, 457 this, &UIVirtualBoxManager::sltCloseCloudProfileManagerWindow); 458 } 459 460 /* Show instance: */ 461 m_pManagerCloudProfile->show(); 462 m_pManagerCloudProfile->setWindowState(m_pManagerCloudProfile->windowState() & ~Qt::WindowMinimized); 463 m_pManagerCloudProfile->activateWindow(); 464 } 465 466 void UIVirtualBoxManager::sltCloseCloudProfileManagerWindow() 467 { 468 /* Destroy instance if still exists: */ 469 if (m_pManagerCloudProfile) 470 UIHostNetworkManagerFactory().cleanup(m_pManagerCloudProfile); 471 } 472 447 473 void UIVirtualBoxManager::sltOpenImportApplianceWizard(const QString &strFileName /* = QString() */) 448 474 { … … 1250 1276 prepareMenuNetwork(actionPool()->action(UIActionIndexST_M_Network)->menu()); 1251 1277 m_pHostNetworkManagerMenuAction = menuBar()->addMenu(actionPool()->action(UIActionIndexST_M_Network)->menu()); 1278 1279 /* Prepare 'Cloud' menu: */ 1280 //prepareMenuCloud(actionPool()->action(UIActionIndexST_M_Cloud)->menu()); 1281 //m_pCloudProfileManagerMenuAction = menuBar()->addMenu(actionPool()->action(UIActionIndexST_M_Cloud)->menu()); 1252 1282 1253 1283 #ifdef VBOX_WS_MAC … … 1303 1333 /* 'Show Host Network Manager' action goes to 'File' menu: */ 1304 1334 pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowHostNetworkManager)); 1335 /* 'Show Cloud Profile Manager' action goes to 'File' menu: */ 1336 //pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowCloudProfileManager)); 1305 1337 1306 1338 #else /* !VBOX_WS_MAC */ … … 1321 1353 addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowVirtualMediumManager)); 1322 1354 addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowHostNetworkManager)); 1355 //addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowCloudProfileManager)); 1323 1356 # ifdef VBOX_GUI_WITH_NETWORK_MANAGER 1324 1357 addAction(actionPool()->action(UIActionIndex_M_Application_S_NetworkAccessManager)); … … 1347 1380 /* 'Show Host Network Manager' action goes to 'File' menu: */ 1348 1381 pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowHostNetworkManager)); 1382 /* 'Show Cloud Profile Manager' action goes to 'File' menu: */ 1383 //pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowCloudProfileManager)); 1349 1384 # ifdef VBOX_GUI_WITH_NETWORK_MANAGER 1350 1385 /* 'Network Access Manager' action goes to 'File' menu: */ … … 1714 1749 } 1715 1750 1751 void UIVirtualBoxManager::prepareMenuCloud(QMenu *pMenu) 1752 { 1753 /* We are doing it inside the UIActionPoolSelector. */ 1754 Q_UNUSED(pMenu); 1755 1756 /* Do not touch if filled already: */ 1757 if (!m_cloudProfileManagerActions.isEmpty()) 1758 return; 1759 1760 /* Remember action list: */ 1761 m_cloudProfileManagerActions << actionPool()->action(UIActionIndexST_M_Cloud_S_Create) 1762 << actionPool()->action(UIActionIndexST_M_Cloud_S_Remove) 1763 << actionPool()->action(UIActionIndexST_M_Cloud_T_Details) 1764 << actionPool()->action(UIActionIndexST_M_Cloud_S_Refresh); 1765 } 1766 1716 1767 void UIVirtualBoxManager::prepareStatusBar() 1717 1768 { … … 1766 1817 connect(actionPool()->action(UIActionIndexST_M_File_S_ShowHostNetworkManager), &UIAction::triggered, 1767 1818 this, &UIVirtualBoxManager::sltOpenHostNetworkManagerWindow); 1819 connect(actionPool()->action(UIActionIndexST_M_File_S_ShowCloudProfileManager), &UIAction::triggered, 1820 this, &UIVirtualBoxManager::sltOpenCloudProfileManagerWindow); 1768 1821 connect(actionPool()->action(UIActionIndexST_M_File_S_ImportAppliance), &UIAction::triggered, 1769 1822 this, &UIVirtualBoxManager::sltOpenImportApplianceWizardDefault); … … 1915 1968 sltCloseVirtualMediumManagerWindow(); 1916 1969 sltCloseHostNetworkManagerWindow(); 1970 sltCloseCloudProfileManagerWindow(); 1917 1971 1918 1972 /* Save settings: */ … … 1984 2038 VBoxGlobal::LaunchMode enmItemLaunchMode = enmLaunchMode; 1985 2039 if (enmItemLaunchMode == VBoxGlobal::LaunchMode_Invalid) 1986 enmItemLaunchMode = UIVirtualMachineItem::isItemRunningHeadless(pItem) 1987 qApp->keyboardModifiers() == Qt::ShiftModifier ? VBoxGlobal::LaunchMode_Headless :1988 VBoxGlobal::LaunchMode_Default;2040 enmItemLaunchMode = UIVirtualMachineItem::isItemRunningHeadless(pItem) ? VBoxGlobal::LaunchMode_Separate : 2041 qApp->keyboardModifiers() == Qt::ShiftModifier ? VBoxGlobal::LaunchMode_Headless : 2042 VBoxGlobal::LaunchMode_Default; 1989 2043 1990 2044 /* Launch current VM: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.h
r73738 r74868 134 134 /** Handles call to close Host Network Manager window. */ 135 135 void sltCloseHostNetworkManagerWindow(); 136 137 /** Handles call to open Cloud Profile Manager window. */ 138 void sltOpenCloudProfileManagerWindow(); 139 /** Handles call to close Cloud Profile Manager window. */ 140 void sltCloseCloudProfileManagerWindow(); 136 141 137 142 /** Handles call to close a Machine LogViewer window. */ … … 256 261 /** Prepares @a pMenu Network. */ 257 262 void prepareMenuNetwork(QMenu *pMenu); 263 /** Prepares @a pMenu Cloud. */ 264 void prepareMenuCloud(QMenu *pMenu); 258 265 /** Prepares status-bar. */ 259 266 void prepareStatusBar(); … … 376 383 QAction *m_pHostNetworkManagerMenuAction; 377 384 385 /** Holds the list of Cloud Profile Manager menu actions. */ 386 QList<UIAction*> m_cloudProfileManagerActions; 387 /** Holds the Cloud Profile Manager menu parent action. */ 388 QAction *m_pCloudProfileManagerMenuAction; 389 378 390 /** Holds the Virtual Media Manager window instance. */ 379 391 QIManagerDialog *m_pManagerVirtualMedia; 380 392 /** Holds the Host Network Manager window instance. */ 381 393 QIManagerDialog *m_pManagerHostNetwork; 394 /** Holds the Cloud Profile Manager window instance. */ 395 QIManagerDialog *m_pManagerCloudProfile; 382 396 /** Holds a map of (machineUUID, UIVMLogViewerDialog). */ 383 397 VMLogViewerMap m_logViewers; -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp
r74586 r74868 1345 1345 m_pContextMenuGlobal->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowVirtualMediumManager)); 1346 1346 m_pContextMenuGlobal->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowHostNetworkManager)); 1347 m_pContextMenuGlobal->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowCloudProfileManager)); 1347 1348 1348 1349 #else /* !VBOX_WS_MAC */ … … 1358 1359 m_pContextMenuGlobal->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowVirtualMediumManager)); 1359 1360 m_pContextMenuGlobal->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowHostNetworkManager)); 1361 m_pContextMenuGlobal->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowCloudProfileManager)); 1360 1362 # ifdef VBOX_GUI_WITH_NETWORK_MANAGER 1361 1363 m_pContextMenuGlobal->addAction(actionPool()->action(UIActionIndex_M_Application_S_NetworkAccessManager)); -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
r74552 r74868 33 33 # include "QISplitter.h" 34 34 # include "UIActionPoolSelector.h" 35 # include "UICloudProfileManager.h" 35 36 # include "UIDesktopServices.h" 36 37 # include "UIErrorString.h" … … 140 141 , m_pManagerVirtualMedia(0) 141 142 , m_pManagerHostNetwork(0) 143 , m_pManagerCloudProfile(0) 142 144 { 143 145 m_spInstance = this; … … 502 504 } 503 505 506 void UISelectorWindow::sltOpenCloudProfileManagerWindow() 507 { 508 /* Create instance if not yet created: */ 509 if (!m_pManagerCloudProfile) 510 { 511 UICloudProfileManagerFactory(m_pActionPool).prepare(m_pManagerCloudProfile, this); 512 connect(m_pManagerCloudProfile, &QIManagerDialog::sigClose, 513 this, &UISelectorWindow::sltCloseCloudProfileManagerWindow); 514 } 515 516 /* Show instance: */ 517 m_pManagerCloudProfile->show(); 518 m_pManagerCloudProfile->setWindowState(m_pManagerCloudProfile->windowState() & ~Qt::WindowMinimized); 519 m_pManagerCloudProfile->activateWindow(); 520 } 521 522 void UISelectorWindow::sltCloseCloudProfileManagerWindow() 523 { 524 /* Destroy instance if still exists: */ 525 if (m_pManagerCloudProfile) 526 UICloudProfileManagerFactory().cleanup(m_pManagerCloudProfile); 527 } 528 504 529 void UISelectorWindow::sltOpenImportApplianceWizard(const QString &strFileName /* = QString() */) 505 530 { … … 1585 1610 /* 'Show Host Network Manager' action goes to 'File' menu: */ 1586 1611 pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowHostNetworkManager)); 1612 /* 'Show Cloud Profile Manager' action goes to 'File' menu: */ 1613 //pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowCloudProfileManager)); 1587 1614 1588 1615 #else /* !VBOX_WS_MAC */ … … 1603 1630 addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowVirtualMediumManager)); 1604 1631 addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowHostNetworkManager)); 1632 //addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowCloudProfileManager)); 1605 1633 # ifdef VBOX_GUI_WITH_NETWORK_MANAGER 1606 1634 addAction(actionPool()->action(UIActionIndex_M_Application_S_NetworkAccessManager)); … … 1629 1657 /* 'Show Host Network Manager' action goes to 'File' menu: */ 1630 1658 pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowHostNetworkManager)); 1659 /* 'Show Cloud Profile Manager' action goes to 'File' menu: */ 1660 //pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowCloudProfileManager)); 1631 1661 # ifdef VBOX_GUI_WITH_NETWORK_MANAGER 1632 1662 /* 'Network Access Manager' action goes to 'File' menu: */ … … 2115 2145 connect(actionPool()->action(UIActionIndexST_M_File_S_ShowVirtualMediumManager), SIGNAL(triggered()), this, SLOT(sltOpenVirtualMediumManagerWindow())); 2116 2146 connect(actionPool()->action(UIActionIndexST_M_File_S_ShowHostNetworkManager), SIGNAL(triggered()), this, SLOT(sltOpenHostNetworkManagerWindow())); 2147 connect(actionPool()->action(UIActionIndexST_M_File_S_ShowCloudProfileManager), SIGNAL(triggered()), this, SLOT(sltOpenCloudProfileManagerWindow())); 2117 2148 connect(actionPool()->action(UIActionIndexST_M_File_S_ImportAppliance), SIGNAL(triggered()), this, SLOT(sltOpenImportApplianceWizard())); 2118 2149 connect(actionPool()->action(UIActionIndexST_M_File_S_ExportAppliance), SIGNAL(triggered()), this, SLOT(sltOpenExportApplianceWizard())); … … 2264 2295 QMap<ToolTypeGlobal, QAction*> mapActionsGlobal; 2265 2296 mapActionsGlobal[ToolTypeGlobal_VirtualMedia] = actionPool()->action(UIActionIndexST_M_Tools_M_Global_S_VirtualMediaManager); 2266 mapActionsGlobal[ToolTypeGlobal_HostNetwork] = actionPool()->action(UIActionIndexST_M_Tools_M_Global_S_HostNetworkManager); 2297 mapActionsGlobal[ToolTypeGlobal_HostNetwork] = actionPool()->action(UIActionIndexST_M_Tools_M_Global_S_HostNetworkManager); 2298 mapActionsGlobal[ToolTypeGlobal_CloudProfile] = actionPool()->action(UIActionIndexST_M_Tools_M_Global_S_CloudProfileManager); 2267 2299 for (int i = m_orderGlobal.size() - 1; i >= 0; --i) 2268 2300 if (m_orderGlobal.at(i) != ToolTypeGlobal_Invalid) … … 2332 2364 sltCloseVirtualMediumManagerWindow(); 2333 2365 sltCloseHostNetworkManagerWindow(); 2366 sltCloseCloudProfileManagerWindow(); 2334 2367 2335 2368 /* Save settings: */ -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.h
r72707 r74868 131 131 /** Handles call to close Host Network Manager window. */ 132 132 void sltCloseHostNetworkManagerWindow(); 133 /** Handles call to open Cloud Profile Manager window. */ 134 void sltOpenCloudProfileManagerWindow(); 135 /** Handles call to close Cloud Profile Manager window. */ 136 void sltCloseCloudProfileManagerWindow(); 133 137 /** Handles call to close a Machine LogViewer window. */ 134 138 void sltCloseLogViewerWindow(); … … 389 393 /** Holds the Host Network Manager window instance. */ 390 394 QIManagerDialog *m_pManagerHostNetwork; 395 /** Holds the Host Cloud Profile window instance. */ 396 QIManagerDialog *m_pManagerCloudProfile; 391 397 /** Holds a map of (machineUUID, UIVMLogViewerDialog). */ 392 398 VMLogViewerMap m_logViewers; -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIToolsToolbar.cpp
r70543 r74868 251 251 m_pActionPool->action(UIActionIndexST_M_Tools_M_Global_S_HostNetworkManager) 252 252 ->setProperty("ToolTypeGlobal", QVariant::fromValue(ToolTypeGlobal_HostNetwork)); 253 254 /* Add 'Cloud Profile Manager' action: */ 255 pMenuGlobal->addAction(m_pActionPool->action(UIActionIndexST_M_Tools_M_Global_S_CloudProfileManager)); 256 connect(m_pActionPool->action(UIActionIndexST_M_Tools_M_Global_S_CloudProfileManager), &UIAction::triggered, 257 this, &UIToolsToolbar::sltHandleOpenToolGlobal); 253 258 } 254 259
Note:
See TracChangeset
for help on using the changeset viewer.