Changeset 88147 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Mar 17, 2021 7:21:33 AM (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/UIWizardNewVMPageBasic2.cpp
r88038 r88147 48 48 , m_pHostnameLineEdit(0) 49 49 , m_pHostnameLabel(0) 50 , m_pGAInstallCheckBox(0)51 50 , m_pGAISOPathLabel(0) 52 51 , m_pGAISOFilePathSelector(0) … … 98 97 bool UIWizardNewVMPage2::installGuestAdditions() const 99 98 { 100 if (!m_pGAInstall CheckBox)101 return false; 102 return m_pGAInstall CheckBox->isChecked();99 if (!m_pGAInstallationISOContainer) 100 return false; 101 return m_pGAInstallationISOContainer->isChecked(); 103 102 } 104 103 105 104 void UIWizardNewVMPage2::setInstallGuestAdditions(bool fInstallGA) 106 105 { 107 if (m_pGAInstall CheckBox)108 m_pGAInstall CheckBox->setChecked(fInstallGA);106 if (m_pGAInstallationISOContainer) 107 m_pGAInstallationISOContainer->setChecked(fInstallGA); 109 108 } 110 109 … … 135 134 136 135 m_pGAInstallationISOContainer = new QGroupBox; 136 m_pGAInstallationISOContainer->setCheckable(true); 137 137 QGridLayout *pGAInstallationISOContainer = new QGridLayout(m_pGAInstallationISOContainer); 138 m_pGAInstallCheckBox = new QCheckBox;139 if (m_pGAInstallCheckBox)140 pGAInstallationISOContainer->addWidget(m_pGAInstallCheckBox, 0, 0, 1, 8);141 138 m_pGAISOPathLabel = new QLabel; 142 139 if (m_pGAISOPathLabel) 143 pGAInstallationISOContainer->addWidget(m_pGAISOPathLabel, 1, 1, 1, 1);140 pGAInstallationISOContainer->addWidget(m_pGAISOPathLabel, 0, 1, 1, 1); 144 141 145 142 m_pGAISOFilePathSelector = new UIFilePathSelector; … … 149 146 m_pGAISOFilePathSelector->setFileDialogFilters("*.iso *.ISO"); 150 147 m_pGAISOFilePathSelector->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum); 151 pGAInstallationISOContainer->addWidget(m_pGAISOFilePathSelector, 1, 2, 1, 6); 148 m_pGAISOFilePathSelector->setInitialPath(uiCommon().defaultFolderPathForType(UIMediumDeviceType_DVD)); 149 pGAInstallationISOContainer->addWidget(m_pGAISOFilePathSelector, 0, 2, 1, 6); 152 150 if (m_pGAISOPathLabel) 153 151 m_pGAISOPathLabel->setBuddy(m_pGAISOFilePathSelector); … … 186 184 if (m_pGAISOFilePathSelector) 187 185 m_pGAISOFilePathSelector->setToolTip(UIWizardNewVM::tr("Please select an installation medium (ISO file)")); 188 if (m_pGAInstall CheckBox)189 { 190 m_pGAInstall CheckBox->setText(UIWizardNewVM::tr("&InstallGuest Additions"));191 m_pGAInstall CheckBox->setToolTip(UIWizardNewVM::tr("<p>When checked the guest additions will be installed "186 if (m_pGAInstallationISOContainer) 187 { 188 m_pGAInstallationISOContainer->setTitle(UIWizardNewVM::tr("&Guest Additions")); 189 m_pGAInstallationISOContainer->setToolTip(UIWizardNewVM::tr("<p>When checked the guest additions will be installed " 192 190 "after the OS install.</p>")); 193 191 } … … 198 196 if (m_pAdditionalOptionsContainer) 199 197 m_pAdditionalOptionsContainer->setTitle(UIWizardNewVM::tr("Additional options")); 200 if (m_pGAInstallationISOContainer)201 m_pGAInstallationISOContainer->setTitle(UIWizardNewVM::tr("Guest Additions"));202 198 if (m_pStartHeadlessCheckBox) 203 199 { … … 295 291 bool UIWizardNewVMPage2::isGAInstallEnabled() const 296 292 { 297 if (m_pGAInstall CheckBox && m_pGAInstallCheckBox->isChecked())293 if (m_pGAInstallationISOContainer && m_pGAInstallationISOContainer->isChecked()) 298 294 return true; 299 295 return false; … … 337 333 this, &UIWizardNewVMPageBasic2::sltGAISOPathChanged); 338 334 if (m_pGAISOFilePathSelector) 339 connect(m_pGAInstall CheckBox, &QCheckBox::toggled,335 connect(m_pGAInstallationISOContainer, &QGroupBox::toggled, 340 336 this, &UIWizardNewVMPageBasic2::sltInstallGACheckBoxToggle); 341 337 } … … 355 351 { 356 352 disableEnableProductKeyWidgets(isProductKeyWidgetEnabled()); 357 disableEnableGAWidgets(m_pGAInstall CheckBox ? m_pGAInstallCheckBox->isChecked() : false);353 disableEnableGAWidgets(m_pGAInstallationISOContainer ? m_pGAInstallationISOContainer->isChecked() : false); 358 354 retranslateUi(); 359 355 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.h
r87571 r88147 88 88 QGroupBox *m_pAdditionalOptionsContainer; 89 89 QGroupBox *m_pGAInstallationISOContainer; 90 91 90 QCheckBox *m_pStartHeadlessCheckBox; 92 91 UIUserNamePasswordEditor *m_pUserNamePasswordEditor; 93 92 QLineEdit *m_pHostnameLineEdit; 94 QLabel *m_pHostnameLabel; 95 QCheckBox *m_pGAInstallCheckBox; 96 QLabel *m_pGAISOPathLabel; 93 QLabel *m_pHostnameLabel; 94 QLabel *m_pGAISOPathLabel; 97 95 UIFilePathSelector *m_pGAISOFilePathSelector; 98 96 /** Product key stuff. */ 99 97 QLineEdit *m_pProductKeyLineEdit; 100 QLabel *m_pProductKeyLabel;98 QLabel *m_pProductKeyLabel; 101 99 /** @} */ 102 100 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp
r88117 r88147 219 219 this, &UIWizardNewVMPageExpert::sltGAISOPathChanged); 220 220 221 if (m_pGAInstall CheckBox)222 connect(m_pGAInstall CheckBox, &QCheckBox::toggled,221 if (m_pGAInstallationISOContainer) 222 connect(m_pGAInstallationISOContainer, &QGroupBox::toggled, 223 223 this, &UIWizardNewVMPageExpert::sltInstallGACheckBoxToggle); 224 224 … … 442 442 } 443 443 /* Check the GA installation medium: */ 444 if (m_pGAInstall CheckBox->isChecked() && !checkGAISOFile())444 if (m_pGAInstallationISOContainer && m_pGAInstallationISOContainer->isChecked() && !checkGAISOFile()) 445 445 { 446 446 m_pToolBox->setPageTitleIcon(ExpertToolboxItems_Unattended,
Note:
See TracChangeset
for help on using the changeset viewer.