VirtualBox

Changeset 90039 in vbox for trunk/src/VBox/Frontends


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.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIUserNamePasswordEditor.h

    r90037 r90039  
    4444    void sigUserNameChanged(const QString &strUserName);
    4545    void sigPasswordChanged(const QString &strPassword);
    46 
    4746
    4847public:
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp

    r90037 r90039  
    754754}
    755755
     756const QString &UIWizardNewVM::guestAdditionsISOPath() const
     757{
     758    return m_strGuestAdditionsISOPath;
     759}
     760
     761void UIWizardNewVM::setGuestAdditionsISOPath(const QString &strGAISOPath)
     762{
     763    m_strGuestAdditionsISOPath = strGAISOPath;
     764}
     765
     766const QString &UIWizardNewVM::hostname() const
     767{
     768    return m_strHostname;
     769}
     770
     771void UIWizardNewVM::setHostname(const QString &strHostname)
     772{
     773    m_strHostname = strHostname;
     774}
     775
     776const QString &UIWizardNewVM::productKey() const
     777{
     778    return m_strProductKey;
     779}
     780
     781void UIWizardNewVM::setProductKey(const QString &productKey)
     782{
     783    m_strProductKey = productKey;
     784}
     785
    756786const UIUnattendedInstallData &UIWizardNewVM::unattendedInstallData() const
    757787{
    758788    m_unattendedInstallData.m_strISOPath = m_strISOFilePath;
    759     // m_unattendedInstallData.m_strUserName = getStringFieldValue("userName");
    760     // m_unattendedInstallData.m_strHostname = getStringFieldValue("hostname");
    761     // m_unattendedInstallData.m_strPassword = getStringFieldValue("password");
     789    m_unattendedInstallData.m_strUserName = m_strUserName;
     790    m_unattendedInstallData.m_strPassword = m_strPassword;
     791    m_unattendedInstallData.m_strHostname = m_strHostname;
     792
    762793    m_unattendedInstallData.m_strDetectedOSTypeId = m_strDetectedOSTypeId;
    763794    // // m_unattendedInstallData.m_strDetectedOSVersion = getStringFieldValue("detectedOSVersion");
     
    765796    // // m_unattendedInstallData.m_strDetectedOSLanguages = getStringFieldValue("detectedOSLanguages");
    766797    // // m_unattendedInstallData.m_strDetectedOSHints = getStringFieldValue("detectedOSHints");
    767     // m_unattendedInstallData.m_strProductKey = getStringFieldValue("productKey");
    768     // m_unattendedInstallData.m_strGuestAdditionsISOPath = getStringFieldValue("guestAdditionsISOPath");
     798    m_unattendedInstallData.m_strProductKey = m_strProductKey;
     799    m_unattendedInstallData.m_strGuestAdditionsISOPath = m_strGuestAdditionsISOPath;
    769800
    770801    // m_unattendedInstallData.m_fUnattendedEnabled = getBoolFieldValue("isUnattendedEnabled");
    771802    // m_unattendedInstallData.m_fStartHeadless = getBoolFieldValue("startHeadless");
    772     // m_unattendedInstallData.m_fInstallGuestAdditions = getBoolFieldValue("installGuestAdditions");
    773 
     803    m_unattendedInstallData.m_fInstallGuestAdditions = m_fInstallGuestAdditions;
    774804    // m_unattendedInstallData.m_uMachineUid = createdMachineId();
    775805
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h

    r90037 r90039  
    120120    void setPassword(const QString &strPassword);
    121121
     122    const QString &guestAdditionsISOPath() const;
     123    void setGuestAdditionsISOPath(const QString &strGAISOPath);
     124
     125    const QString &hostname() const;
     126    void setHostname(const QString &strHostname);
     127
     128    const QString &productKey() const;
     129    void setProductKey(const QString &productKey);
     130
    122131protected:
    123132
     
    187196    QString m_strUserName;
    188197    QString m_strPassword;
     198    QString m_strGuestAdditionsISOPath;
     199    QString m_strHostname;
     200    QString m_strProductKey;
    189201};
    190202
  • 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
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMUnattendedPageBasic.h

    r90037 r90039  
    8787    void sltInstallGACheckBoxToggle(bool fChecked);
    8888    void sltGAISOPathChanged(const QString &strPath);
    89     // void sltPasswordChanged(const QString &strPassword);
    90     // void sltUserNameChanged(const QString &strUserName);
     89    void sltPasswordChanged(const QString &strPassword);
     90    void sltUserNameChanged(const QString &strUserName);
     91    void sltHostnameChanged(const QString &strHostname);
     92    void sltProductKeyChanged(const QString &strProductKey);
    9193
    9294private:
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