VirtualBox

Ignore:
Timestamp:
Jul 5, 2021 7:39:38 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
145533
Message:

FE/Qt: bugref:9996: More changes on unattended install page.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMUnattendedPageBasic.cpp

    r90037 r90039  
    3939#include "CSystemProperties.h"
    4040#include "CUnattended.h"
    41 
    42 // UIWizardNewVMUnattendedPage::UIWizardNewVMUnattendedPage()
    43 
    44 // {
    45 // }
    46 
    47 // QString UIWizardNewVMUnattendedPage::userName() const
    48 // {
    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() const
    61 // {
    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() const
    74 // {
    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() const
    89 // {
    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 // }
    10041
    10142// QString UIWizardNewVMUnattendedPage::productKey() const
     
    166107void UIWizardNewVMUnattendedPageBasic::createConnections()
    167108{
    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
    171117    if (m_pGAISOFilePathSelector)
    172118        connect(m_pGAISOFilePathSelector, &UIFilePathSelector::pathChanged,
     
    175121        connect(m_pGAInstallationISOContainer, &QGroupBox::toggled,
    176122                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
    177130}
    178131
     
    250203void UIWizardNewVMUnattendedPageBasic::sltGAISOPathChanged(const QString &strPath)
    251204{
    252     Q_UNUSED(strPath);
     205    if (m_pWizard)
     206        m_pWizard->setGuestAdditionsISOPath(strPath);
    253207    emit completeChanged();
    254208}
    255209
     210void UIWizardNewVMUnattendedPageBasic::sltPasswordChanged(const QString &strPassword)
     211{
     212    if (m_pWizard)
     213        m_pWizard->setPassword(strPassword);
     214    emit completeChanged();
     215}
     216
     217void UIWizardNewVMUnattendedPageBasic::sltUserNameChanged(const QString &strUserName)
     218{
     219    if (m_pWizard)
     220        m_pWizard->setUserName(strUserName);
     221    emit completeChanged();
     222}
     223
    256224bool UIWizardNewVMUnattendedPageBasic::isProductKeyWidgetEnabled() const
    257225{
     
    259227        return false;
    260228    return true;
     229}
     230
     231void UIWizardNewVMUnattendedPageBasic::sltHostnameChanged(const QString &strHostname)
     232{
     233    if (m_pWizard)
     234        m_pWizard->setHostname(strHostname);
     235}
     236
     237void UIWizardNewVMUnattendedPageBasic::sltProductKeyChanged(const QString &strProductKey)
     238{
     239    if (m_pWizard)
     240        m_pWizard->setProductKey(strProductKey);
    261241}
    262242
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette