Changeset 77305 in vbox
- Timestamp:
- Feb 13, 2019 5:34:03 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 128830
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolManager.cpp
r77298 r77305 692 692 }; 693 693 694 /** Simple action extension, used as 'Perform Export Machine' action class. */695 class UIActionSimpleSelectorMachinePerformExport : public UIActionSimple696 {697 Q_OBJECT;698 699 public:700 701 /** Constructs action passing @a pParent to the base-class. */702 UIActionSimpleSelectorMachinePerformExport(UIActionPool *pParent)703 : UIActionSimple(pParent, ":/export_16px.png", ":/export_disabled_16px.png")704 {}705 706 protected:707 708 /** Returns shortcut extra-data ID. */709 virtual QString shortcutExtraDataID() const /* override */710 {711 return QString("ExportVM");712 }713 714 /** Handles translation event. */715 virtual void retranslateUi() /* override */716 {717 setName(QApplication::translate("UIActionPool", "E&xport..."));718 setStatusTip(QApplication::translate("UIActionPool", "Export selected virtual machine"));719 }720 };721 722 694 /** Simple action extension, used as 'Perform Move Machine' action class. */ 723 695 class UIActionSimpleSelectorMachinePerformMove : public UIActionSimple … … 745 717 setName(QApplication::translate("UIActionPool", "&Move...")); 746 718 setStatusTip(QApplication::translate("UIActionPool", "Move selected virtual machine")); 719 } 720 }; 721 722 /** Simple action extension, used as 'Perform Export Machine to OCI' action class. */ 723 class UIActionSimpleSelectorMachinePerformExportToOCI : public UIActionSimple 724 { 725 Q_OBJECT; 726 727 public: 728 729 /** Constructs action passing @a pParent to the base-class. */ 730 UIActionSimpleSelectorMachinePerformExportToOCI(UIActionPool *pParent) 731 : UIActionSimple(pParent, ":/export_16px.png", ":/export_disabled_16px.png") 732 {} 733 734 protected: 735 736 /** Returns shortcut extra-data ID. */ 737 virtual QString shortcutExtraDataID() const /* override */ 738 { 739 return QString("ExportToOCI"); 740 } 741 742 /** Handles translation event. */ 743 virtual void retranslateUi() /* override */ 744 { 745 setName(QApplication::translate("UIActionPool", "E&xport to OCI...")); 746 setStatusTip(QApplication::translate("UIActionPool", "Export selected virtual machine to OCI")); 747 747 } 748 748 }; … … 2687 2687 m_pool[UIActionIndexST_M_Machine_S_Settings] = new UIActionSimpleSelectorMachineShowSettings(this); 2688 2688 m_pool[UIActionIndexST_M_Machine_S_Clone] = new UIActionSimpleSelectorMachinePerformClone(this); 2689 m_pool[UIActionIndexST_M_Machine_S_Export] = new UIActionSimpleSelectorMachinePerformExport(this);2690 2689 m_pool[UIActionIndexST_M_Machine_S_Move] = new UIActionSimpleSelectorMachinePerformMove(this); 2690 m_pool[UIActionIndexST_M_Machine_S_ExportToOCI] = new UIActionSimpleSelectorMachinePerformExportToOCI(this); 2691 2691 m_pool[UIActionIndexST_M_Machine_S_Remove] = new UIActionSimpleSelectorMachinePerformRemove(this); 2692 2692 m_pool[UIActionIndexST_M_Machine_S_AddGroup] = new UIActionSimpleSelectorMachinePerformGroup(this); … … 3032 3032 pMenu->addAction(action(UIActionIndexST_M_Machine_S_Settings)); 3033 3033 pMenu->addAction(action(UIActionIndexST_M_Machine_S_Clone)); 3034 pMenu->addAction(action(UIActionIndexST_M_Machine_S_Export));3035 3034 pMenu->addAction(action(UIActionIndexST_M_Machine_S_Move)); 3035 pMenu->addAction(action(UIActionIndexST_M_Machine_S_ExportToOCI)); 3036 3036 pMenu->addAction(action(UIActionIndexST_M_Machine_S_Remove)); 3037 3037 pMenu->addAction(action(UIActionIndexST_M_Machine_S_AddGroup)); … … 3403 3403 << action(UIActionIndexST_M_Machine_S_Settings) 3404 3404 << action(UIActionIndexST_M_Machine_S_Clone) 3405 << action(UIActionIndexST_M_Machine_S_Export)3406 3405 << action(UIActionIndexST_M_Machine_S_Move) 3406 << action(UIActionIndexST_M_Machine_S_ExportToOCI) 3407 3407 << action(UIActionIndexST_M_Machine_S_Remove) 3408 3408 << action(UIActionIndexST_M_Machine_S_AddGroup) -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolManager.h
r77297 r77305 90 90 UIActionIndexST_M_Machine_S_Settings, 91 91 UIActionIndexST_M_Machine_S_Clone, 92 UIActionIndexST_M_Machine_S_Export,93 92 UIActionIndexST_M_Machine_S_Move, 93 UIActionIndexST_M_Machine_S_ExportToOCI, 94 94 UIActionIndexST_M_Machine_S_Remove, 95 95 UIActionIndexST_M_Machine_S_AddGroup, -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r77297 r77305 530 530 /* Lock the action preventing cascade calls: */ 531 531 actionPool()->action(UIActionIndexST_M_File_S_ExportAppliance)->setProperty("opened", true); 532 actionPool()->action(UIActionIndexST_M_Machine_S_Export )->setProperty("opened", true);532 actionPool()->action(UIActionIndexST_M_Machine_S_ExportToOCI)->setProperty("opened", true); 533 533 updateActionsAppearance(); 534 534 … … 540 540 UISafePointerWizard pWizard = new UIWizardExportApp(pWizardParent, names, 541 541 pAction && 542 pAction == actionPool()->action(UIActionIndexST_M_Machine_S_Export ));542 pAction == actionPool()->action(UIActionIndexST_M_Machine_S_ExportToOCI)); 543 543 windowManager().registerNewParent(pWizard, pWizardParent); 544 544 pWizard->prepare(); … … 550 550 { 551 551 actionPool()->action(UIActionIndexST_M_File_S_ExportAppliance)->setProperty("opened", QVariant()); 552 actionPool()->action(UIActionIndexST_M_Machine_S_Export )->setProperty("opened", QVariant());552 actionPool()->action(UIActionIndexST_M_Machine_S_ExportToOCI)->setProperty("opened", QVariant()); 553 553 updateActionsAppearance(); 554 554 } … … 1436 1436 connect(actionPool()->action(UIActionIndexST_M_Machine_S_Clone), &UIAction::triggered, 1437 1437 this, &UIVirtualBoxManager::sltOpenCloneMachineWizard); 1438 connect(actionPool()->action(UIActionIndexST_M_Machine_S_Export), &UIAction::triggered,1439 this, &UIVirtualBoxManager::sltOpenExportApplianceWizard);1440 1438 connect(actionPool()->action(UIActionIndexST_M_Machine_S_Move), &UIAction::triggered, 1441 1439 this, &UIVirtualBoxManager::sltPerformMachineMove); 1440 connect(actionPool()->action(UIActionIndexST_M_Machine_S_ExportToOCI), &UIAction::triggered, 1441 this, &UIVirtualBoxManager::sltOpenExportApplianceWizard); 1442 1442 connect(actionPool()->action(UIActionIndexST_M_Machine_M_StartOrShow), &UIAction::triggered, 1443 1443 this, &UIVirtualBoxManager::sltPerformStartOrShowMachine); … … 1721 1721 actionPool()->action(UIActionIndexST_M_Machine_S_Settings)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Settings, items)); 1722 1722 actionPool()->action(UIActionIndexST_M_Machine_S_Clone)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Clone, items)); 1723 actionPool()->action(UIActionIndexST_M_Machine_S_Export)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Export, items));1724 1723 actionPool()->action(UIActionIndexST_M_Machine_S_Move)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Move, items)); 1724 actionPool()->action(UIActionIndexST_M_Machine_S_ExportToOCI)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_ExportToOCI, items)); 1725 1725 actionPool()->action(UIActionIndexST_M_Machine_S_Remove)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Remove, items)); 1726 1726 actionPool()->action(UIActionIndexST_M_Machine_S_AddGroup)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_AddGroup, items)); … … 1886 1886 UIVirtualMachineItem::isItemEditable(pItem); 1887 1887 } 1888 case UIActionIndexST_M_Machine_S_Export :1888 case UIActionIndexST_M_Machine_S_ExportToOCI: 1889 1889 { 1890 1890 return !actionPool()->action(iActionIndex)->property("opened").toBool() && -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp
r77297 r77305 1414 1414 m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Settings)); 1415 1415 m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Clone)); 1416 m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Export));1417 1416 m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Move)); 1417 m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_ExportToOCI)); 1418 1418 m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Remove)); 1419 1419 m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_AddGroup)); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportApp.cpp
r77297 r77305 40 40 UIWizardExportApp::UIWizardExportApp(QWidget *pParent, 41 41 const QStringList &selectedVMNames /* = QStringList() */, 42 bool fFastTraverTo Page2/* = false */)42 bool fFastTraverToExportOCI /* = false */) 43 43 : UIWizard(pParent, WizardType_ExportAppliance) 44 44 , m_selectedVMNames(selectedVMNames) 45 , m_fFastTraverTo Page2(fFastTraverToPage2)45 , m_fFastTraverToExportOCI(fFastTraverToExportOCI) 46 46 { 47 47 #ifndef VBOX_WS_MAC … … 212 212 { 213 213 setPage(Page1, new UIWizardExportAppPageBasic1(m_selectedVMNames)); 214 setPage(Page2, new UIWizardExportAppPageBasic2 );214 setPage(Page2, new UIWizardExportAppPageBasic2(m_fFastTraverToExportOCI)); 215 215 setPage(Page3, new UIWizardExportAppPageBasic3); 216 216 break; … … 218 218 case WizardMode_Expert: 219 219 { 220 setPage(PageExpert, new UIWizardExportAppPageExpert(m_selectedVMNames ));220 setPage(PageExpert, new UIWizardExportAppPageExpert(m_selectedVMNames, m_fFastTraverToExportOCI)); 221 221 break; 222 222 } … … 233 233 /* Now, when we are ready, we can 234 234 * fast traver to page 2 if requested: */ 235 if (m_fFastTraverTo Page2)235 if (m_fFastTraverToExportOCI) 236 236 button(QWizard::NextButton)->click(); 237 237 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportApp.h
r77297 r77305 51 51 /** Constructs export appliance wizard passing @a pParent to the base-class. 52 52 * @param selectedVMNames Brings the names of VMs to be exported. */ 53 UIWizardExportApp(QWidget *pParent, const QStringList &selectedVMNames = QStringList(), bool fFastTraverTo Page2= false);53 UIWizardExportApp(QWidget *pParent, const QStringList &selectedVMNames = QStringList(), bool fFastTraverToExportOCI = false); 54 54 55 55 /** Exports full appliance. */ … … 84 84 QStringList m_selectedVMNames; 85 85 /** Holds whether we should fast travel to page 2. */ 86 bool m_fFastTraverTo Page2;86 bool m_fFastTraverToExportOCI; 87 87 }; 88 88 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.cpp
r76606 r77305 54 54 *********************************************************************************************************************************/ 55 55 56 UIWizardExportAppPage2::UIWizardExportAppPage2() 57 : m_pFormatLayout(0) 56 UIWizardExportAppPage2::UIWizardExportAppPage2(bool fExportToOCIByDefault) 57 : m_fExportToOCIByDefault(fExportToOCIByDefault) 58 , m_pFormatLayout(0) 58 59 , m_pSettingsLayout1(0) 59 60 , m_pSettingsLayout2(0) … … 93 94 94 95 /* Initialize Cloud Provider Manager: */ 96 bool fOCIPresent = false; 95 97 CVirtualBox comVBox = vboxGlobal().virtualBox(); 96 98 m_comCloudProviderManager = comVBox.GetCloudProviderManager(); … … 120 122 m_pFormatComboBox->setItemData(m_pFormatComboBox->count() - 1, comProvider.GetShortName(), FormatData_ShortName); 121 123 m_pFormatComboBox->setItemData(m_pFormatComboBox->count() - 1, true, FormatData_IsItCloudFormat); 124 if (m_pFormatComboBox->itemData(m_pFormatComboBox->count() - 1, FormatData_ShortName).toString() == "OCI") 125 fOCIPresent = true; 122 126 } 123 127 } … … 125 129 126 130 /* Set default: */ 127 setFormat("ovf-1.0"); 131 if (m_fExportToOCIByDefault && fOCIPresent) 132 setFormat("OCI"); 133 else 134 setFormat("ovf-1.0"); 128 135 } 129 136 … … 733 740 *********************************************************************************************************************************/ 734 741 735 UIWizardExportAppPageBasic2::UIWizardExportAppPageBasic2() 736 : m_pLabelFormat(0) 742 UIWizardExportAppPageBasic2::UIWizardExportAppPageBasic2(bool fExportToOCIByDefault) 743 : UIWizardExportAppPage2(fExportToOCIByDefault) 744 , m_pLabelFormat(0) 737 745 , m_pLabelSettings(0) 738 746 { -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.h
r76581 r77305 80 80 81 81 /** Constructs 2nd page base. */ 82 UIWizardExportAppPage2( );82 UIWizardExportAppPage2(bool fExportToOCIByDefault); 83 83 84 84 /** Populates formats. */ … … 167 167 AbstractVSDParameterList cloudClientParameters() const; 168 168 169 /** Holds whether default format should be Export to OCI. */ 170 bool m_fExportToOCIByDefault; 171 169 172 /** Holds the Cloud Provider Manager reference. */ 170 173 CCloudProviderManager m_comCloudProviderManager; … … 245 248 246 249 /** Constructs 2nd basic page. */ 247 UIWizardExportAppPageBasic2( );250 UIWizardExportAppPageBasic2(bool fExportToOCIByDefault); 248 251 249 252 protected: -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.cpp
r76606 r77305 46 46 *********************************************************************************************************************************/ 47 47 48 UIWizardExportAppPageExpert::UIWizardExportAppPageExpert(const QStringList &selectedVMNames) 49 : m_pSelectorCnt(0) 48 UIWizardExportAppPageExpert::UIWizardExportAppPageExpert(const QStringList &selectedVMNames, bool fExportToOCIByDefault) 49 : UIWizardExportAppPage2(fExportToOCIByDefault) 50 , m_pSelectorCnt(0) 50 51 , m_pApplianceCnt(0) 51 52 , m_pSettingsCnt(0) -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.h
r76581 r77305 55 55 /** Constructs expert basic page. 56 56 * @param selectedVMNames Brings the list of selected VM names. */ 57 UIWizardExportAppPageExpert(const QStringList &selectedVMNames );57 UIWizardExportAppPageExpert(const QStringList &selectedVMNames, bool fExportToOCIByDefault); 58 58 59 59 protected:
Note:
See TracChangeset
for help on using the changeset viewer.