Changeset 87322 in vbox
- Timestamp:
- Jan 20, 2021 12:45:43 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm
- Files:
-
- 10 edited
-
UIWizardNewVM.cpp (modified) (4 diffs)
-
UIWizardNewVM.h (modified) (1 diff)
-
UIWizardNewVMPageBasic1.cpp (modified) (11 diffs)
-
UIWizardNewVMPageBasic1.h (modified) (4 diffs)
-
UIWizardNewVMPageBasic2.cpp (modified) (11 diffs)
-
UIWizardNewVMPageBasic2.h (modified) (4 diffs)
-
UIWizardNewVMPageBasic3.cpp (modified) (3 diffs)
-
UIWizardNewVMPageBasic3.h (modified) (1 diff)
-
UIWizardNewVMPageExpert.cpp (modified) (10 diffs)
-
UIWizardNewVMPageExpert.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp
r87251 r87322 130 130 * Usually we are assigning extra-data values through UIExtraDataManager, 131 131 * but in that special case VM was not registered yet, so UIExtraDataManager is unaware of it: */ 132 if (!isUnattended InstallEnabled() &&132 if (!isUnattendedEnabled() && 133 133 (field("virtualDiskId").toString().isNull() || !field("virtualDisk").value<CMedium>().isNull())) 134 134 m_machine.SetExtraData(GUI_FirstRun, "yes"); … … 525 525 setField("password", m_unattendedInstallData.m_strPassword); 526 526 setField("hostname", m_unattendedInstallData.m_strHostname); 527 setField("installGuestAdditions", m_unattendedInstallData.m_fInstallGuestAdditions);528 527 setField("guestAdditionsISOPath", m_unattendedInstallData.m_strGuestAdditionsISOPath); 529 528 } … … 552 551 } 553 552 554 bool UIWizardNewVM::isUnattended InstallEnabled() const553 bool UIWizardNewVM::isUnattendedEnabled() const 555 554 { 556 555 QVariant fieldValue = field("isUnattendedEnabled"); … … 564 563 return getStringFieldValue("guestOSFamiyId").contains("windows", Qt::CaseInsensitive); 565 564 } 566 567 void UIWizardNewVM::increaseLayoutLeftMargin(QLayout *pLayout, float mult /* = 2 */)568 {569 if (!pLayout)570 return;571 QMargins margins = pLayout->contentsMargins();572 pLayout->setContentsMargins(mult * margins.left(),573 margins.top(),574 margins.right(),575 margins.bottom());576 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h
r87249 r87322 82 82 void setDefaultUnattendedInstallData(const UIUnattendedInstallData &unattendedInstallData); 83 83 const UIUnattendedInstallData &unattendedInstallData() const; 84 bool isUnattended InstallEnabled() const;84 bool isUnattendedEnabled() const; 85 85 bool isGuestOSTypeWindows() const; 86 /** Increases the amoun of the left marign of @p pLayout. */87 static void increaseLayoutLeftMargin(QLayout *pLayout, float mult = 2);88 86 89 87 protected: -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp
r87318 r87322 182 182 : m_pISOSelectorLabel(0) 183 183 , m_pISOFilePathSelector(0) 184 , m_pEnableUnattendedInstallCheckBox(0)185 184 , m_pStartHeadlessCheckBox(0) 186 185 , m_pNameAndSystemEditor(0) … … 268 267 bool UIWizardNewVMPage1::checkISOFile() const 269 268 { 270 if (isUnattendedEnabled()) 271 { 272 QString strISOFilePath = m_pISOFilePathSelector ? m_pISOFilePathSelector->path() : QString(); 273 if (!QFileInfo(strISOFilePath).exists()) 274 return false; 275 } 269 if (!m_pISOFilePathSelector) 270 return false; 271 const QString &strPath = m_pISOFilePathSelector->path(); 272 if (strPath.isNull() || strPath.isEmpty()) 273 return true; 274 QFileInfo fileInfo(strPath); 275 if (!fileInfo.exists() || !fileInfo.isReadable()) 276 return false; 276 277 return true; 277 278 } … … 285 286 } 286 287 287 QWidget *UIWizardNewVMPage1::createNameOSTypeWidgets(bool fIncreaseLeftIndent, 288 bool fCreateUnattendedWidgets, 288 QWidget *UIWizardNewVMPage1::createNameOSTypeWidgets(bool fCreateUnattendedWidgets, 289 289 bool fCreateLabels) 290 290 { 291 Q_UNUSED(fIncreaseLeftIndent);292 291 QWidget *pContainer = new QWidget; 293 292 QGridLayout *pLayout = new QGridLayout(pContainer); 294 if (fIncreaseLeftIndent)295 UIWizardNewVM::increaseLayoutLeftMargin(pLayout);296 293 297 294 int iRow = 0; … … 318 315 if (fCreateUnattendedWidgets) 319 316 { 320 m_pEnableUnattendedInstallCheckBox = new QCheckBox;321 pLayout->addWidget(m_pEnableUnattendedInstallCheckBox, iRow++, 0, 1, 1);322 323 317 m_pISOSelectorLabel = new QLabel; 324 318 if (m_pISOSelectorLabel) … … 454 448 bool UIWizardNewVMPage1::isUnattendedEnabled() const 455 449 { 456 if ( !m_pEnableUnattendedInstallCheckBox)457 return false;458 return m_pEnableUnattendedInstallCheckBox->isChecked();450 if (m_pISOFilePathSelector) 451 return m_pISOFilePathSelector->isValid(); 452 return false; 459 453 } 460 454 … … 494 488 void UIWizardNewVMPage1::retranslateWidgets() 495 489 { 496 if (m_pEnableUnattendedInstallCheckBox)497 {498 m_pEnableUnattendedInstallCheckBox->setText(UIWizardNewVM::tr("Unattended Install"));499 m_pEnableUnattendedInstallCheckBox->setToolTip(UIWizardNewVM::tr("When checked, an unattended guest OS installation will be started "500 "after this wizard is closed if not the virtual machine's disk will "501 "be left empty."));502 }503 504 490 if (m_pISOSelectorLabel) 505 m_pISOSelectorLabel->setText(UIWizardNewVM::tr("Install er:"));491 m_pISOSelectorLabel->setText(UIWizardNewVM::tr("Installation ISO:")); 506 492 507 493 if (m_pStartHeadlessCheckBox) … … 522 508 { 523 509 QVBoxLayout *pPageLayout = new QVBoxLayout(this); 524 pPageLayout->addWidget(createNameOSTypeWidgets(/* fIncreaseLeftIndent */ false, 525 /* fCreateUnattendedWidget */ false, 510 pPageLayout->addWidget(createNameOSTypeWidgets(/* fCreateUnattendedWidget */ false, 526 511 /* fCreateLabels */false)); 527 512 pPageLayout->addStretch(); … … 543 528 void UIWizardNewVMPageBasic1::createConnections() 544 529 { 545 connect(m_pEnableUnattendedInstallCheckBox, &QCheckBox::clicked, this, &UIWizardNewVMPageBasic1::sltUnattendedCheckBoxToggle);546 530 connect(m_pISOFilePathSelector, &UIFilePathSelector::pathChanged, this, &UIWizardNewVMPageBasic1::sltISOPathChanged); 547 531 connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigNameChanged, this, &UIWizardNewVMPageBasic1::sltNameChanged); … … 553 537 { 554 538 UIWizardNewVM *pWizard = qobject_cast<UIWizardNewVM*>(wizard()); 555 if (!pWizard || !pWizard->isUnattended InstallEnabled())539 if (!pWizard || !pWizard->isUnattendedEnabled()) 556 540 return UIWizardNewVM::Page3; 557 541 return UIWizardNewVM::Page2; … … 588 572 determineOSType(strPath); 589 573 setTypeByISODetectedOSType(m_strDetectedOSTypeId); 590 emit completeChanged(); 591 } 592 593 void UIWizardNewVMPageBasic1::sltUnattendedCheckBoxToggle(bool fEnabled) 594 { 574 575 bool fEnabled = isUnattendedEnabled(); 595 576 if (m_pISOSelectorLabel) 596 577 m_pISOSelectorLabel->setEnabled(fEnabled); … … 599 580 if (m_pStartHeadlessCheckBox) 600 581 m_pStartHeadlessCheckBox->setEnabled(fEnabled); 582 601 583 emit completeChanged(); 602 584 } 603 604 585 605 586 void UIWizardNewVMPageBasic1::retranslateUi() -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.h
r87318 r87322 78 78 void composeMachineFilePath(); 79 79 80 QWidget *createNameOSTypeWidgets(bool f IncreaseLeftIndent, bool fCreateUnattendedWidgets, bool fCreateLabels);80 QWidget *createNameOSTypeWidgets(bool fCreateUnattendedWidgets, bool fCreateLabels); 81 81 int createNameOSTypeWidgets(QGridLayout *pLayout, bool fCreateLabels = true); 82 82 void setTypeByISODetectedOSType(const QString &strDetectedOSType); … … 91 91 /** Holds the ISO selector editor instance. */ 92 92 mutable UIFilePathSelector *m_pISOFilePathSelector; 93 QCheckBox *m_pEnableUnattendedInstallCheckBox;94 93 QCheckBox *m_pStartHeadlessCheckBox; 95 94 /** We have two UINameAndSystemEditor instance since name/vm path fields and OS type fields … … 104 103 private: 105 104 105 /** Return false if ISO path is not empty but points to an missing or unreadable file. */ 106 106 bool checkISOFile() const; 107 107 QFrame *horizontalLine(); … … 159 159 void sltOsTypeChanged(); 160 160 void sltISOPathChanged(const QString &strPath); 161 void sltUnattendedCheckBoxToggle(bool fEnable);162 161 163 162 private: -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.cpp
r87249 r87322 37 37 , m_pHostnameLineEdit(0) 38 38 , m_pHostnameLabel(0) 39 , m_pInstallGACheckBox(0)40 39 , m_pGAISOPathLabel(0) 41 40 , m_pGAISOFilePathSelector(0) … … 87 86 bool UIWizardNewVMPage2::installGuestAdditions() const 88 87 { 89 if (!m_pInstallGACheckBox) 90 return true; 91 return m_pInstallGACheckBox->isChecked(); 92 } 93 94 void UIWizardNewVMPage2::setInstallGuestAdditions(bool fInstallGA) 95 { 96 if (m_pInstallGACheckBox) 97 m_pInstallGACheckBox->setChecked(fInstallGA); 88 if (!m_pGAISOFilePathSelector) 89 return false; 90 return m_pGAISOFilePathSelector->isValid(); 98 91 } 99 92 … … 118 111 } 119 112 120 QWidget *UIWizardNewVMPage2::createUserNameHostNameWidgets( bool fIncreaseLeftIndent)113 QWidget *UIWizardNewVMPage2::createUserNameHostNameWidgets() 121 114 { 122 115 QWidget *pContainer = new QWidget; 123 116 QGridLayout *pGridLayout = new QGridLayout(pContainer); 124 125 if (fIncreaseLeftIndent)126 UIWizardNewVM::increaseLayoutLeftMargin(pGridLayout);127 117 128 118 m_pUserNamePasswordEditor = new UIUserNamePasswordEditor; … … 141 131 } 142 132 143 QWidget *UIWizardNewVMPage2::createGAInstallWidgets( bool fIncreaseLeftIndent)133 QWidget *UIWizardNewVMPage2::createGAInstallWidgets() 144 134 { 145 135 QWidget *pContainer = new QWidget; 146 136 QGridLayout *pContainerLayout = new QGridLayout(pContainer); 147 if (fIncreaseLeftIndent) 148 UIWizardNewVM::increaseLayoutLeftMargin(pContainerLayout); 149 150 m_pInstallGACheckBox = new QCheckBox; 137 151 138 m_pGAISOPathLabel = new QLabel; 152 139 { … … 163 150 } 164 151 165 pContainerLayout->addWidget(m_pInstallGACheckBox, 0, 0, 1, 5);166 152 pContainerLayout->addWidget(m_pGAISOPathLabel, 1, 1, 1, 1); 167 153 pContainerLayout->addWidget(m_pGAISOFilePathSelector, 1, 2, 1, 4); … … 169 155 } 170 156 171 QWidget *UIWizardNewVMPage2::createProductKeyWidgets( bool fIncreaseLeftIndent)157 QWidget *UIWizardNewVMPage2::createProductKeyWidgets() 172 158 { 173 159 QWidget *pContainer = new QWidget; 174 160 QGridLayout *pGridLayout = new QGridLayout(pContainer); 175 if (fIncreaseLeftIndent)176 UIWizardNewVM::increaseLayoutLeftMargin(pGridLayout);177 161 178 162 m_pProductKeyLabel = new QLabel; … … 190 174 bool UIWizardNewVMPage2::checkGAISOFile() const 191 175 { 192 if (m_pInstallGACheckBox && m_pInstallGACheckBox->isChecked())193 {194 QString strISOFilePath = m_pGAISOFilePathSelector ? m_pGAISOFilePathSelector->path() : QString();195 if (!QFileInfo(strISOFilePath).exists())196 return false;197 }176 const QString &strPath = m_pGAISOFilePathSelector->path(); 177 if (strPath.isNull() || strPath.isEmpty()) 178 return true; 179 QFile fileInfo(strPath); 180 if (!fileInfo.exists() || !fileInfo.isReadable()) 181 return false; 198 182 return true; 199 183 } … … 209 193 if (m_pHostnameLabel) 210 194 m_pHostnameLabel->setText(UIWizardNewVM::tr("Hostname:")); 211 if (m_pInstallGACheckBox) 212 m_pInstallGACheckBox->setText(UIWizardNewVM::tr("Install guest additions")); 195 213 196 if (m_pGAISOPathLabel) 214 m_pGAISOPathLabel->setText(UIWizardNewVM::tr(" Installation medium:"));197 m_pGAISOPathLabel->setText(UIWizardNewVM::tr("GA Installation ISO:")); 215 198 if (m_pGAISOFilePathSelector) 216 199 m_pGAISOFilePathSelector->setToolTip(UIWizardNewVM::tr("Please select an installation medium (ISO file)")); … … 240 223 } 241 224 242 m_pToolBox->insertItem(ToolBoxItems_UserNameHostname, createUserNameHostNameWidgets( /* fIncreaseLeftIndent */ true), QString());243 m_pToolBox->insertItem(ToolBoxItems_GAInstall, createGAInstallWidgets( /* fIncreaseLeftIndent */ true), QString());244 m_pToolBox->insertItem(ToolBoxItems_ProductKey, createProductKeyWidgets( /* fIncreaseLeftIndent */ true), QString());225 m_pToolBox->insertItem(ToolBoxItems_UserNameHostname, createUserNameHostNameWidgets(), QString()); 226 m_pToolBox->insertItem(ToolBoxItems_GAInstall, createGAInstallWidgets(), QString()); 227 m_pToolBox->insertItem(ToolBoxItems_ProductKey, createProductKeyWidgets(), QString()); 245 228 246 229 registerField("userName", this, "userName"); … … 259 242 connect(m_pUserNamePasswordEditor, &UIUserNamePasswordEditor::sigSomeTextChanged, 260 243 this, &UIWizardNewVMPageBasic2::completeChanged); 261 if (m_pInstallGACheckBox)262 connect(m_pInstallGACheckBox, &QCheckBox::toggled, this,263 &UIWizardNewVMPageBasic2::sltInstallGACheckBoxToggle);264 244 if (m_pGAISOFilePathSelector) 265 245 connect(m_pGAISOFilePathSelector, &UIFilePathSelector::pathChanged, … … 340 320 { 341 321 UIWizardNewVM *pWizard = qobject_cast<UIWizardNewVM*>(wizard()); 342 if (!pWizard || !pWizard->isUnattended InstallEnabled() || !pWizard->isGuestOSTypeWindows())322 if (!pWizard || !pWizard->isUnattendedEnabled() || !pWizard->isGuestOSTypeWindows()) 343 323 return false; 344 324 return true; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.h
r87249 r87322 53 53 void setHostname(const QString &strHostName); 54 54 bool installGuestAdditions() const; 55 void setInstallGuestAdditions(bool fInstallGA);56 55 QString guestAdditionsISOPath() const; 57 56 void setGuestAdditionsISOPath(const QString &strISOPath); … … 67 66 }; 68 67 69 QWidget *createUserNameHostNameWidgets( bool fIncreaseLeftIndent);70 QWidget *createGAInstallWidgets( bool fIncreaseLeftIndent);71 QWidget *createProductKeyWidgets( bool fIncreaseLeftIndent);68 QWidget *createUserNameHostNameWidgets(); 69 QWidget *createGAInstallWidgets(); 70 QWidget *createProductKeyWidgets(); 72 71 72 /** Returns false if ISO path selector is non empty but has invalid file path. */ 73 73 bool checkGAISOFile() const; 74 74 void markWidgets() const; … … 80 80 QLineEdit *m_pHostnameLineEdit; 81 81 QLabel *m_pHostnameLabel; 82 /** Guest additions iso selection widgets. */83 QCheckBox *m_pInstallGACheckBox;84 82 QLabel *m_pGAISOPathLabel; 85 83 UIFilePathSelector *m_pGAISOFilePathSelector; … … 97 95 Q_PROPERTY(QString password READ password WRITE setPassword); 98 96 Q_PROPERTY(QString hostname READ hostname WRITE setHostname); 99 Q_PROPERTY(bool installGuestAdditions READ installGuestAdditions WRITE setInstallGuestAdditions);97 Q_PROPERTY(bool installGuestAdditions READ installGuestAdditions); 100 98 Q_PROPERTY(QString guestAdditionsISOPath READ guestAdditionsISOPath WRITE setGuestAdditionsISOPath); 101 99 Q_PROPERTY(QString productKey READ productKey); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.cpp
r87249 r87322 164 164 } 165 165 166 QWidget *UIWizardNewVMPage3::createDiskWidgets( bool fIncreaseLeftIndent)166 QWidget *UIWizardNewVMPage3::createDiskWidgets() 167 167 { 168 168 QWidget *pDiskContainer = new QWidget; 169 169 QGridLayout *pDiskLayout = new QGridLayout(pDiskContainer); 170 if (fIncreaseLeftIndent)171 UIWizardNewVM::increaseLayoutLeftMargin(pDiskLayout);172 173 170 174 171 m_pDiskSkip = new QRadioButton; … … 197 194 } 198 195 199 QWidget *UIWizardNewVMPage3::createHardwareWidgets( bool fIncreaseLeftIndent)196 QWidget *UIWizardNewVMPage3::createHardwareWidgets() 200 197 { 201 198 QWidget *pHardwareContainer = new QWidget; 202 199 QGridLayout *pHardwareLayout = new QGridLayout(pHardwareContainer); 203 if (fIncreaseLeftIndent) 204 UIWizardNewVM::increaseLayoutLeftMargin(pHardwareLayout); 200 205 201 m_pBaseMemoryEditor = new UIBaseMemoryEditor(0, true); 206 202 m_pVirtualCPUEditor = new UIVirtualCPUEditor(0, true); … … 233 229 pMainLayout->addWidget(m_pToolBox); 234 230 235 m_pToolBox->insertItem(ToolBoxItems_Disk, createDiskWidgets( /* fIncreaseLeftIndent */ true), QString());236 m_pToolBox->insertItem(ToolBoxItems_Hardware, createHardwareWidgets( /* fIncreaseLeftIndent */ true), QString());231 m_pToolBox->insertItem(ToolBoxItems_Disk, createDiskWidgets(), QString()); 232 m_pToolBox->insertItem(ToolBoxItems_Hardware, createHardwareWidgets(), QString()); 237 233 m_pToolBox->setStyleSheet("QToolBox::tab:selected { font: bold; }"); 238 234 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.h
r87249 r87322 77 77 /** @} */ 78 78 79 QWidget *createDiskWidgets( bool fIncreaseLeftIndent);80 QWidget *createHardwareWidgets( bool fIncreaseLeftIndent);79 QWidget *createDiskWidgets(); 80 QWidget *createHardwareWidgets(); 81 81 82 82 /** Helpers. */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp
r87318 r87322 50 50 { 51 51 m_pToolBox = new UIToolBox; 52 m_pToolBox->insertItem(ExpertToolboxItems_NameAndOSType, createNameOSTypeWidgets(/* fIncreaseLeftIndent */ true, 53 /* fCreateUnattendedWidgets */ false, 52 m_pToolBox->insertItem(ExpertToolboxItems_NameAndOSType, createNameOSTypeWidgets(/* fCreateUnattendedWidgets */ false, 54 53 /* fCreateLabels */ false), ""); 55 54 m_pToolBox->insertItem(ExpertToolboxItems_Unattended, createUnattendedWidgets(), "", false); 56 m_pToolBox->insertItem(ExpertToolboxItems_Disk, createDiskWidgets( /* fIncreaseLeftIndent */ true), "");57 m_pToolBox->insertItem(ExpertToolboxItems_Hardware, createHardwareWidgets( /* fIncreaseLeftIndent */ true), "");55 m_pToolBox->insertItem(ExpertToolboxItems_Disk, createDiskWidgets(), ""); 56 m_pToolBox->insertItem(ExpertToolboxItems_Hardware, createHardwareWidgets(), ""); 58 57 // m_pToolBox->insertItem(ExpertToolboxItems_UsernameHostname, createUserNameHostNameWidgets(/* fIncreaseLeftIndent */ true), ""); 59 58 // m_pToolBox->insertItem(ExpertToolboxItems_GAInstall, createGAInstallWidgets(/* fIncreaseLeftIndent */ true), ""); … … 119 118 "}").arg(tabBackgroundColor.name()).arg(textColor.name()).arg(disabledTextColor.name())); 120 119 121 if (m_pEnableUnattendedInstallCheckBox) 122 disableEnableUnattendedRelatedWidgets(m_pEnableUnattendedInstallCheckBox->isChecked()); 120 disableEnableUnattendedRelatedWidgets(isUnattendedEnabled()); 123 121 } 124 122 … … 167 165 } 168 166 169 void UIWizardNewVMPageExpert::sltUnattendedCheckBoxToggle(bool fEnabled)170 {171 disableEnableUnattendedRelatedWidgets(fEnabled);172 emit completeChanged();173 }174 175 167 void UIWizardNewVMPageExpert::sltISOPathChanged(const QString &strPath) 176 168 { 177 169 determineOSType(strPath); 178 170 setTypeByISODetectedOSType(m_strDetectedOSTypeId); 179 emit completeChanged(); 180 } 181 182 void UIWizardNewVMPageExpert::sltInstallGACheckBoxToggle(bool fEnabled) 183 { 184 if (m_pGAISOPathLabel) 185 m_pGAISOPathLabel->setEnabled(fEnabled); 186 if (m_pGAISOFilePathSelector) 187 m_pGAISOFilePathSelector->setEnabled(fEnabled); 171 disableEnableUnattendedRelatedWidgets(isUnattendedEnabled()); 188 172 emit completeChanged(); 189 173 } … … 233 217 this, &UIWizardNewVMPageExpert::sltOSFamilyTypeChanged); 234 218 } 235 if (m_pEnableUnattendedInstallCheckBox) 236 connect(m_pEnableUnattendedInstallCheckBox, &QCheckBox::clicked, 237 this, &UIWizardNewVMPageExpert::sltUnattendedCheckBoxToggle); 219 238 220 if (m_pISOFilePathSelector) 239 221 connect(m_pISOFilePathSelector, &UIFilePathSelector::pathChanged, … … 244 226 connect(m_pUserNamePasswordEditor, &UIUserNamePasswordEditor::sigSomeTextChanged, 245 227 this, &UIWizardNewVMPageExpert::completeChanged); 246 if (m_pInstallGACheckBox)247 connect(m_pInstallGACheckBox, &QCheckBox::toggled, this,248 &UIWizardNewVMPageExpert::sltInstallGACheckBoxToggle);249 228 if (m_pGAISOFilePathSelector) 250 229 connect(m_pGAISOFilePathSelector, &UIFilePathSelector::pathChanged, … … 304 283 m_pDiskSelector->setCurrentIndex(0); 305 284 306 if (m_pEnableUnattendedInstallCheckBox) 307 disableEnableUnattendedRelatedWidgets(m_pEnableUnattendedInstallCheckBox->isChecked()); 285 disableEnableUnattendedRelatedWidgets(isUnattendedEnabled()); 308 286 if (m_pProductKeyLabel) 309 287 m_pProductKeyLabel->setEnabled(isProductKeyWidgetEnabled()); … … 354 332 pLayout->addWidget(m_pStartHeadlessCheckBox, iRow++, 0, 1, 5); 355 333 356 pLayout->addWidget(createUserNameHostNameWidgets( /* fIncreaseLeftIndent */ false), iRow, 0, 4, 5);334 pLayout->addWidget(createUserNameHostNameWidgets(), iRow, 0, 4, 5); 357 335 iRow += 4; 358 pLayout->addWidget(createGAInstallWidgets( /* fIncreaseLeftIndent */ false), iRow, 0, 2, 5);336 pLayout->addWidget(createGAInstallWidgets(), iRow, 0, 2, 5); 359 337 iRow += 2; 360 pLayout->addWidget(createProductKeyWidgets( /* fIncreaseLeftIndent */ false), iRow, 0, 1, 5);338 pLayout->addWidget(createProductKeyWidgets(), iRow, 0, 1, 5); 361 339 362 340 … … 392 370 { 393 371 /* Check the installation medium: */ 394 if (!isISOFileSelectorComplete())395 {396 m_pToolBox->setItemIcon(ExpertToolboxItems_NameAndOSType,397 UIIconPool::iconSet(":/status_error_16px.png"));398 fIsComplete = false;399 }372 // if (!isISOFileSelectorComplete()) 373 // { 374 // m_pToolBox->setItemIcon(ExpertToolboxItems_NameAndOSType, 375 // UIIconPool::iconSet(":/status_error_16px.png")); 376 // fIsComplete = false; 377 // } 400 378 /* Check the GA installation medium: */ 401 379 if (!checkGAISOFile()) … … 459 437 { 460 438 UIWizardNewVM *pWizard = qobject_cast<UIWizardNewVM*>(wizard()); 461 if (!pWizard || !pWizard->isUnattended InstallEnabled() || !pWizard->isGuestOSTypeWindows())439 if (!pWizard || !pWizard->isUnattendedEnabled() || !pWizard->isGuestOSTypeWindows()) 462 440 return false; 463 441 return true; … … 466 444 void UIWizardNewVMPageExpert::disableEnableUnattendedRelatedWidgets(bool fEnabled) 467 445 { 468 if (m_pToolBox)469 {470 m_pToolBox->setItemEnabled(ExpertToolboxItems_UsernameHostname, fEnabled);471 m_pToolBox->setItemEnabled(ExpertToolboxItems_GAInstall, fEnabled);472 m_pToolBox->setItemEnabled(ExpertToolboxItems_ProductKey, fEnabled);473 }474 if (m_pISOSelectorLabel)475 m_pISOSelectorLabel->setEnabled(fEnabled);476 if (m_pISOFilePathSelector)477 m_pISOFilePathSelector->setEnabled(fEnabled);478 446 if (m_pStartHeadlessCheckBox) 479 447 m_pStartHeadlessCheckBox->setEnabled(fEnabled); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.h
r87318 r87322 52 52 Q_PROPERTY(QString password READ password WRITE setPassword); 53 53 Q_PROPERTY(QString hostname READ hostname WRITE setHostname); 54 Q_PROPERTY(bool installGuestAdditions READ installGuestAdditions WRITE setInstallGuestAdditions);54 Q_PROPERTY(bool installGuestAdditions READ installGuestAdditions); 55 55 Q_PROPERTY(QString guestAdditionsISOPath READ guestAdditionsISOPath WRITE setGuestAdditionsISOPath); 56 56 Q_PROPERTY(QString productKey READ productKey); … … 79 79 void sltVirtualDiskSourceChanged(); 80 80 void sltGetWithFileOpenDialog(); 81 void sltUnattendedCheckBoxToggle(bool fEnable);82 81 void sltISOPathChanged(const QString &strPath); 83 void sltInstallGACheckBoxToggle(bool fChecked);84 82 void sltGAISOPathChanged(const QString &strPath); 85 83 void sltOSFamilyTypeChanged();
Note:
See TracChangeset
for help on using the changeset viewer.

