Changeset 90273 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jul 21, 2021 11:29:35 AM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.cpp
r90272 r90273 382 382 if (!m_pLocationEditor) 383 383 return; 384 m_pLocationEditor->blockSignals(true);385 384 m_pLocationEditor->setText(strMediumPath); 386 m_pLocationEditor->blockSignals(false);387 385 } 388 386 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp
r90262 r90273 812 812 { 813 813 m_strMediumPath = strMediumPath; 814 printf("%s\n", qPrintable(m_strMediumPath)); 814 815 } 815 816 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp
r90272 r90273 91 91 /* Register classes: */ 92 92 qRegisterMetaType<CMedium>(); 93 //qRegisterMetaType<SelectedDiskSource>();94 95 /* Register fields: */96 // registerField("name*", m_pNameAndSystemEditor, "name", SIGNAL(sigNameChanged(const QString &)));97 // registerField("type", m_pNameAndSystemEditor, "type", SIGNAL(sigOsTypeChanged()));98 // registerField("machineFilePath", this, "machineFilePath");99 // registerField("machineFolder", this, "machineFolder");100 // registerField("machineBaseName", this, "machineBaseName");101 // registerField("baseMemory", this, "baseMemory");102 // registerField("guestOSFamiyId", this, "guestOSFamiyId");103 // registerField("ISOFilePath", this, "ISOFilePath");104 // registerField("isUnattendedEnabled", this, "isUnattendedEnabled");105 // registerField("startHeadless", this, "startHeadless");106 // registerField("detectedOSTypeId", this, "detectedOSTypeId");107 // registerField("userName", this, "userName");108 // registerField("password", this, "password");109 // registerField("hostname", this, "hostname");110 // registerField("installGuestAdditions", this, "installGuestAdditions");111 // registerField("guestAdditionsISOPath", this, "guestAdditionsISOPath");112 // registerField("productKey", this, "productKey");113 // registerField("VCPUCount", this, "VCPUCount");114 // registerField("EFIEnabled", this, "EFIEnabled");115 // registerField("mediumPath", this, "mediumPath");116 // registerField("mediumFormat", this, "mediumFormat");117 // registerField("mediumSize", this, "mediumSize");118 // registerField("selectedDiskSource", this, "selectedDiskSource");119 // registerField("mediumVariant", this, "mediumVariant");120 121 93 } 122 94 … … 126 98 UIWizardNewVMNameOSTypePage::guessOSTypeFromName(m_pNameAndSystemEditor, strNewName); 127 99 UIWizardNewVMNameOSTypePage::composeMachineFilePath(m_pNameAndSystemEditor, qobject_cast<UIWizardNewVM*>(wizard())); 128 if (!m_userModifiedParameters.contains("MediumPath") && m_pSizeAndLocationGroup) 129 { 100 if (!m_userModifiedParameters.contains("MediumPath")) 130 101 updateVirtualMediumPathFromMachinePathName(); 131 newVMWizardPropertySet(MediumPath, m_pSizeAndLocationGroup->mediumPath());132 }133 102 if (!m_userModifiedParameters.contains("HostnameDomainName")) 134 103 updateHostnameDomainNameFromMachineName(); … … 140 109 Q_UNUSED(strNewPath); 141 110 UIWizardNewVMNameOSTypePage::composeMachineFilePath(m_pNameAndSystemEditor, qobject_cast<UIWizardNewVM*>(wizard())); 142 if (!m_userModifiedParameters.contains("MediumPath") && m_pSizeAndLocationGroup) 143 { 111 if (!m_userModifiedParameters.contains("MediumPath")) 144 112 updateVirtualMediumPathFromMachinePathName(); 145 newVMWizardPropertySet(MediumPath, m_pSizeAndLocationGroup->mediumPath());146 }147 113 } 148 114 … … 398 364 if (m_pFormatButtonGroup) 399 365 newVMWizardPropertySet(MediumFormat, m_pFormatButtonGroup->mediumFormat()); 400 /* First set value for medium path in widget the wizard: */401 366 updateVirtualMediumPathFromMachinePathName(); 402 newVMWizardPropertySet(MediumPath, m_pSizeAndLocationGroup->mediumPath());403 367 } 404 368 … … 422 386 setOSTypeDependedValues(); 423 387 disableEnableUnattendedRelatedWidgets(isUnattendedEnabled()); 424 update WidgetAfterMediumFormatChange();388 updateDiskWidgetsAfterMediumFormatChange(); 425 389 // setSkipCheckBoxEnable(); 426 390 retranslateUi(); … … 693 657 m_userModifiedParameters << "MediumFormat"; 694 658 newVMWizardPropertySet(MediumFormat, m_pFormatButtonGroup->mediumFormat()); 695 696 updateWidgetAfterMediumFormatChange(); 659 updateDiskWidgetsAfterMediumFormatChange(); 697 660 emit completeChanged(); 698 661 } … … 815 778 UIWizardNewVMDiskPage::absoluteFilePath(UIWizardNewVMDiskPage::toFileName(strDiskFileName, 816 779 strExtension), strMediumPath); 780 m_pSizeAndLocationGroup->blockSignals(true); 817 781 m_pSizeAndLocationGroup->setMediumPath(strMediumFilePath); 818 } 819 } 820 821 void UIWizardNewVMPageExpert::updateWidgetAfterMediumFormatChange() 782 m_pSizeAndLocationGroup->blockSignals(false); 783 newVMWizardPropertySet(MediumPath, m_pSizeAndLocationGroup->mediumPath()); 784 } 785 } 786 787 void UIWizardNewVMPageExpert::updateDiskWidgetsAfterMediumFormatChange() 822 788 { 823 789 UIWizardNewVM *pWizard = qobject_cast<UIWizardNewVM*>(wizard()); … … 825 791 const CMediumFormat &comMediumFormat = pWizard->mediumFormat(); 826 792 AssertReturnVoid(!comMediumFormat.isNull()); 793 794 /* Block signals of the updated widgets to avoid calling corresponding slots since they add the parameters to m_userModifiedParameters: */ 795 m_pDiskVariantGroupBox->blockSignals(true); 827 796 m_pDiskVariantGroupBox->updateMediumVariantWidgetsAfterFormatChange(comMediumFormat); 797 m_pDiskVariantGroupBox->blockSignals(false); 798 799 m_pSizeAndLocationGroup->blockSignals(true); 828 800 m_pSizeAndLocationGroup->updateMediumPath(comMediumFormat, m_pFormatButtonGroup->formatExtensions()); 801 m_pSizeAndLocationGroup->blockSignals(true); 802 /* Update the wizard parameters explicitly since we blocked th signals: */ 803 newVMWizardPropertySet(MediumPath, m_pSizeAndLocationGroup->mediumPath()); 804 newVMWizardPropertySet(MediumVariant, m_pDiskVariantGroupBox->mediumVariant()); 829 805 } 830 806 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.h
r90263 r90273 135 135 136 136 void updateVirtualMediumPathFromMachinePathName(); 137 void update WidgetAfterMediumFormatChange();137 void updateDiskWidgetsAfterMediumFormatChange(); 138 138 void updateHostnameDomainNameFromMachineName(); 139 139 void setEnableNewDiskWidgets(bool fEnable);
Note:
See TracChangeset
for help on using the changeset viewer.