Changeset 90232 in vbox
- Timestamp:
- Jul 16, 2021 2:27:18 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 145770
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardNewVMEditors.cpp
r90208 r90232 191 191 192 192 if (m_pGAISOFilePathSelector) 193 m_pGAISOFilePathSelector->setEnabled( m_pGAISOFilePathSelector);193 m_pGAISOFilePathSelector->setEnabled(fEnabled); 194 194 } 195 195 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardNewVMEditors.h
r90230 r90232 93 93 /** @} */ 94 94 95 p ublicslots:95 private slots: 96 96 97 97 void sltToggleWidgetsEnabled(bool fEnabled); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp
r90230 r90232 125 125 if (!m_userModifiedParameters.contains("MediumPath")) 126 126 updateVirtualMediumPathFromMachinePathName(); 127 if (!m_userModifiedParameters.contains("HostnameDomainName")) 128 updateHostnameDomainNameFromMachineName(); 127 129 emit completeChanged(); 128 130 } … … 173 175 m_userModifiedParameters << "GuestAdditionsISOPath"; 174 176 newVMWizardPropertySet(GuestAdditionsISOPath, strPath); 177 emit completeChanged(); 178 } 179 180 void UIWizardNewVMPageExpert::sltInstallGACheckBoxToggle(bool fEnabled) 181 { 182 newVMWizardPropertySet(InstallGuestAdditions, fEnabled); 183 m_userModifiedParameters << "InstallGuestAdditions"; 175 184 emit completeChanged(); 176 185 } … … 213 222 if (m_pNameAndSystemLayout && m_pNameAndSystemEditor) 214 223 m_pNameAndSystemLayout->setColumnMinimumWidth(0, m_pNameAndSystemEditor->firstColumnWidth()); 215 }216 217 void UIWizardNewVMPageExpert::sltInstallGACheckBoxToggle(bool fEnabled)218 {219 Q_UNUSED(fEnabled);220 emit completeChanged();221 224 } 222 225 … … 256 259 257 260 } 258 // if (m_pUserNamePasswordGroupBox) 259 // connect(m_pUserNamePasswordGroupBox, &UIUserNamePasswordEditor::sigSomeTextChanged, 260 // this, &UIWizardNewVMPageExpert::completeChanged); 261 262 if (m_pUserNamePasswordGroupBox) 263 { 264 connect(m_pUserNamePasswordGroupBox, &UIUserNamePasswordGroupBox::sigPasswordChanged, 265 this, &UIWizardNewVMPageExpert::sltPasswordChanged); 266 connect(m_pUserNamePasswordGroupBox, &UIUserNamePasswordGroupBox::sigUserNameChanged, 267 this, &UIWizardNewVMPageExpert::sltUserNameChanged); 268 } 269 270 271 if (m_pAdditionalOptionsContainer) 272 { 273 connect(m_pAdditionalOptionsContainer, &UIAdditionalUnattendedOptions::sigHostnameDomainNameChanged, 274 this, &UIWizardNewVMPageExpert::sltHostnameDomainNameChanged); 275 connect(m_pAdditionalOptionsContainer, &UIAdditionalUnattendedOptions::sigProductKeyChanged, 276 this, &UIWizardNewVMPageExpert::sltProductKeyChanged); 277 connect(m_pAdditionalOptionsContainer, &UIAdditionalUnattendedOptions::sigStartHeadlessChanged, 278 this, &UIWizardNewVMPageExpert::sltStartHeadlessChanged); 279 } 261 280 262 281 … … 356 375 AssertReturnVoid(pWizard); 357 376 /* Initialize wizard properties: */ 358 if (m_pNameAndSystemEditor) 359 { 360 /* Guest OS type: */ 361 newVMWizardPropertySet(GuestOSFamilyId, m_pNameAndSystemEditor->familyId()); 362 newVMWizardPropertySet(GuestOSType, m_pNameAndSystemEditor->type()); 363 /* Vm name, folder, file path etc. will be initilized by composeMachineFilePath: */ 364 } 365 366 /* Medium related properties: */ 367 if (m_pFormatButtonGroup) 368 newVMWizardPropertySet(MediumFormat, m_pFormatButtonGroup->mediumFormat()); 369 if (!m_userModifiedParameters.contains("MediumPath")) 370 updateVirtualMediumPathFromMachinePathName(); 377 { 378 if (m_pNameAndSystemEditor) 379 { 380 /* Guest OS type: */ 381 newVMWizardPropertySet(GuestOSFamilyId, m_pNameAndSystemEditor->familyId()); 382 newVMWizardPropertySet(GuestOSType, m_pNameAndSystemEditor->type()); 383 /* Vm name, folder, file path etc. will be initilized by composeMachineFilePath: */ 384 } 385 386 /* Medium related properties: */ 387 if (m_pFormatButtonGroup) 388 newVMWizardPropertySet(MediumFormat, m_pFormatButtonGroup->mediumFormat()); 389 if (!m_userModifiedParameters.contains("MediumPath")) 390 updateVirtualMediumPathFromMachinePathName(); 391 } 392 393 /* Initialize user/password if they are not modified by the user: */ 394 if (m_pUserNamePasswordGroupBox) 395 { 396 m_pUserNamePasswordGroupBox->blockSignals(true); 397 if (!m_userModifiedParameters.contains("UserName")) 398 m_pUserNamePasswordGroupBox->setUserName(pWizard->userName()); 399 if (!m_userModifiedParameters.contains("Password")) 400 m_pUserNamePasswordGroupBox->setPassword(pWizard->password()); 401 m_pUserNamePasswordGroupBox->blockSignals(false); 402 } 403 if (!m_userModifiedParameters.contains("HostnameDomainName")) 404 updateHostnameDomainNameFromMachineName(); 405 371 406 372 407 // disableEnableUnattendedRelatedWidgets(isUnattendedEnabled()); … … 674 709 } 675 710 711 void UIWizardNewVMPageExpert::sltPasswordChanged(const QString &strPassword) 712 { 713 newVMWizardPropertySet(Password, strPassword); 714 m_userModifiedParameters << "Password"; 715 emit completeChanged(); 716 } 717 718 void UIWizardNewVMPageExpert::sltUserNameChanged(const QString &strUserName) 719 { 720 newVMWizardPropertySet(UserName, strUserName); 721 m_userModifiedParameters << "UserName"; 722 emit completeChanged(); 723 } 724 725 void UIWizardNewVMPageExpert::sltHostnameDomainNameChanged(const QString &strHostnameDomainName) 726 { 727 newVMWizardPropertySet(HostnameDomainName, strHostnameDomainName); 728 m_userModifiedParameters << "HostnameDomainName"; 729 emit completeChanged(); 730 } 731 732 void UIWizardNewVMPageExpert::sltProductKeyChanged(const QString &strProductKey) 733 { 734 m_userModifiedParameters << "ProductKey"; 735 newVMWizardPropertySet(ProductKey, strProductKey); 736 } 737 738 void UIWizardNewVMPageExpert::sltStartHeadlessChanged(bool fStartHeadless) 739 { 740 m_userModifiedParameters << "StartHeadless"; 741 newVMWizardPropertySet(StartHeadless, fStartHeadless); 742 } 743 744 676 745 void UIWizardNewVMPageExpert::updateVirtualMediumPathFromMachinePathName() 677 746 { … … 756 825 } 757 826 } 827 828 void UIWizardNewVMPageExpert::updateHostnameDomainNameFromMachineName() 829 { 830 if (!m_pAdditionalOptionsContainer) 831 return; 832 UIWizardNewVM *pWizard = qobject_cast<UIWizardNewVM*>(wizard()); 833 AssertReturnVoid(pWizard); 834 835 m_pAdditionalOptionsContainer->blockSignals(true); 836 m_pAdditionalOptionsContainer->setHostname(pWizard->machineBaseName()); 837 m_pAdditionalOptionsContainer->setDomainName("myguest.virtualbox.org"); 838 /* Initialize unattended hostname here since we cannot get the default value from CUnattended this early (unlike username etc): */ 839 newVMWizardPropertySet(HostnameDomainName, m_pAdditionalOptionsContainer->hostnameDomainName()); 840 841 m_pAdditionalOptionsContainer->blockSignals(false); 842 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.h
r90225 r90232 88 88 void sltCPUCountChanged(int iCount); 89 89 void sltEFIEnabledChanged(bool fEnabled); 90 void sltPasswordChanged(const QString &strPassword); 91 void sltUserNameChanged(const QString &strUserName); 90 92 93 void sltHostnameDomainNameChanged(const QString &strHostnameDomainName); 94 void sltProductKeyChanged(const QString &strProductKey); 95 void sltStartHeadlessChanged(bool fStartHeadless); 91 96 92 97 private: … … 128 133 void updateVirtualMediumPathFromMachinePathName(); 129 134 void updateWidgetAterMediumFormatChange(); 135 void updateHostnameDomainNameFromMachineName(); 130 136 void setEnableNewDiskWidgets(bool fEnable); 131 137 void setVirtualDiskFromDiskCombo(); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMUnattendedPageBasic.cpp
r90174 r90232 130 130 if (m_pAdditionalOptionsContainer) 131 131 m_pAdditionalOptionsContainer->disableEnableProductKeyWidgets(isProductKeyWidgetEnabled()); 132 if (m_pGAInstallationISOContainer)133 m_pGAInstallationISOContainer->sltToggleWidgetsEnabled(m_pGAInstallationISOContainer->isChecked());134 132 retranslateUi(); 135 133 … … 157 155 newVMWizardPropertySet(HostnameDomainName, m_pAdditionalOptionsContainer->hostnameDomainName()); 158 156 } 159 160 157 m_pAdditionalOptionsContainer->blockSignals(false); 161 158 } … … 201 198 void UIWizardNewVMUnattendedPageBasic::sltInstallGACheckBoxToggle(bool fEnabled) 202 199 { 203 if (m_pGAInstallationISOContainer)204 m_pGAInstallationISOContainer->sltToggleWidgetsEnabled(fEnabled);205 200 newVMWizardPropertySet(InstallGuestAdditions, fEnabled); 206 201 m_userModifiedParameters << "InstallGuestAdditions"; … … 246 241 void UIWizardNewVMUnattendedPageBasic::sltProductKeyChanged(const QString &strProductKey) 247 242 { 243 m_userModifiedParameters << "ProductKey"; 248 244 newVMWizardPropertySet(ProductKey, strProductKey); 249 245 } … … 251 247 void UIWizardNewVMUnattendedPageBasic::sltStartHeadlessChanged(bool fStartHeadless) 252 248 { 249 m_userModifiedParameters << "StartHeadless"; 253 250 newVMWizardPropertySet(StartHeadless, fStartHeadless); 254 251 }
Note:
See TracChangeset
for help on using the changeset viewer.