VirtualBox

Changeset 87322 in vbox


Ignore:
Timestamp:
Jan 20, 2021 12:45:43 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9515. More cleaning

Location:
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm
Files:
10 edited

Legend:

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

    r87251 r87322  
    130130         * Usually we are assigning extra-data values through UIExtraDataManager,
    131131         * but in that special case VM was not registered yet, so UIExtraDataManager is unaware of it: */
    132         if (!isUnattendedInstallEnabled() &&
     132        if (!isUnattendedEnabled() &&
    133133            (field("virtualDiskId").toString().isNull() || !field("virtualDisk").value<CMedium>().isNull()))
    134134            m_machine.SetExtraData(GUI_FirstRun, "yes");
     
    525525    setField("password", m_unattendedInstallData.m_strPassword);
    526526    setField("hostname", m_unattendedInstallData.m_strHostname);
    527     setField("installGuestAdditions", m_unattendedInstallData.m_fInstallGuestAdditions);
    528527    setField("guestAdditionsISOPath", m_unattendedInstallData.m_strGuestAdditionsISOPath);
    529528}
     
    552551}
    553552
    554 bool UIWizardNewVM::isUnattendedInstallEnabled() const
     553bool UIWizardNewVM::isUnattendedEnabled() const
    555554{
    556555    QVariant fieldValue = field("isUnattendedEnabled");
     
    564563    return getStringFieldValue("guestOSFamiyId").contains("windows", Qt::CaseInsensitive);
    565564}
    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  
    8282    void setDefaultUnattendedInstallData(const UIUnattendedInstallData &unattendedInstallData);
    8383    const UIUnattendedInstallData &unattendedInstallData() const;
    84     bool isUnattendedInstallEnabled() const;
     84    bool isUnattendedEnabled() const;
    8585    bool isGuestOSTypeWindows() const;
    86     /** Increases the amoun of the left marign of @p pLayout. */
    87     static void increaseLayoutLeftMargin(QLayout *pLayout, float mult = 2);
    8886
    8987protected:
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp

    r87318 r87322  
    182182    : m_pISOSelectorLabel(0)
    183183    , m_pISOFilePathSelector(0)
    184     , m_pEnableUnattendedInstallCheckBox(0)
    185184    , m_pStartHeadlessCheckBox(0)
    186185    , m_pNameAndSystemEditor(0)
     
    268267bool UIWizardNewVMPage1::checkISOFile() const
    269268{
    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;
    276277    return true;
    277278}
     
    285286}
    286287
    287 QWidget *UIWizardNewVMPage1::createNameOSTypeWidgets(bool fIncreaseLeftIndent,
    288                                                      bool fCreateUnattendedWidgets,
     288QWidget *UIWizardNewVMPage1::createNameOSTypeWidgets(bool fCreateUnattendedWidgets,
    289289                                                     bool fCreateLabels)
    290290{
    291     Q_UNUSED(fIncreaseLeftIndent);
    292291    QWidget *pContainer = new QWidget;
    293292    QGridLayout *pLayout = new QGridLayout(pContainer);
    294     if (fIncreaseLeftIndent)
    295         UIWizardNewVM::increaseLayoutLeftMargin(pLayout);
    296293
    297294    int iRow = 0;
     
    318315    if (fCreateUnattendedWidgets)
    319316    {
    320         m_pEnableUnattendedInstallCheckBox = new QCheckBox;
    321         pLayout->addWidget(m_pEnableUnattendedInstallCheckBox, iRow++, 0, 1, 1);
    322 
    323317        m_pISOSelectorLabel = new QLabel;
    324318        if (m_pISOSelectorLabel)
     
    454448bool UIWizardNewVMPage1::isUnattendedEnabled() const
    455449{
    456     if (!m_pEnableUnattendedInstallCheckBox)
    457         return false;
    458     return m_pEnableUnattendedInstallCheckBox->isChecked();
     450    if (m_pISOFilePathSelector)
     451        return m_pISOFilePathSelector->isValid();
     452    return false;
    459453}
    460454
     
    494488void UIWizardNewVMPage1::retranslateWidgets()
    495489{
    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 
    504490    if (m_pISOSelectorLabel)
    505         m_pISOSelectorLabel->setText(UIWizardNewVM::tr("Installer:"));
     491        m_pISOSelectorLabel->setText(UIWizardNewVM::tr("Installation ISO:"));
    506492
    507493    if (m_pStartHeadlessCheckBox)
     
    522508{
    523509    QVBoxLayout *pPageLayout = new QVBoxLayout(this);
    524     pPageLayout->addWidget(createNameOSTypeWidgets(/* fIncreaseLeftIndent */ false,
    525                                                    /* fCreateUnattendedWidget */ false,
     510    pPageLayout->addWidget(createNameOSTypeWidgets(/* fCreateUnattendedWidget */ false,
    526511                                                   /* fCreateLabels */false));
    527512    pPageLayout->addStretch();
     
    543528void UIWizardNewVMPageBasic1::createConnections()
    544529{
    545     connect(m_pEnableUnattendedInstallCheckBox, &QCheckBox::clicked, this, &UIWizardNewVMPageBasic1::sltUnattendedCheckBoxToggle);
    546530    connect(m_pISOFilePathSelector, &UIFilePathSelector::pathChanged, this, &UIWizardNewVMPageBasic1::sltISOPathChanged);
    547531    connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigNameChanged, this, &UIWizardNewVMPageBasic1::sltNameChanged);
     
    553537{
    554538    UIWizardNewVM *pWizard = qobject_cast<UIWizardNewVM*>(wizard());
    555     if (!pWizard || !pWizard->isUnattendedInstallEnabled())
     539    if (!pWizard || !pWizard->isUnattendedEnabled())
    556540        return UIWizardNewVM::Page3;
    557541    return UIWizardNewVM::Page2;
     
    588572    determineOSType(strPath);
    589573    setTypeByISODetectedOSType(m_strDetectedOSTypeId);
    590     emit completeChanged();
    591 }
    592 
    593 void UIWizardNewVMPageBasic1::sltUnattendedCheckBoxToggle(bool fEnabled)
    594 {
     574
     575    bool fEnabled = isUnattendedEnabled();
    595576    if (m_pISOSelectorLabel)
    596577        m_pISOSelectorLabel->setEnabled(fEnabled);
     
    599580    if (m_pStartHeadlessCheckBox)
    600581        m_pStartHeadlessCheckBox->setEnabled(fEnabled);
     582
    601583    emit completeChanged();
    602584}
    603 
    604585
    605586void UIWizardNewVMPageBasic1::retranslateUi()
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.h

    r87318 r87322  
    7878    void composeMachineFilePath();
    7979
    80     QWidget *createNameOSTypeWidgets(bool fIncreaseLeftIndent,  bool fCreateUnattendedWidgets, bool fCreateLabels);
     80    QWidget *createNameOSTypeWidgets(bool fCreateUnattendedWidgets, bool fCreateLabels);
    8181    int createNameOSTypeWidgets(QGridLayout *pLayout, bool fCreateLabels = true);
    8282    void setTypeByISODetectedOSType(const QString &strDetectedOSType);
     
    9191       /** Holds the ISO selector editor instance. */
    9292       mutable UIFilePathSelector *m_pISOFilePathSelector;
    93        QCheckBox *m_pEnableUnattendedInstallCheckBox;
    9493       QCheckBox *m_pStartHeadlessCheckBox;
    9594       /** We have two UINameAndSystemEditor instance since name/vm path fields and OS type fields
     
    104103private:
    105104
     105    /** Return false if ISO path is not empty but points to an missing or unreadable file. */
    106106    bool checkISOFile() const;
    107107    QFrame *horizontalLine();
     
    159159    void sltOsTypeChanged();
    160160    void sltISOPathChanged(const QString &strPath);
    161     void sltUnattendedCheckBoxToggle(bool fEnable);
    162161
    163162private:
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.cpp

    r87249 r87322  
    3737    , m_pHostnameLineEdit(0)
    3838    , m_pHostnameLabel(0)
    39     , m_pInstallGACheckBox(0)
    4039    , m_pGAISOPathLabel(0)
    4140    , m_pGAISOFilePathSelector(0)
     
    8786bool UIWizardNewVMPage2::installGuestAdditions() const
    8887{
    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();
    9891}
    9992
     
    118111}
    119112
    120 QWidget *UIWizardNewVMPage2::createUserNameHostNameWidgets(bool fIncreaseLeftIndent)
     113QWidget *UIWizardNewVMPage2::createUserNameHostNameWidgets()
    121114{
    122115    QWidget *pContainer = new QWidget;
    123116    QGridLayout *pGridLayout = new QGridLayout(pContainer);
    124 
    125     if (fIncreaseLeftIndent)
    126         UIWizardNewVM::increaseLayoutLeftMargin(pGridLayout);
    127117
    128118    m_pUserNamePasswordEditor = new UIUserNamePasswordEditor;
     
    141131}
    142132
    143 QWidget *UIWizardNewVMPage2::createGAInstallWidgets(bool fIncreaseLeftIndent)
     133QWidget *UIWizardNewVMPage2::createGAInstallWidgets()
    144134{
    145135    QWidget *pContainer = new QWidget;
    146136    QGridLayout *pContainerLayout = new QGridLayout(pContainer);
    147     if (fIncreaseLeftIndent)
    148         UIWizardNewVM::increaseLayoutLeftMargin(pContainerLayout);
    149 
    150     m_pInstallGACheckBox = new QCheckBox;
     137
    151138    m_pGAISOPathLabel = new QLabel;
    152139    {
     
    163150    }
    164151
    165     pContainerLayout->addWidget(m_pInstallGACheckBox, 0, 0, 1, 5);
    166152    pContainerLayout->addWidget(m_pGAISOPathLabel, 1, 1, 1, 1);
    167153    pContainerLayout->addWidget(m_pGAISOFilePathSelector, 1, 2, 1, 4);
     
    169155}
    170156
    171 QWidget *UIWizardNewVMPage2::createProductKeyWidgets(bool fIncreaseLeftIndent)
     157QWidget *UIWizardNewVMPage2::createProductKeyWidgets()
    172158{
    173159    QWidget *pContainer = new QWidget;
    174160    QGridLayout *pGridLayout = new QGridLayout(pContainer);
    175     if (fIncreaseLeftIndent)
    176         UIWizardNewVM::increaseLayoutLeftMargin(pGridLayout);
    177161
    178162    m_pProductKeyLabel = new QLabel;
     
    190174bool UIWizardNewVMPage2::checkGAISOFile() const
    191175{
    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;
    198182    return true;
    199183}
     
    209193    if (m_pHostnameLabel)
    210194        m_pHostnameLabel->setText(UIWizardNewVM::tr("Hostname:"));
    211     if (m_pInstallGACheckBox)
    212         m_pInstallGACheckBox->setText(UIWizardNewVM::tr("Install guest additions"));
     195
    213196    if (m_pGAISOPathLabel)
    214         m_pGAISOPathLabel->setText(UIWizardNewVM::tr("Installation medium:"));
     197        m_pGAISOPathLabel->setText(UIWizardNewVM::tr("GA Installation ISO:"));
    215198    if (m_pGAISOFilePathSelector)
    216199        m_pGAISOFilePathSelector->setToolTip(UIWizardNewVM::tr("Please select an installation medium (ISO file)"));
     
    240223    }
    241224
    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());
    245228
    246229    registerField("userName", this, "userName");
     
    259242        connect(m_pUserNamePasswordEditor, &UIUserNamePasswordEditor::sigSomeTextChanged,
    260243                this, &UIWizardNewVMPageBasic2::completeChanged);
    261     if (m_pInstallGACheckBox)
    262         connect(m_pInstallGACheckBox, &QCheckBox::toggled, this,
    263                 &UIWizardNewVMPageBasic2::sltInstallGACheckBoxToggle);
    264244    if (m_pGAISOFilePathSelector)
    265245        connect(m_pGAISOFilePathSelector, &UIFilePathSelector::pathChanged,
     
    340320{
    341321    UIWizardNewVM *pWizard = qobject_cast<UIWizardNewVM*>(wizard());
    342     if (!pWizard || !pWizard->isUnattendedInstallEnabled() || !pWizard->isGuestOSTypeWindows())
     322    if (!pWizard || !pWizard->isUnattendedEnabled() || !pWizard->isGuestOSTypeWindows())
    343323        return false;
    344324    return true;
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.h

    r87249 r87322  
    5353        void setHostname(const QString &strHostName);
    5454        bool installGuestAdditions() const;
    55         void setInstallGuestAdditions(bool fInstallGA);
    5655        QString guestAdditionsISOPath() const;
    5756        void setGuestAdditionsISOPath(const QString &strISOPath);
     
    6766    };
    6867
    69     QWidget *createUserNameHostNameWidgets(bool fIncreaseLeftIndent);
    70     QWidget *createGAInstallWidgets(bool fIncreaseLeftIndent);
    71     QWidget *createProductKeyWidgets(bool fIncreaseLeftIndent);
     68    QWidget *createUserNameHostNameWidgets();
     69    QWidget *createGAInstallWidgets();
     70    QWidget *createProductKeyWidgets();
    7271
     72    /** Returns false if ISO path selector is non empty but has invalid file path. */
    7373    bool checkGAISOFile() const;
    7474    void markWidgets() const;
     
    8080        QLineEdit *m_pHostnameLineEdit;
    8181        QLabel  *m_pHostnameLabel;
    82         /** Guest additions iso selection widgets. */
    83         QCheckBox *m_pInstallGACheckBox;
    8482        QLabel  *m_pGAISOPathLabel;
    8583        UIFilePathSelector *m_pGAISOFilePathSelector;
     
    9795    Q_PROPERTY(QString password READ password WRITE setPassword);
    9896    Q_PROPERTY(QString hostname READ hostname WRITE setHostname);
    99     Q_PROPERTY(bool installGuestAdditions READ installGuestAdditions WRITE setInstallGuestAdditions);
     97    Q_PROPERTY(bool installGuestAdditions READ installGuestAdditions);
    10098    Q_PROPERTY(QString guestAdditionsISOPath READ guestAdditionsISOPath WRITE setGuestAdditionsISOPath);
    10199    Q_PROPERTY(QString productKey READ productKey);
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.cpp

    r87249 r87322  
    164164}
    165165
    166 QWidget *UIWizardNewVMPage3::createDiskWidgets(bool fIncreaseLeftIndent)
     166QWidget *UIWizardNewVMPage3::createDiskWidgets()
    167167{
    168168    QWidget *pDiskContainer = new QWidget;
    169169    QGridLayout *pDiskLayout = new QGridLayout(pDiskContainer);
    170     if (fIncreaseLeftIndent)
    171         UIWizardNewVM::increaseLayoutLeftMargin(pDiskLayout);
    172 
    173170
    174171    m_pDiskSkip = new QRadioButton;
     
    197194}
    198195
    199 QWidget *UIWizardNewVMPage3::createHardwareWidgets(bool fIncreaseLeftIndent)
     196QWidget *UIWizardNewVMPage3::createHardwareWidgets()
    200197{
    201198    QWidget *pHardwareContainer = new QWidget;
    202199    QGridLayout *pHardwareLayout = new QGridLayout(pHardwareContainer);
    203     if (fIncreaseLeftIndent)
    204         UIWizardNewVM::increaseLayoutLeftMargin(pHardwareLayout);
     200
    205201    m_pBaseMemoryEditor = new UIBaseMemoryEditor(0, true);
    206202    m_pVirtualCPUEditor = new UIVirtualCPUEditor(0, true);
     
    233229    pMainLayout->addWidget(m_pToolBox);
    234230
    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());
    237233    m_pToolBox->setStyleSheet("QToolBox::tab:selected { font: bold; }");
    238234
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.h

    r87249 r87322  
    7777    /** @} */
    7878
    79     QWidget *createDiskWidgets(bool fIncreaseLeftIndent);
    80     QWidget *createHardwareWidgets(bool fIncreaseLeftIndent);
     79    QWidget *createDiskWidgets();
     80    QWidget *createHardwareWidgets();
    8181
    8282    /** Helpers. */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp

    r87318 r87322  
    5050    {
    5151        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,
    5453                                                                                         /* fCreateLabels */ false), "");
    5554        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(), "");
    5857        // m_pToolBox->insertItem(ExpertToolboxItems_UsernameHostname, createUserNameHostNameWidgets(/* fIncreaseLeftIndent */ true), "");
    5958        // m_pToolBox->insertItem(ExpertToolboxItems_GAInstall, createGAInstallWidgets(/* fIncreaseLeftIndent */ true), "");
     
    119118                                                "}").arg(tabBackgroundColor.name()).arg(textColor.name()).arg(disabledTextColor.name()));
    120119
    121     if (m_pEnableUnattendedInstallCheckBox)
    122         disableEnableUnattendedRelatedWidgets(m_pEnableUnattendedInstallCheckBox->isChecked());
     120    disableEnableUnattendedRelatedWidgets(isUnattendedEnabled());
    123121}
    124122
     
    167165}
    168166
    169 void UIWizardNewVMPageExpert::sltUnattendedCheckBoxToggle(bool fEnabled)
    170 {
    171     disableEnableUnattendedRelatedWidgets(fEnabled);
    172     emit completeChanged();
    173 }
    174 
    175167void UIWizardNewVMPageExpert::sltISOPathChanged(const QString &strPath)
    176168{
    177169    determineOSType(strPath);
    178170    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());
    188172    emit completeChanged();
    189173}
     
    233217                this, &UIWizardNewVMPageExpert::sltOSFamilyTypeChanged);
    234218    }
    235     if (m_pEnableUnattendedInstallCheckBox)
    236         connect(m_pEnableUnattendedInstallCheckBox, &QCheckBox::clicked,
    237                 this, &UIWizardNewVMPageExpert::sltUnattendedCheckBoxToggle);
     219
    238220    if (m_pISOFilePathSelector)
    239221        connect(m_pISOFilePathSelector, &UIFilePathSelector::pathChanged,
     
    244226        connect(m_pUserNamePasswordEditor, &UIUserNamePasswordEditor::sigSomeTextChanged,
    245227                this, &UIWizardNewVMPageExpert::completeChanged);
    246     if (m_pInstallGACheckBox)
    247         connect(m_pInstallGACheckBox, &QCheckBox::toggled, this,
    248                 &UIWizardNewVMPageExpert::sltInstallGACheckBoxToggle);
    249228    if (m_pGAISOFilePathSelector)
    250229        connect(m_pGAISOFilePathSelector, &UIFilePathSelector::pathChanged,
     
    304283        m_pDiskSelector->setCurrentIndex(0);
    305284
    306     if (m_pEnableUnattendedInstallCheckBox)
    307         disableEnableUnattendedRelatedWidgets(m_pEnableUnattendedInstallCheckBox->isChecked());
     285    disableEnableUnattendedRelatedWidgets(isUnattendedEnabled());
    308286    if (m_pProductKeyLabel)
    309287        m_pProductKeyLabel->setEnabled(isProductKeyWidgetEnabled());
     
    354332        pLayout->addWidget(m_pStartHeadlessCheckBox, iRow++, 0, 1, 5);
    355333
    356     pLayout->addWidget(createUserNameHostNameWidgets(/* fIncreaseLeftIndent */ false), iRow, 0, 4, 5);
     334    pLayout->addWidget(createUserNameHostNameWidgets(), iRow, 0, 4, 5);
    357335    iRow += 4;
    358     pLayout->addWidget(createGAInstallWidgets(/* fIncreaseLeftIndent */ false), iRow, 0, 2, 5);
     336    pLayout->addWidget(createGAInstallWidgets(), iRow, 0, 2, 5);
    359337    iRow += 2;
    360     pLayout->addWidget(createProductKeyWidgets(/* fIncreaseLeftIndent */ false), iRow, 0, 1, 5);
     338    pLayout->addWidget(createProductKeyWidgets(), iRow, 0, 1, 5);
    361339
    362340
     
    392370    {
    393371        /* 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        // }
    400378        /* Check the GA installation medium: */
    401379        if (!checkGAISOFile())
     
    459437{
    460438    UIWizardNewVM *pWizard = qobject_cast<UIWizardNewVM*>(wizard());
    461     if (!pWizard || !pWizard->isUnattendedInstallEnabled() || !pWizard->isGuestOSTypeWindows())
     439    if (!pWizard || !pWizard->isUnattendedEnabled() || !pWizard->isGuestOSTypeWindows())
    462440        return false;
    463441    return true;
     
    466444void UIWizardNewVMPageExpert::disableEnableUnattendedRelatedWidgets(bool fEnabled)
    467445{
    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);
    478446    if (m_pStartHeadlessCheckBox)
    479447        m_pStartHeadlessCheckBox->setEnabled(fEnabled);
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.h

    r87318 r87322  
    5252    Q_PROPERTY(QString password READ password WRITE setPassword);
    5353    Q_PROPERTY(QString hostname READ hostname WRITE setHostname);
    54     Q_PROPERTY(bool installGuestAdditions READ installGuestAdditions WRITE setInstallGuestAdditions);
     54    Q_PROPERTY(bool installGuestAdditions READ installGuestAdditions);
    5555    Q_PROPERTY(QString guestAdditionsISOPath READ guestAdditionsISOPath WRITE setGuestAdditionsISOPath);
    5656    Q_PROPERTY(QString productKey READ productKey);
     
    7979    void sltVirtualDiskSourceChanged();
    8080    void sltGetWithFileOpenDialog();
    81     void sltUnattendedCheckBoxToggle(bool fEnable);
    8281    void sltISOPathChanged(const QString &strPath);
    83     void sltInstallGACheckBoxToggle(bool fChecked);
    8482    void sltGAISOPathChanged(const QString &strPath);
    8583    void sltOSFamilyTypeChanged();
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