Changeset 91589 in vbox for trunk/src/VBox
- Timestamp:
- Oct 6, 2021 10:43:27 AM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance
- Files:
-
- 1 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportApp.cpp
r91578 r91589 315 315 /* Translate wizard: */ 316 316 setWindowTitle(tr("Import Virtual Appliance")); 317 setButtonText(QWizard::CustomButton2, tr("Restore Defaults"));318 317 setButtonText(QWizard::FinishButton, tr("Import")); 319 }320 321 void UIWizardImportApp::sltCurrentIdChanged(int iId)322 {323 /* Call to base-class: */324 UIWizard::sltCurrentIdChanged(iId);325 /* Enable 2nd button (Reset to Defaults) for 2nd and Expert pages only! */326 setOption(QWizard::HaveCustomButton2, (mode() == WizardMode_Basic && iId == Page2) ||327 (mode() == WizardMode_Expert && iId == PageExpert));328 }329 330 void UIWizardImportApp::sltCustomButtonClicked(int iId)331 {332 /* Call to base-class: */333 UIWizard::sltCustomButtonClicked(iId);334 335 /* Handle 2nd button: */336 if (iId == CustomButton2)337 {338 /* Get appliance widget: */339 ImportAppliancePointer pApplianceWidget = field("applianceWidget").value<ImportAppliancePointer>();340 AssertMsg(!pApplianceWidget.isNull(), ("Appliance Widget is not set!\n"));341 /* Reset it to default: */342 pApplianceWidget->restoreDefaults();343 }344 318 } 345 319 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportApp.h
r91578 r91589 81 81 virtual void retranslateUi() /* override */; 82 82 83 protected slots:84 85 /** Handles change for page with @a iId. */86 virtual void sltCurrentIdChanged(int iId) /* override */;87 /** Handles custom button 2 click for page with @a iId. */88 virtual void sltCustomButtonClicked(int iId) /* override */;89 90 83 private: 91 84 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.cpp
r91578 r91589 42 42 /* COM includes: */ 43 43 #include "CStringArray.h" 44 #include "CVirtualSystemDescription.h" 44 45 45 46 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.h
r91563 r91589 23 23 24 24 /* GUI includes: */ 25 #include "UIWizardImportAppDefs.h"26 25 #include "UIWizardPage.h" 27 26 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic2.cpp
r91578 r91589 27 27 /* GUI includes: */ 28 28 #include "QIRichTextLabel.h" 29 #include "UIApplianceImportEditorWidget.h" 29 30 #include "UIApplianceUnverifiedCertificateViewer.h" 30 31 #include "UICommon.h" 31 32 #include "UIFilePathSelector.h" 33 #include "UIFormEditorWidget.h" 32 34 #include "UIMessageCenter.h" 33 35 #include "UIWizardImportApp.h" … … 47 49 UIWizardImportAppPage2::UIWizardImportAppPage2() 48 50 : m_pSettingsCntLayout(0) 51 , m_pApplianceWidget(0) 49 52 , m_pLabelImportFilePath(0) 50 53 , m_pEditorImportFilePath(0) … … 53 56 , m_pLabelAdditionalOptions(0) 54 57 , m_pCheckboxImportHDsAsVDI(0) 58 , m_pFormEditor(0) 55 59 { 56 60 } … … 267 271 this, &UIWizardImportAppPageBasic2::sltHandleMACImportPolicyChange); 268 272 269 /* Register classes: */270 qRegisterMetaType<ImportAppliancePointer>();271 273 /* Register fields: */ 272 registerField("applianceWidget", this, "applianceWidget");273 274 registerField("macAddressImportPolicy", this, "macAddressImportPolicy"); 274 275 registerField("importHDsAsVDI", this, "importHDsAsVDI"); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic2.h
r91578 r91589 23 23 24 24 /* GUI includes: */ 25 #include "UIFormEditorWidget.h"26 25 #include "UIWizardImportApp.h" 27 #include "UIWizardImportAppDefs.h"28 26 #include "UIWizardPage.h" 29 27 30 28 /* Forward declarations: */ 29 class QCheckBox; 31 30 class QComboBox; 32 31 class QLabel; 33 32 class QStackedLayout; 34 33 class QIRichTextLabel; 34 class UIApplianceImportEditorWidget; 35 35 class UIFilePathSelector; 36 class UIFormEditorWidget; 36 37 37 38 /** UIWizardPageBase extension for 2nd page of the Import Appliance wizard. */ … … 55 56 void refreshFormPropertiesTable(); 56 57 57 /** Returns appliance widget instance. */58 ImportAppliancePointer applianceWidget() const { return m_pApplianceWidget; }59 60 58 /** Returns MAC address import policy. */ 61 59 MACAddressImportPolicy macAddressImportPolicy() const; … … 70 68 71 69 /** Holds the appliance widget instance. */ 72 ImportAppliancePointerm_pApplianceWidget;70 UIApplianceImportEditorWidget *m_pApplianceWidget; 73 71 /** Holds the import file-path label instance. */ 74 QLabel *m_pLabelImportFilePath;72 QLabel *m_pLabelImportFilePath; 75 73 /** Holds the import file-path editor instance. */ 76 UIFilePathSelector *m_pEditorImportFilePath;74 UIFilePathSelector *m_pEditorImportFilePath; 77 75 /** Holds the MAC address label instance. */ 78 QLabel *m_pLabelMACImportPolicy;76 QLabel *m_pLabelMACImportPolicy; 79 77 /** Holds the MAC address combo instance. */ 80 QComboBox *m_pComboMACImportPolicy;78 QComboBox *m_pComboMACImportPolicy; 81 79 /** Holds the additional options label instance. */ 82 QLabel *m_pLabelAdditionalOptions;80 QLabel *m_pLabelAdditionalOptions; 83 81 /** Holds the 'import HDs as VDI' checkbox instance. */ 84 QCheckBox *m_pCheckboxImportHDsAsVDI;82 QCheckBox *m_pCheckboxImportHDsAsVDI; 85 83 86 84 /** Holds the Form Editor widget instance. */ 87 UIFormEditorWidget Pointerm_pFormEditor;85 UIFormEditorWidget *m_pFormEditor; 88 86 }; 89 87 … … 92 90 { 93 91 Q_OBJECT; 94 Q_PROPERTY(ImportAppliancePointer applianceWidget READ applianceWidget);95 92 Q_PROPERTY(MACAddressImportPolicy macAddressImportPolicy READ macAddressImportPolicy); 96 93 Q_PROPERTY(bool importHDsAsVDI READ importHDsAsVDI); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.cpp
r91578 r91589 34 34 #include "UIEmptyFilePathSelector.h" 35 35 #include "UIFilePathSelector.h" 36 #include "UIFormEditorWidget.h" 36 37 #include "UIIconPool.h" 37 38 #include "UIMessageCenter.h" … … 285 286 this, &UIWizardImportAppPageExpert::sltHandleMACImportPolicyChange); 286 287 287 /* Register classes: */288 qRegisterMetaType<ImportAppliancePointer>();289 288 /* Register fields: */ 290 289 registerField("isSourceCloudOne", this, "isSourceCloudOne"); … … 293 292 registerField("vsdForm", this, "vsdForm"); 294 293 registerField("machineId", this, "machineId"); 295 registerField("applianceWidget", this, "applianceWidget");296 294 registerField("macAddressImportPolicy", this, "macAddressImportPolicy"); 297 295 registerField("importHDsAsVDI", this, "importHDsAsVDI"); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.h
r91578 r91589 40 40 Q_PROPERTY(CVirtualSystemDescriptionForm vsdForm READ vsdForm); 41 41 Q_PROPERTY(QString machineId READ machineId); 42 Q_PROPERTY(ImportAppliancePointer applianceWidget READ applianceWidget);43 42 Q_PROPERTY(MACAddressImportPolicy macAddressImportPolicy READ macAddressImportPolicy); 44 43 Q_PROPERTY(bool importHDsAsVDI READ importHDsAsVDI);
Note:
See TracChangeset
for help on using the changeset viewer.