Changeset 87974 in vbox
- Timestamp:
- Mar 5, 2021 3:37:10 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic4.cpp
r87956 r87974 343 343 m_strDefaultName = strDefaultName.isEmpty() ? QString("NewVirtualDisk1") : strDefaultName; 344 344 m_strDefaultPath = fieldImp("machineFolder").toString(); 345 /* Set the recommended disk size if user has already not done so: */ 345 346 if (m_pSizeEditor && !m_fUserSetSize) 346 347 { … … 349 350 m_pSizeEditor->blockSignals(false); 350 351 } 351 352 352 } 353 353 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp
r87973 r87974 97 97 registerField("mediumPath", this, "mediumPath"); 98 98 registerField("mediumFormat", this, "mediumFormat"); 99 registerField("mediumSize", this, "mediumSize"); 100 99 101 100 102 disableEnableUnattendedRelatedWidgets(isUnattendedEnabled()); … … 121 123 void UIWizardNewVMPageExpert::sltOsTypeChanged() 122 124 { 123 /* Call to base-class: */124 125 onOsTypeChanged(); 125 126 126 setOSTypeDependedValues(); 127 128 /* Broadcast complete-change: */129 127 emit completeChanged(); 130 128 } … … 276 274 connect(m_pFormatButtonGroup, static_cast<void(QButtonGroup::*)(QAbstractButton*)>(&QButtonGroup::buttonClicked), 277 275 this, &UIWizardNewVMPageExpert::sltMediumFormatChanged); 276 if (m_pSizeEditor) 277 connect(m_pSizeEditor, &UIMediumSizeEditor::sigSizeChanged, 278 this, &UIWizardNewVMPageExpert::sltMediumSizeChanged); 278 279 } 279 280 … … 301 302 m_pEFICheckBox->blockSignals(false); 302 303 } 303 304 LONG64 recommendedDiskSize = type.GetRecommendedHDD(); 304 305 /* Prepare initial disk choice: */ 305 306 if (!m_userSetWidgets.contains(m_pDiskNew) && … … 307 308 !m_userSetWidgets.contains(m_pDiskExisting)) 308 309 { 309 if ( type.GetRecommendedHDD()!= 0)310 if (recommendedDiskSize != 0) 310 311 { 311 312 if (m_pDiskNew) … … 327 328 if (m_pDiskSelector) 328 329 m_pDiskSelector->setCurrentIndex(0); 330 } 331 332 if (m_pSizeEditor && !m_userSetWidgets.contains(m_pSizeEditor)) 333 { 334 m_pSizeEditor->blockSignals(true); 335 setMediumSize(recommendedDiskSize); 336 m_pSizeEditor->blockSignals(false); 329 337 } 330 338 … … 494 502 } 495 503 } 504 505 // return !mediumFormat().isNull() && 506 // mediumVariant() != (qulonglong)KMediumVariant_Max && 507 // !m_pLocationEditor->text().trimmed().isEmpty() && 508 // mediumSize() >= m_uMediumSizeMin && mediumSize() <= m_uMediumSizeMax; 509 496 510 return fIsComplete; 497 511 } … … 568 582 } 569 583 584 void UIWizardNewVMPageExpert::sltMediumSizeChanged() 585 { 586 if (!m_pSizeEditor) 587 return; 588 m_userSetWidgets << m_pSizeEditor; 589 completeChanged(); 590 } 591 570 592 void UIWizardNewVMPageExpert::updateVirtualDiskPathFromMachinePathName() 571 593 { -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.h
r87973 r87974 73 73 // Q_PROPERTY(qulonglong mediumVariant READ mediumVariant WRITE setMediumVariant); 74 74 Q_PROPERTY(QString mediumPath READ mediumPath); 75 //Q_PROPERTY(qulonglong mediumSize READ mediumSize WRITE setMediumSize);75 Q_PROPERTY(qulonglong mediumSize READ mediumSize WRITE setMediumSize); 76 76 77 77 public: … … 102 102 void sltValueModified(); 103 103 void sltMediumFormatChanged(); 104 void sltMediumSizeChanged(); 104 105 105 106 private:
Note:
See TracChangeset
for help on using the changeset viewer.