Changeset 90039 in vbox for trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMUnattendedPageBasic.cpp
- Timestamp:
- Jul 5, 2021 7:39:38 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 145533
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMUnattendedPageBasic.cpp
r90037 r90039 39 39 #include "CSystemProperties.h" 40 40 #include "CUnattended.h" 41 42 // UIWizardNewVMUnattendedPage::UIWizardNewVMUnattendedPage()43 44 // {45 // }46 47 // QString UIWizardNewVMUnattendedPage::userName() const48 // {49 // if (m_pUserNamePasswordEditor)50 // return m_pUserNamePasswordEditor->userName();51 // return QString();52 // }53 54 // void UIWizardNewVMUnattendedPage::setUserName(const QString &strName)55 // {56 // if (m_pUserNamePasswordEditor)57 // m_pUserNamePasswordEditor->setUserName(strName);58 // }59 60 // QString UIWizardNewVMUnattendedPage::password() const61 // {62 // if (m_pUserNamePasswordEditor)63 // return m_pUserNamePasswordEditor->password();64 // return QString();65 // }66 67 // void UIWizardNewVMUnattendedPage::setPassword(const QString &strPassword)68 // {69 // if (m_pUserNamePasswordEditor)70 // return m_pUserNamePasswordEditor->setPassword(strPassword);71 // }72 73 // QString UIWizardNewVMUnattendedPage::hostname() const74 // {75 // if (m_pHostnameLineEdit)76 // return m_pHostnameLineEdit->text();77 // return QString();78 // }79 80 // void UIWizardNewVMUnattendedPage::setHostname(const QString &strHostName)81 // {82 // if (m_pHostnameLineEdit)83 // return m_pHostnameLineEdit->setText(strHostName);84 // }85 86 87 88 // QString UIWizardNewVMUnattendedPage::guestAdditionsISOPath() const89 // {90 // if (!m_pGAISOFilePathSelector)91 // return QString();92 // return m_pGAISOFilePathSelector->path();93 // }94 95 // void UIWizardNewVMUnattendedPage::setGuestAdditionsISOPath(const QString &strISOPath)96 // {97 // if (m_pGAISOFilePathSelector)98 // m_pGAISOFilePathSelector->setPath(strISOPath);99 // }100 41 101 42 // QString UIWizardNewVMUnattendedPage::productKey() const … … 166 107 void UIWizardNewVMUnattendedPageBasic::createConnections() 167 108 { 168 // if (m_pUserNamePasswordEditor) 169 // connect(m_pUserNamePasswordEditor, &UIUserNamePasswordEditor::sigSomeTextChanged, 170 // this, &UIWizardNewVMUnattendedPageBasic::completeChanged); 109 if (m_pUserNamePasswordEditor) 110 { 111 connect(m_pUserNamePasswordEditor, &UIUserNamePasswordEditor::sigPasswordChanged, 112 this, &UIWizardNewVMUnattendedPageBasic::sltPasswordChanged); 113 connect(m_pUserNamePasswordEditor, &UIUserNamePasswordEditor::sigUserNameChanged, 114 this, &UIWizardNewVMUnattendedPageBasic::sltUserNameChanged); 115 } 116 171 117 if (m_pGAISOFilePathSelector) 172 118 connect(m_pGAISOFilePathSelector, &UIFilePathSelector::pathChanged, … … 175 121 connect(m_pGAInstallationISOContainer, &QGroupBox::toggled, 176 122 this, &UIWizardNewVMUnattendedPageBasic::sltInstallGACheckBoxToggle); 123 if (m_pHostnameLineEdit) 124 connect(m_pHostnameLineEdit, &QLineEdit::textChanged, 125 this, &UIWizardNewVMUnattendedPageBasic::sltHostnameChanged); 126 if (m_pProductKeyLineEdit) 127 connect(m_pProductKeyLineEdit, &QLineEdit::textChanged, 128 this, &UIWizardNewVMUnattendedPageBasic::sltProductKeyChanged); 129 177 130 } 178 131 … … 250 203 void UIWizardNewVMUnattendedPageBasic::sltGAISOPathChanged(const QString &strPath) 251 204 { 252 Q_UNUSED(strPath); 205 if (m_pWizard) 206 m_pWizard->setGuestAdditionsISOPath(strPath); 253 207 emit completeChanged(); 254 208 } 255 209 210 void UIWizardNewVMUnattendedPageBasic::sltPasswordChanged(const QString &strPassword) 211 { 212 if (m_pWizard) 213 m_pWizard->setPassword(strPassword); 214 emit completeChanged(); 215 } 216 217 void UIWizardNewVMUnattendedPageBasic::sltUserNameChanged(const QString &strUserName) 218 { 219 if (m_pWizard) 220 m_pWizard->setUserName(strUserName); 221 emit completeChanged(); 222 } 223 256 224 bool UIWizardNewVMUnattendedPageBasic::isProductKeyWidgetEnabled() const 257 225 { … … 259 227 return false; 260 228 return true; 229 } 230 231 void UIWizardNewVMUnattendedPageBasic::sltHostnameChanged(const QString &strHostname) 232 { 233 if (m_pWizard) 234 m_pWizard->setHostname(strHostname); 235 } 236 237 void UIWizardNewVMUnattendedPageBasic::sltProductKeyChanged(const QString &strProductKey) 238 { 239 if (m_pWizard) 240 m_pWizard->setProductKey(strProductKey); 261 241 } 262 242
Note:
See TracChangeset
for help on using the changeset viewer.