Changeset 85001 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jun 30, 2020 6:40:35 AM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 138898
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 9 edited
- 2 copied
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r84969 r85001 668 668 src/wizards/newcloudvm/UIWizardNewCloudVMPageExpert.h \ 669 669 src/wizards/newvm/UIWizardNewVM.h \ 670 src/wizards/newvm/UIWizardNewVMPageBasic InstallSetup.h \670 src/wizards/newvm/UIWizardNewVMPageBasicUserNameHostname.h \ 671 671 src/wizards/newvm/UIWizardNewVMPageBasicUnattended.h \ 672 672 src/wizards/newvm/UIWizardNewVMPageBasicNameType.h \ 673 src/wizards/newvm/UIWizardNewVMPageBasicGAInstall.h \ 673 674 src/wizards/newvm/UIWizardNewVMPageBasicHardware.h \ 674 675 src/wizards/newvm/UIWizardNewVMPageBasicProductKey.h \ … … 1132 1133 src/wizards/newcloudvm/UIWizardNewCloudVMPageExpert.cpp \ 1133 1134 src/wizards/newvm/UIWizardNewVM.cpp \ 1134 src/wizards/newvm/UIWizardNewVMPageBasic InstallSetup.cpp \1135 src/wizards/newvm/UIWizardNewVMPageBasicUserNameHostname.cpp \ 1135 1136 src/wizards/newvm/UIWizardNewVMPageBasicUnattended.cpp \ 1136 1137 src/wizards/newvm/UIWizardNewVMPageBasicNameType.cpp \ 1138 src/wizards/newvm/UIWizardNewVMPageBasicGAInstall.cpp \ 1137 1139 src/wizards/newvm/UIWizardNewVMPageBasicHardware.cpp \ 1138 1140 src/wizards/newvm/UIWizardNewVMPageBasicProductKey.cpp \ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r84991 r85001 619 619 unattendedInstallData.m_fInstallGuestAdditions = comUnattendedInstaller.GetInstallGuestAdditions(); 620 620 unattendedInstallData.m_strGuestAdditionsISOPath = comUnattendedInstaller.GetAdditionsIsoPath(); 621 622 621 pWizard->setDefaultUnattendedInstallData(unattendedInstallData); 623 622 … … 1901 1900 comUnattendedInstaller.SetHostname(unattendedData.m_strHostname); 1902 1901 comUnattendedInstaller.SetProductKey(unattendedData.m_strProductKey); 1902 comUnattendedInstaller.SetInstallGuestAdditions(unattendedData.m_fInstallGuestAdditions); 1903 comUnattendedInstaller.SetAdditionsIsoPath(unattendedData.m_strGuestAdditionsISOPath); 1903 1904 1904 1905 comUnattendedInstaller.Prepare(); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp
r84971 r85001 23 23 #include "UIWizardNewVMPageBasicHardware.h" 24 24 #include "UIWizardNewVMPageBasicProductKey.h" 25 #include "UIWizardNewVMPageBasicGAInstall.h" 25 26 #include "UIWizardNewVMPageBasicDisk.h" 26 27 #include "UIWizardNewVMPageExpert.h" 27 #include "UIWizardNewVMPageBasic InstallSetup.h"28 #include "UIWizardNewVMPageBasicUserNameHostname.h" 28 29 #include "UIMessageCenter.h" 29 30 #include "UIMedium.h" … … 83 84 setPage(PageUnattended, pUnattendedPage); 84 85 setPage(PageNameType, new UIWizardNewVMPageBasicNameType(m_strGroup)); 85 setPage(PageInstallSetup, new UIWizardNewVMPageBasicInstallSetup); 86 setPage(PageUserNameHostname, new UIWizardNewVMPageBasicUserNameHostname); 87 setPage(PageGAInstall, new UIWizardNewVMPageBasicGAInstall); 86 88 setPage(PageProductKey, new UIWizardNewVMPageBasicProductKey); 87 89 setPage(PageHardware, new UIWizardNewVMPageBasicHardware); … … 396 398 } 397 399 400 bool UIWizardNewVM::getBoolFieldValue(const QString &strFieldName) const 401 { 402 QVariant fieldValue = field(strFieldName); 403 if (!fieldValue.isNull() && fieldValue.isValid() && fieldValue.canConvert(QMetaType::Bool)) 404 return fieldValue.toBool(); 405 return false; 406 } 407 398 408 void UIWizardNewVM::sltHandleWizardCancel() 399 409 { … … 510 520 setField("password", unattendedInstallData.m_strPassword); 511 521 setField("hostname", unattendedInstallData.m_strHostname); 522 setField("installGuestAdditions", unattendedInstallData.m_fInstallGuestAdditions); 523 setField("guestAdditionsISOPath", unattendedInstallData.m_strGuestAdditionsISOPath); 512 524 } 513 525 … … 524 536 m_unattendedInstallData.m_strDetectedOSHints = getStringFieldValue("detectedOSHints"); 525 537 m_unattendedInstallData.m_strProductKey = getStringFieldValue("productKey"); 526 527 QVariant fieldValue = field("isUnattendedEnabled"); 528 if (!fieldValue.isNull() && fieldValue.isValid() && fieldValue.canConvert(QMetaType::Bool)) 529 m_unattendedInstallData.m_fUnattendedEnabled = fieldValue.toBool(); 530 531 fieldValue = field("startHeadless"); 532 if (!fieldValue.isNull() && fieldValue.isValid() && fieldValue.canConvert(QMetaType::Bool)) 533 m_unattendedInstallData.m_fStartHeadless = fieldValue.toBool(); 538 m_unattendedInstallData.m_strGuestAdditionsISOPath = getStringFieldValue("guestAdditionsISOPath"); 539 540 m_unattendedInstallData.m_fUnattendedEnabled = getBoolFieldValue("isUnattendedEnabled"); 541 m_unattendedInstallData.m_fStartHeadless = getBoolFieldValue("startHeadless"); 542 m_unattendedInstallData.m_fInstallGuestAdditions = getBoolFieldValue("installGuestAdditions"); 534 543 535 544 m_unattendedInstallData.m_uMachineUid = createdMachineId(); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h
r84971 r85001 62 62 PageUnattended, 63 63 PageNameType, 64 PageInstallSetup, 64 PageUserNameHostname, 65 PageGAInstall, 65 66 PageProductKey, 66 67 PageHardware, … … 98 99 99 100 QString getStringFieldValue(const QString &strFieldName) const; 101 bool getBoolFieldValue(const QString &strFieldName) const; 100 102 101 103 /* Who will be able to create virtual-machine: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasicGAInstall.cpp
r84965 r85001 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UIWizardNewVMPageBasic ProductKeyclass implementation.3 * VBox Qt GUI - UIWizardNewVMPageBasicGAInstall class implementation. 4 4 */ 5 5 … … 17 17 18 18 /* Qt includes: */ 19 #include <QC omboBox>20 #include <Q GridLayout>19 #include <QCheckBox> 20 #include <QFileInfo> 21 21 #include <QLabel> 22 22 #include <QLineEdit> 23 #include <Q SpacerItem>24 #include <Q VBoxLayout>23 #include <QHBoxLayout> 24 #include <QGridLayout> 25 25 26 26 /* GUI includes: */ 27 27 #include "QIRichTextLabel.h" 28 #include "UIIconPool.h" 29 #include "UIWizardNewVMPageBasicProductKey.h" 28 #include "UICommon.h" 29 #include "UIFilePathSelector.h" 30 #include "UIMessageCenter.h" 31 #include "UINameAndSystemEditor.h" 32 #include "UIWizardNewVMPageBasicGAInstall.h" 30 33 #include "UIWizardNewVM.h" 31 34 32 UIWizardNewVMPageProductKey::UIWizardNewVMPageProductKey() 33 : m_pProductKeyLineEdit(0) 34 , m_pHostnameLabel(0) 35 /* COM includes: */ 36 #include "CHost.h" 37 #include "CUnattended.h" 38 39 UIWizardNewVMPageGAInstall::UIWizardNewVMPageGAInstall() 40 : m_pInstallGACheckBox(0) 41 , m_pISOPathLabel(0) 42 , m_pISOFilePathSelector(0) 35 43 { 36 44 } 37 45 38 QString UIWizardNewVMPageProductKey::productKey() const46 bool UIWizardNewVMPageGAInstall::installGuestAdditions() const 39 47 { 40 if (!m_p ProductKeyLineEdit || !m_pProductKeyLineEdit->hasAcceptableInput())41 return QString();42 return m_p ProductKeyLineEdit->text();48 if (!m_pInstallGACheckBox) 49 return true; 50 return m_pInstallGACheckBox->isChecked(); 43 51 } 44 52 53 void UIWizardNewVMPageGAInstall::setInstallGuestAdditions(bool fInstallGA) 54 { 55 if (m_pInstallGACheckBox) 56 m_pInstallGACheckBox->setChecked(fInstallGA); 57 } 45 58 46 UIWizardNewVMPageBasicProductKey::UIWizardNewVMPageBasicProductKey() 47 : m_pLabel(0) 59 QString UIWizardNewVMPageGAInstall::guestAdditionsISOPath() const 48 60 { 49 /* Create widget: */ 61 if (!m_pISOFilePathSelector) 62 return QString(); 63 return m_pISOFilePathSelector->path(); 64 } 65 66 void UIWizardNewVMPageGAInstall::setGuestAdditionsISOPath(const QString &strISOPath) 67 { 68 if (m_pISOFilePathSelector) 69 m_pISOFilePathSelector->setPath(strISOPath); 70 } 71 72 UIWizardNewVMPageBasicGAInstall::UIWizardNewVMPageBasicGAInstall() 73 : UIWizardNewVMPageGAInstall() 74 { 75 /* Create widgets: */ 50 76 QVBoxLayout *pMainLayout = new QVBoxLayout(this); 51 77 { 52 78 m_pLabel = new QIRichTextLabel(this); 53 QGridLayout *pGridLayout = new QGridLayout; 79 m_pInstallGACheckBox = new QCheckBox; 80 connect(m_pInstallGACheckBox, &QCheckBox::toggled, this, &UIWizardNewVMPageBasicGAInstall::sltInstallGACheckBoxToggle); 81 m_pISOPathLabel = new QLabel; 54 82 { 55 m_pHostnameLabel = new QLabel; 56 m_pProductKeyLineEdit = new QLineEdit; 57 m_pProductKeyLineEdit->setInputMask(">NNNNN-NNNNN-NNNNN-NNNNN-NNNNN;#"); 58 pGridLayout->addWidget(m_pHostnameLabel, 3, 0, 1, 1, Qt::AlignRight); 59 pGridLayout->addWidget(m_pProductKeyLineEdit, 3, 1, 1, 3); 83 m_pISOPathLabel->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum); 84 m_pISOPathLabel->setEnabled(false); 60 85 } 61 if (m_pLabel) 62 pMainLayout->addWidget(m_pLabel); 63 pMainLayout->addLayout(pGridLayout); 86 m_pISOFilePathSelector = new UIFilePathSelector; 87 { 88 m_pISOFilePathSelector->setResetEnabled(false); 89 m_pISOFilePathSelector->setMode(UIFilePathSelector::Mode_File_Open); 90 m_pISOFilePathSelector->setFileDialogFilters("*.iso *.ISO"); 91 m_pISOFilePathSelector->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum); 92 m_pISOFilePathSelector->setEnabled(false); 93 connect(m_pISOFilePathSelector, &UIFilePathSelector::pathChanged, this, &UIWizardNewVMPageBasicGAInstall::sltPathChanged); 94 } 95 pMainLayout->addWidget(m_pLabel); 96 97 QGridLayout *pISOSelectorLayout = new QGridLayout; 98 pISOSelectorLayout->addWidget(m_pInstallGACheckBox, 0, 0, 1, 5); 99 pISOSelectorLayout->addWidget(m_pISOPathLabel, 1, 1, 1, 1); 100 pISOSelectorLayout->addWidget(m_pISOFilePathSelector, 1, 2, 1, 4); 101 102 pMainLayout->addLayout(pISOSelectorLayout); 64 103 pMainLayout->addStretch(); 65 104 } 66 105 67 106 /* Register fields: */ 68 registerField("productKey", this, "productKey"); 107 registerField("installGuestAdditions", this, "installGuestAdditions"); 108 registerField("guestAdditionsISOPath", this, "guestAdditionsISOPath"); 69 109 } 70 110 71 void UIWizardNewVMPageBasicProductKey::retranslateUi() 111 bool UIWizardNewVMPageBasicGAInstall::isComplete() const 112 { 113 return checkISOFile(); 114 } 115 116 int UIWizardNewVMPageBasicGAInstall::nextId() const 117 { 118 UIWizardNewVM *pWizard = qobject_cast<UIWizardNewVM*>(wizard()); 119 if (!pWizard || !pWizard->isUnattendedInstallEnabled() || !pWizard->isGuestOSTypeWindows()) 120 return UIWizardNewVM::PageHardware; 121 return UIWizardNewVM::PageProductKey; 122 } 123 124 void UIWizardNewVMPageBasicGAInstall::sltInstallGACheckBoxToggle(bool fEnabled) 125 { 126 if (m_pISOPathLabel) 127 m_pISOPathLabel->setEnabled(fEnabled); 128 if (m_pISOFilePathSelector) 129 m_pISOFilePathSelector->setEnabled(fEnabled); 130 emit completeChanged(); 131 } 132 133 void UIWizardNewVMPageBasicGAInstall::sltPathChanged(const QString &strPath) 134 { 135 Q_UNUSED(strPath); 136 emit completeChanged(); 137 } 138 139 void UIWizardNewVMPageBasicGAInstall::retranslateUi() 72 140 { 73 141 /* Translate page: */ 74 setTitle(UIWizardNewVM::tr(" Product Key"));142 setTitle(UIWizardNewVM::tr("Unattended Guest OS Install")); 75 143 76 144 /* Translate widgets: */ 77 if (m_pLabel)78 m_pLabel->setText(UIWizardNewVM::tr("<p>You can enter the product key for the guest OS."));79 if (m_pHostnameLabel)80 m_pHostnameLabel->setText(UIWizardNewVM::tr("Hostname:"));145 m_pLabel->setText(UIWizardNewVM::tr("<p>Guest Additions install</p>")); 146 m_pInstallGACheckBox->setText(UIWizardNewVM::tr("Install guest additions")); 147 m_pISOPathLabel->setText(UIWizardNewVM::tr("Installation medium:")); 148 m_pISOFilePathSelector->setToolTip(UIWizardNewVM::tr("Please select an installation medium (ISO file)")); 81 149 } 82 150 83 void UIWizardNewVMPageBasicProductKey::initializePage() 151 bool UIWizardNewVMPageGAInstall::checkISOFile() const 152 { 153 if (m_pInstallGACheckBox && m_pInstallGACheckBox->isChecked()) 154 { 155 QString strISOFilePath = m_pISOFilePathSelector ? m_pISOFilePathSelector->path() : QString(); 156 if (!QFileInfo(strISOFilePath).exists()) 157 return false; 158 } 159 return true; 160 } 161 162 void UIWizardNewVMPageBasicGAInstall::initializePage() 84 163 { 85 164 /* Translate page: */ 86 165 retranslateUi(); 166 if (m_pInstallGACheckBox) 167 m_pInstallGACheckBox->setFocus(); 87 168 } 88 169 89 bool UIWizardNewVMPageBasicProductKey::isComplete() const 90 { 91 return true; 92 } 170 // void UIWizardNewVMPageBasicGAInstall::cleanupPage() 171 // { 172 // UIWizardPage::cleanupPage(); 173 // } 174 175 // bool UIWizardNewVMPageBasicGAInstall::validatePage() 176 // { 177 // return checkISOFile(); 178 // } 179 180 // void UIWizardNewVMPageBasicGAInstall::updateStatusLabel() 181 // { 182 // UIWizardNewVMPageGAInstall::updateStatusLabel(); 183 // emit sigDetectedOSTypeChanged(); 184 // } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasicGAInstall.h
r84965 r85001 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UIWizardNewVMPageBasic ProductKeyclass declaration.3 * VBox Qt GUI - UIWizardNewVMPageBasicGAInstall class declaration. 4 4 */ 5 5 … … 16 16 */ 17 17 18 #ifndef FEQT_INCLUDED_SRC_wizards_newvm_UIWizardNewVMPageBasic ProductKey_h19 #define FEQT_INCLUDED_SRC_wizards_newvm_UIWizardNewVMPageBasic ProductKey_h18 #ifndef FEQT_INCLUDED_SRC_wizards_newvm_UIWizardNewVMPageBasicGAInstall_h 19 #define FEQT_INCLUDED_SRC_wizards_newvm_UIWizardNewVMPageBasicGAInstall_h 20 20 #ifndef RT_WITHOUT_PRAGMA_ONCE 21 21 # pragma once … … 28 28 29 29 /* Forward declarations: */ 30 class QCheckBox; 30 31 class QLabel; 31 32 class QLineEdit; 32 33 class QIRichTextLabel; 34 class UIFilePathSelector; 33 35 34 class UIWizardNewVMPage ProductKey: public UIWizardPageBase36 class UIWizardNewVMPageGAInstall : public UIWizardPageBase 35 37 { 36 38 public: 37 39 38 UIWizardNewVMPage ProductKey();40 UIWizardNewVMPageGAInstall(); 39 41 40 42 /** @name Property getters 41 43 * @{ */ 42 QString productKey() const; 44 QString productKey() const; 45 bool installGuestAdditions() const; 46 void setInstallGuestAdditions(bool fInstallGA); 47 QString guestAdditionsISOPath() const; 48 void setGuestAdditionsISOPath(const QString &strISOPath); 43 49 /** @} */ 44 50 45 51 protected: 46 52 47 /* Widgets: */ 48 QLineEdit *m_pProductKeyLineEdit; 49 QLabel *m_pHostnameLabel; 53 bool checkISOFile() const; 54 55 /** @name Widgets 56 * @{ */ 57 QCheckBox *m_pInstallGACheckBox; 58 QLabel *m_pISOPathLabel; 59 UIFilePathSelector *m_pISOFilePathSelector; 60 /** @} */ 61 50 62 }; 51 63 52 /* 2nd page of the New Virtual Machine wizard (basic extension): */ 53 class UIWizardNewVMPageBasicProductKey : public UIWizardPage, public UIWizardNewVMPageProductKey 64 class UIWizardNewVMPageBasicGAInstall : public UIWizardPage, public UIWizardNewVMPageGAInstall 54 65 { 55 66 Q_OBJECT; 56 Q_PROPERTY(QString productKey READ productKey); 67 Q_PROPERTY(bool installGuestAdditions READ installGuestAdditions WRITE setInstallGuestAdditions); 68 Q_PROPERTY(QString guestAdditionsISOPath READ guestAdditionsISOPath WRITE setGuestAdditionsISOPath); 57 69 58 70 public: 59 71 60 /* Constructor: */61 UIWizardNewVMPageBasicProductKey();72 UIWizardNewVMPageBasicGAInstall(); 73 virtual int nextId() const /* override */; 62 74 63 75 private slots: 64 76 77 void sltInstallGACheckBoxToggle(bool fChecked); 78 void sltPathChanged(const QString &strPath); 79 65 80 private: 66 81 67 /* Translation stuff: */68 82 void retranslateUi(); 69 70 /* Prepare stuff: */71 83 void initializePage(); 72 73 /* Validation stuff: */74 84 bool isComplete() const; 75 85 76 /* Widgets: */77 86 QIRichTextLabel *m_pLabel; 78 87 }; 79 88 80 #endif /* !FEQT_INCLUDED_SRC_wizards_newvm_UIWizardNewVMPageBasic ProductKey_h */89 #endif /* !FEQT_INCLUDED_SRC_wizards_newvm_UIWizardNewVMPageBasicGAInstall_h */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasicNameType.cpp
r84961 r85001 358 358 if (!pWizard || !pWizard->isUnattendedInstallEnabled()) 359 359 return UIWizardNewVM::PageHardware; 360 return UIWizardNewVM::Page InstallSetup;360 return UIWizardNewVM::PageUserNameHostname; 361 361 } 362 362 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasicProductKey.cpp
r84965 r85001 47 47 : m_pLabel(0) 48 48 { 49 /* Create widget: */50 49 QVBoxLayout *pMainLayout = new QVBoxLayout(this); 51 50 { … … 65 64 } 66 65 67 /* Register fields: */68 66 registerField("productKey", this, "productKey"); 69 67 } … … 71 69 void UIWizardNewVMPageBasicProductKey::retranslateUi() 72 70 { 73 /* Translate page: */74 71 setTitle(UIWizardNewVM::tr("Product Key")); 75 72 76 /* Translate widgets: */77 73 if (m_pLabel) 78 74 m_pLabel->setText(UIWizardNewVM::tr("<p>You can enter the product key for the guest OS.")); … … 83 79 void UIWizardNewVMPageBasicProductKey::initializePage() 84 80 { 85 /* Translate page: */86 81 retranslateUi(); 87 82 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasicProductKey.h
r84965 r85001 40 40 /** @name Property getters 41 41 * @{ */ 42 QString productKey() const;42 QString productKey() const; 43 43 /** @} */ 44 44 45 45 protected: 46 46 47 /* Widgets: */ 48 QLineEdit *m_pProductKeyLineEdit; 49 QLabel *m_pHostnameLabel; 47 /** @name Widgets 48 * @{ */ 49 QLineEdit *m_pProductKeyLineEdit; 50 QLabel *m_pHostnameLabel; 51 /** @} */ 52 50 53 }; 51 54 52 /* 2nd page of the New Virtual Machine wizard (basic extension): */53 55 class UIWizardNewVMPageBasicProductKey : public UIWizardPage, public UIWizardNewVMPageProductKey 54 56 { … … 58 60 public: 59 61 60 /* Constructor: */61 62 UIWizardNewVMPageBasicProductKey(); 62 63 … … 65 66 private: 66 67 67 /* Translation stuff: */68 68 void retranslateUi(); 69 70 /* Prepare stuff: */71 69 void initializePage(); 72 73 /* Validation stuff: */74 70 bool isComplete() const; 75 71 76 /* Widgets: */77 72 QIRichTextLabel *m_pLabel; 78 73 }; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasicUnattended.cpp
r84961 r85001 35 35 /* COM includes: */ 36 36 #include "CHost.h" 37 #include "CSystemProperties.h"38 37 #include "CUnattended.h" 39 38 … … 167 166 pISOSelectorLayout->addWidget(m_pISOSelectorLabel, 1, 1, 1, 1); 168 167 pISOSelectorLayout->addWidget(m_pISOFilePathSelector, 1, 2, 1, 4); 169 pISOSelectorLayout->addWidget(m_pStartHeadlessCheckBox, 2, 2, 1, 5);170 pISOSelectorLayout->addWidget(m_pStatusLabel, 3, 2, 1, 5);168 pISOSelectorLayout->addWidget(m_pStartHeadlessCheckBox, 2, 2, 1, 1); 169 pISOSelectorLayout->addWidget(m_pStatusLabel, 3, 2, 1, 1); 171 170 172 171 pMainLayout->addLayout(pISOSelectorLayout); … … 218 217 m_pLabel->setText(UIWizardNewVM::tr("You can enable the unattended (automated) guest OS install " 219 218 "and select an installation medium. The guest OS will be " 220 "installed after this wi ndowis closed. "));219 "installed after this wizard is closed. ")); 221 220 m_pUnattendedCheckBox->setText(UIWizardNewVM::tr("Enable unattended guest OS Install")); 222 221 m_pISOSelectorLabel->setText(UIWizardNewVM::tr("Installation medium:")); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasicUnattended.h
r84955 r85001 32 32 class UIFilePathSelector; 33 33 34 /* 1st page of the New Virtual Machine wizard (base part): */35 34 class UIWizardNewVMPageUnattended : public UIWizardPageBase 36 35 { … … 99 98 public: 100 99 101 /* Constructor: */102 100 UIWizardNewVMPageBasicUnattended(); 103 101 virtual bool isComplete() const; /* override */ … … 105 103 protected: 106 104 107 /* Wrapper to access 'this' from base part: */108 105 UIWizardPage* thisImp() { return this; } 109 106 virtual void updateStatusLabel(); … … 118 115 /** Returns false if user selects unattended install and does not provide a valid ISO file path. Else returns true. */ 119 116 bool checkISOFile() const; 120 121 /* Translation stuff: */122 117 void retranslateUi(); 123 124 /* Prepare stuff: */125 118 void initializePage(); 126 119 void cleanupPage(); 127 128 /* Validation stuff: */129 120 virtual bool validatePage() /* override */; 130 121 131 /* Widgets: */132 122 QIRichTextLabel *m_pLabel; 133 123 }; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasicUserNameHostname.cpp
r85000 r85001 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UIWizardNewVMPageBasic InstallSetupclass implementation.3 * VBox Qt GUI - UIWizardNewVMPageBasicUserNameHostname class implementation. 4 4 */ 5 5 … … 24 24 #include "QIRichTextLabel.h" 25 25 #include "UIUserNamePasswordEditor.h" 26 #include "UIWizardNewVMPageBasic InstallSetup.h"26 #include "UIWizardNewVMPageBasicUserNameHostname.h" 27 27 #include "UIWizardNewVM.h" 28 28 29 29 30 UIWizardNewVMPage InstallSetup::UIWizardNewVMPageInstallSetup()30 UIWizardNewVMPageUserNameHostname::UIWizardNewVMPageUserNameHostname() 31 31 : m_pUserNamePasswordEditor(0) 32 32 , m_pHostnameLineEdit(0) … … 35 35 } 36 36 37 QString UIWizardNewVMPage InstallSetup::userName() const37 QString UIWizardNewVMPageUserNameHostname::userName() const 38 38 { 39 39 if (m_pUserNamePasswordEditor) … … 42 42 } 43 43 44 void UIWizardNewVMPage InstallSetup::setUserName(const QString &strName)44 void UIWizardNewVMPageUserNameHostname::setUserName(const QString &strName) 45 45 { 46 46 if (m_pUserNamePasswordEditor) … … 48 48 } 49 49 50 QString UIWizardNewVMPage InstallSetup::password() const50 QString UIWizardNewVMPageUserNameHostname::password() const 51 51 { 52 52 if (m_pUserNamePasswordEditor) … … 55 55 } 56 56 57 void UIWizardNewVMPage InstallSetup::setPassword(const QString &strPassword)57 void UIWizardNewVMPageUserNameHostname::setPassword(const QString &strPassword) 58 58 { 59 59 if (m_pUserNamePasswordEditor) … … 61 61 } 62 62 63 QString UIWizardNewVMPage InstallSetup::hostname() const63 QString UIWizardNewVMPageUserNameHostname::hostname() const 64 64 { 65 65 if (m_pHostnameLineEdit) … … 68 68 } 69 69 70 void UIWizardNewVMPage InstallSetup::setHostname(const QString &strHostName)70 void UIWizardNewVMPageUserNameHostname::setHostname(const QString &strHostName) 71 71 { 72 72 if (m_pHostnameLineEdit) … … 74 74 } 75 75 76 UIWizardNewVMPageBasic InstallSetup::UIWizardNewVMPageBasicInstallSetup()76 UIWizardNewVMPageBasicUserNameHostname::UIWizardNewVMPageBasicUserNameHostname() 77 77 : m_pLabel(0) 78 78 { 79 /* Create widget: */80 79 QVBoxLayout *pMainLayout = new QVBoxLayout(this); 81 80 { … … 86 85 pGridLayout->addWidget(m_pUserNamePasswordEditor, 0, 0, 3, 4); 87 86 connect(m_pUserNamePasswordEditor, &UIUserNamePasswordEditor::sigSomeTextChanged, 88 this, &UIWizardNewVMPageBasic InstallSetup::completeChanged);87 this, &UIWizardNewVMPageBasicUserNameHostname::completeChanged); 89 88 m_pHostnameLabel = new QLabel; 90 89 m_pHostnameLineEdit = new QLineEdit; … … 98 97 } 99 98 100 /* Register fields: */101 99 registerField("userName", this, "userName"); 102 100 registerField("password", this, "password"); … … 104 102 } 105 103 106 void UIWizardNewVMPageBasic InstallSetup::retranslateUi()104 void UIWizardNewVMPageBasicUserNameHostname::retranslateUi() 107 105 { 108 /* Translate page: */109 106 setTitle(UIWizardNewVM::tr("User Name/Password and Hostname Settings")); 110 111 /* Translate widgets: */112 107 if (m_pLabel) 113 108 m_pLabel->setText(UIWizardNewVM::tr("<p>Here you can specify the user name/password and hostname. " … … 117 112 } 118 113 119 void UIWizardNewVMPageBasic InstallSetup::initializePage()114 void UIWizardNewVMPageBasicUserNameHostname::initializePage() 120 115 { 121 /* Translate page: */122 116 retranslateUi(); 123 117 } 124 118 125 bool UIWizardNewVMPageBasic InstallSetup::isComplete() const119 bool UIWizardNewVMPageBasicUserNameHostname::isComplete() const 126 120 { 127 121 if (m_pUserNamePasswordEditor) … … 130 124 } 131 125 132 int UIWizardNewVMPageBasicInstallSetup::nextId() const 126 void UIWizardNewVMPageBasicUserNameHostname::cleanupPage() 133 127 { 134 UIWizardNewVM *pWizard = qobject_cast<UIWizardNewVM*>(wizard());135 if (!pWizard || !pWizard->isUnattendedInstallEnabled() || !pWizard->isGuestOSTypeWindows())136 return UIWizardNewVM::PageHardware;137 return UIWizardNewVM::PageProductKey;138 128 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasicUserNameHostname.h
r85000 r85001 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UIWizardNewVMPageBasic InstallSetupclass declaration.3 * VBox Qt GUI - UIWizardNewVMPageBasicUserNameHostname class declaration. 4 4 */ 5 5 … … 16 16 */ 17 17 18 #ifndef FEQT_INCLUDED_SRC_wizards_newvm_UIWizardNewVMPageBasic InstallSetup_h19 #define FEQT_INCLUDED_SRC_wizards_newvm_UIWizardNewVMPageBasic InstallSetup_h18 #ifndef FEQT_INCLUDED_SRC_wizards_newvm_UIWizardNewVMPageBasicUserNameHostname_h 19 #define FEQT_INCLUDED_SRC_wizards_newvm_UIWizardNewVMPageBasicUserNameHostname_h 20 20 #ifndef RT_WITHOUT_PRAGMA_ONCE 21 21 # pragma once … … 35 35 36 36 37 class UIWizardNewVMPage InstallSetup: public UIWizardPageBase37 class UIWizardNewVMPageUserNameHostname : public UIWizardPageBase 38 38 { 39 39 public: 40 40 41 UIWizardNewVMPage InstallSetup();41 UIWizardNewVMPageUserNameHostname(); 42 42 43 43 /** @name Property getters/setters … … 53 53 protected: 54 54 55 /* Widgets: */56 55 UIUserNamePasswordEditor *m_pUserNamePasswordEditor; 57 56 QLineEdit *m_pHostnameLineEdit; … … 59 58 }; 60 59 61 class UIWizardNewVMPageBasic InstallSetup : public UIWizardPage, public UIWizardNewVMPageInstallSetup60 class UIWizardNewVMPageBasicUserNameHostname : public UIWizardPage, public UIWizardNewVMPageUserNameHostname 62 61 { 63 62 Q_OBJECT; … … 68 67 public: 69 68 70 /* Constructor: */ 71 UIWizardNewVMPageBasicInstallSetup(); 72 virtual int nextId() const /* override */; 69 UIWizardNewVMPageBasicUserNameHostname(); 73 70 74 71 private slots: … … 76 73 private: 77 74 78 /* Translation stuff: */79 75 void retranslateUi(); 80 81 /* Prepare stuff: */82 76 void initializePage(); 83 84 /* Validation stuff: */85 77 bool isComplete() const; 86 78 87 /* Widgets: */ 79 /** Override the default behavior which resets the fields to proginal values. */ 80 void cleanupPage() /* override */; 81 88 82 QIRichTextLabel *m_pLabel; 89 83 }; 90 84 91 #endif /* !FEQT_INCLUDED_SRC_wizards_newvm_UIWizardNewVMPageBasic InstallSetup_h */85 #endif /* !FEQT_INCLUDED_SRC_wizards_newvm_UIWizardNewVMPageBasicUserNameHostname_h */
Note:
See TracChangeset
for help on using the changeset viewer.