VirtualBox

Changeset 91277 in vbox


Ignore:
Timestamp:
Sep 16, 2021 11:50:40 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
146937
Message:

FE/Qt: bugref:9996. Redesigning new vm and new vd expert pages.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.cpp

    r91272 r91277  
    252252    m_fIsCreateFixedPossible = uCapabilities & KMediumFormatCapabilities_CreateFixed;
    253253    m_fIsCreateSplitPossible = uCapabilities & KMediumFormatCapabilities_CreateSplit2G;
    254 
    255254    m_pFixedCheckBox->setEnabled(true);
    256255    if (!m_fIsCreateDynamicPossible)
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDExpertPage.cpp

    r91272 r91277  
    3535    , m_pFormatComboxBox(0)
    3636    , m_pVariantWidget(0)
     37    , m_pFormatVariantGroupBox(0)
    3738    , m_strDefaultName(strDefaultName)
    3839    , m_strDefaultPath(strDefaultPath)
     
    4647void UIWizardNewVDExpertPage::prepare()
    4748{
    48     QGridLayout *pMainLayout = new QGridLayout(this);
     49    QVBoxLayout *pMainLayout = new QVBoxLayout(this);
    4950    m_pSizeAndPathGroup = new UIMediumSizeAndPathGroupBox(true /* fExpertMode */, 0 /* parent */, _4M /* minimum size */);
    50     m_pFormatComboxBox = new UIDiskFormatsGroupBox(true /* fExpertMode */, KDeviceType_HardDisk, 0);
     51    m_pFormatComboxBox = new UIDiskFormatsComboBox(true /* fExpertMode */, KDeviceType_HardDisk, 0);
    5152    m_pVariantWidget = new UIDiskVariantWidget(0);
    5253
    53     pMainLayout->addWidget(m_pSizeAndPathGroup, 0, 0, 4, 2);
    54     pMainLayout->addWidget(m_pFormatComboxBox, 4, 0, 7, 1);
    55     pMainLayout->addWidget(m_pVariantWidget, 4, 1, 3, 1);
    56 
    57     connect(m_pFormatComboxBox, &UIDiskFormatsGroupBox::sigMediumFormatChanged,
     54    m_pFormatVariantGroupBox = new QGroupBox;
     55    QHBoxLayout *pFormatVariantLayout = new QHBoxLayout(m_pFormatVariantGroupBox);
     56    pFormatVariantLayout->addWidget(m_pFormatComboxBox, 0, Qt::AlignTop);
     57    pFormatVariantLayout->addWidget(m_pVariantWidget);
     58
     59    pMainLayout->addWidget(m_pSizeAndPathGroup);
     60    pMainLayout->addWidget(m_pFormatVariantGroupBox);
     61
     62    connect(m_pFormatComboxBox, &UIDiskFormatsComboBox::sigMediumFormatChanged,
    5863            this, &UIWizardNewVDExpertPage::sltMediumFormatChanged);
    5964    connect(m_pVariantWidget, &UIDiskVariantWidget::sigMediumVariantChanged,
     
    123128void UIWizardNewVDExpertPage::retranslateUi()
    124129{
     130    if (m_pFormatVariantGroupBox)
     131        m_pFormatVariantGroupBox->setTitle(UIWizardNewVD::tr("Hard Disk File &Type and Variant"));
    125132}
    126133
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDExpertPage.h

    r91272 r91277  
    2626
    2727/* Forward declarations: */
    28 class UIDiskFormatsGroupBox;
     28class QGroupBox;
     29class UIDiskFormatsComboBox;
    2930class UIDiskVariantWidget;
    3031class UIMediumSizeAndPathGroupBox;
     
    6465     * @{ */
    6566       UIMediumSizeAndPathGroupBox *m_pSizeAndPathGroup;
    66        UIDiskFormatsGroupBox *m_pFormatComboxBox;
     67       UIDiskFormatsComboBox *m_pFormatComboxBox;
    6768       UIDiskVariantWidget *m_pVariantWidget;
     69       QGroupBox *m_pFormatVariantGroupBox;
    6870   /** @} */
    6971
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMExpertPage.cpp

    r91272 r91277  
    4343UIWizardNewVMExpertPage::UIWizardNewVMExpertPage()
    4444    : m_pToolBox(0)
     45    , m_pDiskFormatVariantGroupBox(0)
    4546    , m_pDiskVariantWidget(0)
    4647    , m_pFormatComboBox(0)
     
    210211    if (m_pNameAndSystemLayout && m_pNameAndSystemEditor)
    211212        m_pNameAndSystemLayout->setColumnMinimumWidth(0, m_pNameAndSystemEditor->firstColumnWidth());
     213
     214    if (m_pDiskFormatVariantGroupBox)
     215        m_pDiskFormatVariantGroupBox->setTitle(UIWizardNewVM::tr("Hard Disk File &Type and Variant"));
    212216}
    213217
     
    448452    m_pSizeAndLocationGroup = new UIMediumSizeAndPathGroupBox(true, 0 /* parent */, _4M /* minimum size */);
    449453    pDiskContainerLayout->addWidget(m_pSizeAndLocationGroup, 0, 0, 2, 2);
     454
     455    m_pDiskFormatVariantGroupBox = new QGroupBox;
     456    QHBoxLayout *pDiskFormatVariantLayout = new QHBoxLayout(m_pDiskFormatVariantGroupBox);
     457
    450458    m_pFormatComboBox = new UIDiskFormatsComboBox(true, KDeviceType_HardDisk, 0);
    451     pDiskContainerLayout->addWidget(m_pFormatComboBox, 2, 0, 1, 1);
     459    pDiskFormatVariantLayout->addWidget(m_pFormatComboBox, 0 /* stretch */, Qt::AlignTop);
     460
    452461    m_pDiskVariantWidget  = new UIDiskVariantWidget(0);
    453     pDiskContainerLayout->addWidget(m_pDiskVariantWidget, 2, 1, 2, 1);
     462    pDiskFormatVariantLayout->addWidget(m_pDiskVariantWidget);
     463
     464    pDiskContainerLayout->addWidget(m_pDiskFormatVariantGroupBox, 2, 0, 2, 2);
    454465    return pNewDiskContainerWidget;
    455466}
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMExpertPage.h

    r91272 r91277  
    3232class QCheckBox;
    3333class QGridLayout;
     34class QGroupBox;
    3435class QRadioButton;
    3536class QIToolButton;
     
    126127      * @{ */
    127128        UIToolBox  *m_pToolBox;
     129        QGroupBox *m_pDiskFormatVariantGroupBox;
    128130        UIDiskVariantWidget *m_pDiskVariantWidget;
    129131        UIDiskFormatsComboBox *m_pFormatComboBox;
Note: See TracChangeset for help on using the changeset viewer.

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