VirtualBox

Ignore:
Timestamp:
Mar 17, 2021 7:21:33 AM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9950. Removing the GA install checkbox and making the groupbox checkable

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

Legend:

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

    r88038 r88147  
    4848    , m_pHostnameLineEdit(0)
    4949    , m_pHostnameLabel(0)
    50     , m_pGAInstallCheckBox(0)
    5150    , m_pGAISOPathLabel(0)
    5251    , m_pGAISOFilePathSelector(0)
     
    9897bool UIWizardNewVMPage2::installGuestAdditions() const
    9998{
    100     if (!m_pGAInstallCheckBox)
    101         return false;
    102     return m_pGAInstallCheckBox->isChecked();
     99    if (!m_pGAInstallationISOContainer)
     100        return false;
     101    return m_pGAInstallationISOContainer->isChecked();
    103102}
    104103
    105104void UIWizardNewVMPage2::setInstallGuestAdditions(bool fInstallGA)
    106105{
    107     if (m_pGAInstallCheckBox)
    108         m_pGAInstallCheckBox->setChecked(fInstallGA);
     106    if (m_pGAInstallationISOContainer)
     107        m_pGAInstallationISOContainer->setChecked(fInstallGA);
    109108}
    110109
     
    135134
    136135    m_pGAInstallationISOContainer = new QGroupBox;
     136    m_pGAInstallationISOContainer->setCheckable(true);
    137137    QGridLayout *pGAInstallationISOContainer = new QGridLayout(m_pGAInstallationISOContainer);
    138     m_pGAInstallCheckBox = new QCheckBox;
    139     if (m_pGAInstallCheckBox)
    140         pGAInstallationISOContainer->addWidget(m_pGAInstallCheckBox, 0, 0, 1, 8);
    141138    m_pGAISOPathLabel = new QLabel;
    142139    if (m_pGAISOPathLabel)
    143         pGAInstallationISOContainer->addWidget(m_pGAISOPathLabel, 1, 1, 1, 1);
     140        pGAInstallationISOContainer->addWidget(m_pGAISOPathLabel, 0, 1, 1, 1);
    144141
    145142    m_pGAISOFilePathSelector = new UIFilePathSelector;
     
    149146        m_pGAISOFilePathSelector->setFileDialogFilters("*.iso *.ISO");
    150147        m_pGAISOFilePathSelector->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum);
    151         pGAInstallationISOContainer->addWidget(m_pGAISOFilePathSelector, 1, 2, 1, 6);
     148        m_pGAISOFilePathSelector->setInitialPath(uiCommon().defaultFolderPathForType(UIMediumDeviceType_DVD));
     149        pGAInstallationISOContainer->addWidget(m_pGAISOFilePathSelector, 0, 2, 1, 6);
    152150        if (m_pGAISOPathLabel)
    153151            m_pGAISOPathLabel->setBuddy(m_pGAISOFilePathSelector);
     
    186184    if (m_pGAISOFilePathSelector)
    187185        m_pGAISOFilePathSelector->setToolTip(UIWizardNewVM::tr("Please select an installation medium (ISO file)"));
    188     if (m_pGAInstallCheckBox)
    189     {
    190         m_pGAInstallCheckBox->setText(UIWizardNewVM::tr("&Install Guest Additions"));
    191         m_pGAInstallCheckBox->setToolTip(UIWizardNewVM::tr("<p>When checked the guest additions will be installed "
     186    if (m_pGAInstallationISOContainer)
     187    {
     188        m_pGAInstallationISOContainer->setTitle(UIWizardNewVM::tr("&Guest Additions"));
     189        m_pGAInstallationISOContainer->setToolTip(UIWizardNewVM::tr("<p>When checked the guest additions will be installed "
    192190                                                           "after the OS install.</p>"));
    193191    }
     
    198196    if (m_pAdditionalOptionsContainer)
    199197        m_pAdditionalOptionsContainer->setTitle(UIWizardNewVM::tr("Additional options"));
    200     if (m_pGAInstallationISOContainer)
    201         m_pGAInstallationISOContainer->setTitle(UIWizardNewVM::tr("Guest Additions"));
    202198    if (m_pStartHeadlessCheckBox)
    203199    {
     
    295291bool UIWizardNewVMPage2::isGAInstallEnabled() const
    296292{
    297     if (m_pGAInstallCheckBox && m_pGAInstallCheckBox->isChecked())
     293    if (m_pGAInstallationISOContainer && m_pGAInstallationISOContainer->isChecked())
    298294        return true;
    299295    return false;
     
    337333                this, &UIWizardNewVMPageBasic2::sltGAISOPathChanged);
    338334    if (m_pGAISOFilePathSelector)
    339         connect(m_pGAInstallCheckBox, &QCheckBox::toggled,
     335        connect(m_pGAInstallationISOContainer, &QGroupBox::toggled,
    340336                this, &UIWizardNewVMPageBasic2::sltInstallGACheckBoxToggle);
    341337}
     
    355351{
    356352    disableEnableProductKeyWidgets(isProductKeyWidgetEnabled());
    357     disableEnableGAWidgets(m_pGAInstallCheckBox ? m_pGAInstallCheckBox->isChecked() : false);
     353    disableEnableGAWidgets(m_pGAInstallationISOContainer ? m_pGAInstallationISOContainer->isChecked() : false);
    358354    retranslateUi();
    359355}
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.h

    r87571 r88147  
    8888        QGroupBox *m_pAdditionalOptionsContainer;
    8989        QGroupBox *m_pGAInstallationISOContainer;
    90 
    9190        QCheckBox *m_pStartHeadlessCheckBox;
    9291        UIUserNamePasswordEditor *m_pUserNamePasswordEditor;
    9392        QLineEdit *m_pHostnameLineEdit;
    94         QLabel  *m_pHostnameLabel;
    95         QCheckBox *m_pGAInstallCheckBox;
    96         QLabel  *m_pGAISOPathLabel;
     93        QLabel    *m_pHostnameLabel;
     94        QLabel    *m_pGAISOPathLabel;
    9795        UIFilePathSelector *m_pGAISOFilePathSelector;
    9896        /** Product key stuff. */
    9997        QLineEdit *m_pProductKeyLineEdit;
    100         QLabel  *m_pProductKeyLabel;
     98        QLabel     *m_pProductKeyLabel;
    10199    /** @} */
    102100
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp

    r88117 r88147  
    219219                this, &UIWizardNewVMPageExpert::sltGAISOPathChanged);
    220220
    221     if (m_pGAInstallCheckBox)
    222         connect(m_pGAInstallCheckBox, &QCheckBox::toggled,
     221    if (m_pGAInstallationISOContainer)
     222        connect(m_pGAInstallationISOContainer, &QGroupBox::toggled,
    223223                this, &UIWizardNewVMPageExpert::sltInstallGACheckBoxToggle);
    224224
     
    442442        }
    443443        /* Check the GA installation medium: */
    444         if (m_pGAInstallCheckBox->isChecked() && !checkGAISOFile())
     444        if (m_pGAInstallationISOContainer && m_pGAInstallationISOContainer->isChecked() && !checkGAISOFile())
    445445        {
    446446            m_pToolBox->setPageTitleIcon(ExpertToolboxItems_Unattended,
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