VirtualBox

Ignore:
Timestamp:
Mar 4, 2021 5:56:15 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9950. More fix on the expert mode page

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

Legend:

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

    r87955 r87956  
    119119}
    120120
    121 QWidget *UIWizardNewVMPage4::createDiskVariantAndSizeWidgets()
     121QWidget *UIWizardNewVMPage4::createNewDiskWidgets()
    122122{
    123123    return new QWidget();
     
    150150    }
    151151    pDiskLayout->addWidget(m_pDiskNew, 0, 0, 1, 6);
    152     pDiskLayout->addWidget(createDiskVariantAndSizeWidgets(), 1, 2, 3, 4);
     152    pDiskLayout->addWidget(createNewDiskWidgets(), 1, 2, 3, 4);
    153153    pDiskLayout->addWidget(m_pDiskExisting, 4, 0, 1, 6);
    154154    pDiskLayout->addWidget(m_pDiskSelector, 5, 2, 1, 3);
     
    220220}
    221221
    222 QWidget *UIWizardNewVMPageBasic4::createDiskVariantAndSizeWidgets()
     222QWidget *UIWizardNewVMPageBasic4::createNewDiskWidgets()
    223223{
    224224    QWidget *pWidget = new QWidget;
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic4.h

    r87946 r87956  
    6161
    6262    virtual QWidget *createDiskWidgets();
    63     virtual QWidget *createDiskVariantAndSizeWidgets();
     63    virtual QWidget *createNewDiskWidgets();
    6464    void getWithFileOpenDialog();
    6565    void retranslateWidgets();
     
    128128    void prepare();
    129129    void createConnections();
    130     QWidget *createDiskVariantAndSizeWidgets();
     130    QWidget *createNewDiskWidgets();
    131131    void retranslateUi();
    132132    void initializePage();
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp

    r87954 r87956  
    1717
    1818/* Qt includes: */
     19#include <QButtonGroup>
    1920#include <QCheckBox>
    2021#include <QGridLayout>
     
    3132#include "QIToolButton.h"
    3233#include "UIBaseMemoryEditor.h"
     34#include "UIConverter.h"
    3335#include "UIFilePathSelector.h"
    3436#include "UIIconPool.h"
     
    4749    , m_pToolBox(0)
    4850    , m_pInstallationISOContainer(0)
     51    , m_pDiskFormatGroupBox(0)
     52    , m_pDiskVariantGroupBox(0)
     53    , m_pDiskLocationGroupBox(0)
     54    , m_pDiskSizeGroupBox(0)
     55
    4956{
    5057    /* Create widgets: */
     
    173180        m_pToolBox->setPageTitle(ExpertToolboxItems_Hardware, UIWizardNewVM::tr("Hardware"));
    174181    }
     182
     183
     184    if (m_pDiskLocationGroupBox)
     185        m_pDiskLocationGroupBox->setTitle(UIWizardNewVM::tr("Hard disk file &location"));
     186    if (m_pDiskSizeGroupBox)
     187        m_pDiskSizeGroupBox->setTitle(UIWizardNewVM::tr("Hard disk file &size"));
     188    if (m_pDiskFormatGroupBox)
     189        m_pDiskFormatGroupBox->setTitle(UIWizardNewVM::tr("Hard disk file &type"));
     190    if (m_pFormatButtonGroup)
     191    {
     192        QList<QAbstractButton*> buttons = m_pFormatButtonGroup->buttons();
     193        for (int i = 0; i < buttons.size(); ++i)
     194        {
     195            QAbstractButton *pButton = buttons[i];
     196            UIMediumFormat enmFormat = gpConverter->fromInternalString<UIMediumFormat>(m_formatNames[m_pFormatButtonGroup->id(pButton)]);
     197            pButton->setText(gpConverter->toString(enmFormat));
     198        }
     199    }
     200    if (m_pDiskVariantGroupBox)
     201        m_pDiskVariantGroupBox->setTitle(UIWizardNewVM::tr("Storage on physical hard disk"));
     202
    175203}
    176204
     
    359387}
    360388
    361 QWidget *UIWizardNewVMPageExpert::createDiskWidgets()
    362 {
    363     QWidget *pDiskContainerWidget = new QWidget;
    364     QGridLayout *pDiskContainerLayout = new QGridLayout(pDiskContainerWidget);
     389QWidget *UIWizardNewVMPageExpert::createNewDiskWidgets()
     390{
     391    QWidget *pNewDiskContainerWidget = new QWidget;
     392    QGridLayout *pDiskContainerLayout = new QGridLayout(pNewDiskContainerWidget);
    365393
    366394    /* Disk location widgets: */
    367     QGroupBox *pLocationGroupBox = new QGroupBox;
    368     QHBoxLayout *pLocationLayout = new QHBoxLayout(pLocationGroupBox);
     395    m_pDiskLocationGroupBox = new QGroupBox;
     396    QHBoxLayout *pLocationLayout = new QHBoxLayout(m_pDiskLocationGroupBox);
    369397    m_pLocationEditor = new QLineEdit;
    370398    m_pLocationOpenButton = new QIToolButton;
     
    378406
    379407    /* Disk file size widgets: */
    380     QGroupBox *pDiskSizeGroupBox = new QGroupBox;
    381     QHBoxLayout *pDiskSizeLayout = new QHBoxLayout(pDiskSizeGroupBox);
     408    m_pDiskSizeGroupBox = new QGroupBox;
     409    QHBoxLayout *pDiskSizeLayout = new QHBoxLayout(m_pDiskSizeGroupBox);
    382410    m_pSizeEditor = new UIMediumSizeEditor;
    383411    pDiskSizeLayout->addWidget(m_pSizeEditor);
    384412
    385413    /* Disk file format widgets: */
    386     QGroupBox *pDiskFormatGroupBox = new QGroupBox;
    387     QHBoxLayout *pDiskFormatLayout = new QHBoxLayout(pDiskFormatGroupBox);
     414    m_pDiskFormatGroupBox = new QGroupBox;
     415    QHBoxLayout *pDiskFormatLayout = new QHBoxLayout(m_pDiskFormatGroupBox);
    388416    m_pSizeEditor = new UIMediumSizeEditor;
    389417    pDiskFormatLayout->addWidget(createFormatButtonGroup(true));
    390418
    391419    /* Disk variant and dik split widgets: */
    392     QGroupBox *pDiskVariantGroupBox = new QGroupBox;
    393     QVBoxLayout *pDiskVariantLayout = new QVBoxLayout(pDiskVariantGroupBox);
     420    m_pDiskVariantGroupBox = new QGroupBox;
     421    QVBoxLayout *pDiskVariantLayout = new QVBoxLayout(m_pDiskVariantGroupBox);
    394422    pDiskVariantLayout->addWidget(createMediumVariantWidgets(false /* fWithLabels */));
    395423
    396     pDiskContainerLayout->addWidget(pLocationGroupBox, 0, 0, 1, 2);
    397     pDiskContainerLayout->addWidget(pDiskSizeGroupBox, 1, 0, 1, 2);
    398     pDiskContainerLayout->addWidget(pDiskFormatGroupBox, 2, 0, 1, 1);
    399     pDiskContainerLayout->addWidget(pDiskVariantGroupBox, 2, 1, 1, 1);
    400 
    401     return pDiskContainerWidget;
     424    pDiskContainerLayout->addWidget(m_pDiskLocationGroupBox, 0, 0, 1, 2);
     425    pDiskContainerLayout->addWidget(m_pDiskSizeGroupBox, 1, 0, 1, 2);
     426    pDiskContainerLayout->addWidget(m_pDiskFormatGroupBox, 2, 0, 1, 1);
     427    pDiskContainerLayout->addWidget(m_pDiskVariantGroupBox, 2, 1, 1, 1);
     428
     429    return pNewDiskContainerWidget;
    402430}
    403431
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.h

    r87951 r87956  
    127127    void markWidgets() const;
    128128    QWidget *createUnattendedWidgets();
    129     virtual QWidget *createDiskWidgets() /* override */;
     129    virtual QWidget *createNewDiskWidgets() /* override */;
    130130
    131131    UIToolBox  *m_pToolBox;
    132132    QGroupBox *m_pInstallationISOContainer;
     133
     134    QGroupBox *m_pDiskFormatGroupBox;
     135    QGroupBox *m_pDiskVariantGroupBox;
     136    QGroupBox *m_pDiskLocationGroupBox;
     137    QGroupBox *m_pDiskSizeGroupBox;
     138
    133139
    134140    /** Set of widgets which user explicitly modified their values. They are exempt from
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