VirtualBox

Changeset 90159 in vbox for trunk/src


Ignore:
Timestamp:
Jul 12, 2021 5:27:15 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
145662
Message:

FE/Qt: bugref:9996: Initial work on the expert mode. No functionality etc yet.

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

Legend:

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

    r90157 r90159  
    9797    if (m_pDomainNameLabel)
    9898    {
    99         m_pDomainNameLabel->setText(tr("&Domain"));
     99        m_pDomainNameLabel->setText(tr("&Domain Name"));
    100100        m_pDomainNameLabel->setToolTip(strDomainTooltip);
    101101    }
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageFileType.cpp

    r88599 r90159  
    124124        }
    125125    }
    126 
    127 
    128 
    129126    return pContainerWidget;
    130127}
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp

    r90157 r90159  
    8484    switch (mode())
    8585    {
    86         case WizardMode_Expert:
    8786        case WizardMode_Basic:
    8887        {
     
    9493            break;
    9594        }
    96         // case WizardMode_Expert:
    97         // {
    98         //     // addPage(new UIWizardNewCloudVMPageExpert(m_fFullWizard));
    99         //     break;
    100         // }
     95        case WizardMode_Expert:
     96        {
     97            addPage(new UIWizardNewVMPageExpert());
     98            break;
     99        }
    101100        default:
    102101        {
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp

    r90074 r90159  
    3232#include "UIBaseMemoryEditor.h"
    3333#include "UIConverter.h"
     34#include "UIHostnameDomainNameEditor.h"
    3435#include "UIFilePathSelector.h"
    3536#include "UIIconPool.h"
     
    4748#include "CSystemProperties.h"
    4849
    49 UIWizardNewVMPageExpert::UIWizardNewVMPageExpert(const QString &strGroup)
    50     : //UIWizardNewVMPageBaseNameOSType(strGroup)
    51      m_pToolBox(0)
     50UIWizardNewVMPageExpert::UIWizardNewVMPageExpert()
     51    : m_pToolBox(0)
    5252    , m_pDiskFormatGroupBox(0)
    5353    , m_pDiskVariantGroupBox(0)
    5454    , m_pLocationLabel(0)
    55 {
    56     Q_UNUSED(strGroup);
     55    , m_pLocationEditor(0)
     56    , m_pLocationOpenButton(0)
     57    , m_pMediumSizeEditorLabel(0)
     58    , m_pMediumSizeEditor(0)
     59    , m_pFormatButtonGroup(0)
     60    , m_pFixedCheckBox(0)
     61    , m_pSplitBox(0)
     62    , m_pNameAndSystemEditor(0)
     63    , m_pSkipUnattendedCheckBox(0)
     64    , m_pNameAndSystemLayout(0)
     65    , m_pAdditionalOptionsContainer(0)
     66    , m_pProductKeyLabel(0)
     67    , m_pProductKeyLineEdit(0)
     68    , m_pHostnameDomainNameEditor(0)
     69    , m_pStartHeadlessCheckBox(0)
     70    , m_pGAInstallationISOContainer(0)
     71    , m_pGAISOPathLabel(0)
     72    , m_pGAISOFilePathSelector(0)
     73    , m_pUserNameContainer(0)
     74{
    5775    /* Create widgets: */
    5876    QVBoxLayout *pMainLayout = new QVBoxLayout(this);
    5977    {
    6078        m_pToolBox = new UIToolBox;
    61         // m_pToolBox->insertPage(ExpertToolboxItems_NameAndOSType, createNameOSTypeWidgets(), "");
    62         // m_pToolBox->insertPage(ExpertToolboxItems_Unattended, createUnattendedWidgets(), "", false);
     79        m_pToolBox->insertPage(ExpertToolboxItems_NameAndOSType, createNameOSTypeWidgets(), "");
     80        m_pToolBox->insertPage(ExpertToolboxItems_Unattended, createUnattendedWidgets(), "");
    6381        // m_pToolBox->insertPage(ExpertToolboxItems_Hardware, createHardwareWidgets(), "");
    6482        // m_pToolBox->insertPage(ExpertToolboxItems_Disk, createDiskWidgets(), "");
     
    99117//     registerField("selectedDiskSource", this, "selectedDiskSource");
    100118//     registerField("mediumVariant", this, "mediumVariant");
     119
    101120}
    102121
     
    157176void UIWizardNewVMPageExpert::retranslateUi()
    158177{
    159     // UIWizardNewVMPageBaseNameOSType::retranslateWidgets();
    160     // UIWizardNewVMPageBaseUnattended::retranslateWidgets();
    161     // UIWizardNewVMPageHardwareBase::retranslateWidgets();
    162     // UIWizardNewVMPageDiskBase::retranslateWidgets();
    163     // UIWizardNewVDPageBaseFileType::retranslateWidgets();
    164     // UIWizardNewVDPageBaseVariant::retranslateWidgets();
    165     // UIWizardNewVDPageBaseSizeLocation::retranslateWidgets();
    166 
    167     // if (m_pToolBox)
    168     // {
    169     //     m_pToolBox->setPageTitle(ExpertToolboxItems_NameAndOSType, QString(UIWizardNewVM::tr("Name and &Operating System")));
    170     //     m_pToolBox->setPageTitle(ExpertToolboxItems_Unattended, UIWizardNewVM::tr("&Unattended Install"));
    171     //     m_pToolBox->setPageTitle(ExpertToolboxItems_Disk, UIWizardNewVM::tr("Hard Dis&k"));
    172     //     m_pToolBox->setPageTitle(ExpertToolboxItems_Hardware, UIWizardNewVM::tr("H&ardware"));
    173     // }
     178    if (m_pSkipUnattendedCheckBox)
     179    {
     180        m_pSkipUnattendedCheckBox->setText(UIWizardNewVM::tr("&Skip Unattended Installation"));
     181        m_pSkipUnattendedCheckBox->setToolTip(UIWizardNewVM::tr("<p>When checked selected ISO file will be mounted to the CD "
     182                                                                "drive of the virtual machine but the unattended installation "
     183                                                                "will not start.</p>"));
     184    }
     185
     186    if (m_pStartHeadlessCheckBox)
     187    {
     188        m_pStartHeadlessCheckBox->setText(UIWizardNewVM::tr("&Install in Background"));
     189        m_pStartHeadlessCheckBox->setToolTip(UIWizardNewVM::tr("<p>When checked, the newly created virtual machine will be started "
     190                                                               "in headless mode (without a GUI) for the unattended guest OS install.</p>"));
     191    }
     192
     193    if (m_pProductKeyLabel)
     194        m_pProductKeyLabel->setText(UIWizardNewVM::tr("&Product Key:"));
     195
     196    if (m_pGAISOPathLabel)
     197        m_pGAISOPathLabel->setText(UIWizardNewVM::tr("GA I&nstallation ISO:"));
     198    if (m_pGAISOFilePathSelector)
     199        m_pGAISOFilePathSelector->setToolTip(UIWizardNewVM::tr("Please select an installation medium (ISO file)"));
     200    if (m_pGAInstallationISOContainer)
     201    {
     202        m_pGAInstallationISOContainer->setTitle(UIWizardNewVM::tr("Gu&est Additions"));
     203        m_pGAInstallationISOContainer->setToolTip(UIWizardNewVM::tr("<p>When checked the guest additions will be installed "
     204                                                                    "after the OS install.</p>"));
     205    }
     206
     207    if (m_pToolBox)
     208    {
     209        m_pToolBox->setPageTitle(ExpertToolboxItems_NameAndOSType, QString(UIWizardNewVM::tr("Name and &Operating System")));
     210        m_pToolBox->setPageTitle(ExpertToolboxItems_Unattended, UIWizardNewVM::tr("&Unattended Install"));
     211        m_pToolBox->setPageTitle(ExpertToolboxItems_Disk, UIWizardNewVM::tr("Hard Dis&k"));
     212        m_pToolBox->setPageTitle(ExpertToolboxItems_Hardware, UIWizardNewVM::tr("H&ardware"));
     213    }
    174214
    175215    // if (m_pDiskFormatGroupBox)
     
    190230    //     m_pLocationLabel->setText(UIWizardNewVM::tr("Disk &Location:"));
    191231
    192     // if (m_pNameAndSystemLayout && m_pNameAndSystemEditor)
    193     //     m_pNameAndSystemLayout->setColumnMinimumWidth(0, m_pNameAndSystemEditor->firstColumnWidth());
     232    if (m_pNameAndSystemLayout && m_pNameAndSystemEditor)
     233        m_pNameAndSystemLayout->setColumnMinimumWidth(0, m_pNameAndSystemEditor->firstColumnWidth());
    194234}
    195235
     
    337377    // updateWidgetAterMediumFormatChange();
    338378    // setSkipCheckBoxEnable();
    339     // retranslateUi();
     379    retranslateUi();
    340380}
    341381
     
    354394{
    355395    QWidget *pContainerWidget = new QWidget;
    356     // QGridLayout *pLayout = new QGridLayout(pContainerWidget);
    357     // pLayout->setContentsMargins(0, 0, 0, 0);
    358     // int iRow = 0;
    359 
    360     // /* Username selector: */
    361     // pLayout->addWidget(createUserNameWidgets(), iRow, 0, 1, 2);
    362 
    363     // /* Additional options: */
    364     // pLayout->addWidget(createAdditionalOptionsWidgets(), iRow, 2, 1, 2);
    365 
    366     // ++iRow;
    367     // /* Guest additions installation: */
    368     // pLayout->addWidget(createGAInstallWidgets(), iRow, 0, 1, 4);
     396    QGridLayout *pLayout = new QGridLayout(pContainerWidget);
     397    pLayout->setContentsMargins(0, 0, 0, 0);
     398    int iRow = 0;
     399
     400    /* Username selector: */
     401    pLayout->addWidget(createUserNameWidgets(), iRow, 0, 1, 2);
     402
     403    /* Additional options: */
     404    pLayout->addWidget(createAdditionalOptionsWidgets(), iRow, 2, 1, 2);
     405
     406    ++iRow;
     407    /* Guest additions installation: */
     408    pLayout->addWidget(createGAInstallWidgets(), iRow, 0, 1, 4);
    369409
    370410    return pContainerWidget;
     
    405445    m_pDiskVariantGroupBox  = new QGroupBox;
    406446    QVBoxLayout *pDiskVariantLayout = new QVBoxLayout(m_pDiskVariantGroupBox);
    407     pDiskVariantLayout->addWidget(createMediumVariantWidgets(false /* fWithLabels */));
     447    pDiskVariantLayout->addWidget(createMediumVariantWidgets());
    408448
    409449    pDiskContainerLayout->addWidget(m_pLocationLabel, 0, 0, 1, 1);
     
    570610    if (!pSenderWidget)
    571611        return;
    572     m_userSetWidgets << pSenderWidget;
     612
    573613}
    574614
     
    588628    if (!m_pMediumSizeEditor)
    589629        return;
    590     m_userSetWidgets << m_pMediumSizeEditor;
     630
    591631    completeChanged();
    592632}
     
    622662void UIWizardNewVMPageExpert::sltSelectLocationButtonClicked()
    623663{
    624     onSelectLocationButtonClicked();
     664    //onSelectLocationButtonClicked();
    625665}
    626666
     
    643683void UIWizardNewVMPageExpert::updateWidgetAterMediumFormatChange()
    644684{
    645     CMediumFormat comMediumFormat = mediumFormat();
    646     if (comMediumFormat.isNull())
    647     {
    648         AssertMsgFailed(("No medium format set!"));
    649         return;
    650     }
    651     updateMediumVariantWidgetsAfterFormatChange(comMediumFormat);
    652     updateLocationEditorAfterFormatChange(comMediumFormat, m_formatExtensions);
     685    // CMediumFormat comMediumFormat = mediumFormat();
     686    // if (comMediumFormat.isNull())
     687    // {
     688    //     AssertMsgFailed(("No medium format set!"));
     689    //     return;
     690    // }
     691    // updateMediumVariantWidgetsAfterFormatChange(comMediumFormat);
     692    // updateLocationEditorAfterFormatChange(comMediumFormat, m_formatExtensions);
    653693}
    654694
     
    678718    // pWizard->setVirtualDisk(m_pDiskSelector->id());
    679719}
     720
     721void UIWizardNewVMPageExpert::addFormatButton(QWidget *pParent, QVBoxLayout *pFormatLayout, CMediumFormat medFormat, bool fPreferred /* = false */)
     722{
     723    Q_UNUSED(pParent);
     724    Q_UNUSED(pFormatLayout);
     725    Q_UNUSED(medFormat);
     726    Q_UNUSED(fPreferred);
     727
     728    // /* Check that medium format supports creation: */
     729    // ULONG uFormatCapabilities = 0;
     730    // QVector<KMediumFormatCapabilities> capabilities;
     731    // capabilities = medFormat.GetCapabilities();
     732    // for (int i = 0; i < capabilities.size(); i++)
     733    //     uFormatCapabilities |= capabilities[i];
     734
     735    // if (!(uFormatCapabilities & KMediumFormatCapabilities_CreateFixed ||
     736    //       uFormatCapabilities & KMediumFormatCapabilities_CreateDynamic))
     737    //     return;
     738
     739    // /* Check that medium format supports creation of virtual hard-disks: */
     740    // QVector<QString> fileExtensions;
     741    // QVector<KDeviceType> deviceTypes;
     742    // medFormat.DescribeFileExtensions(fileExtensions, deviceTypes);
     743    // if (!deviceTypes.contains(KDeviceType_HardDisk))
     744    //     return;
     745
     746    // /* Create/add corresponding radio-button: */
     747    // QRadioButton *pFormatButton = new QRadioButton(pParent);
     748    // AssertPtrReturnVoid(pFormatButton);
     749    // {
     750    //     /* Make the preferred button font bold: */
     751    //     if (fPreferred)
     752    //     {
     753    //         QFont font = pFormatButton->font();
     754    //         font.setBold(true);
     755    //         pFormatButton->setFont(font);
     756    //     }
     757    //     pFormatLayout->addWidget(pFormatButton);
     758    //     m_formats << medFormat;
     759    //     m_formatNames << medFormat.GetName();
     760    //     m_pFormatButtonGroup->addButton(pFormatButton, m_formatNames.size() - 1);
     761    //     m_formatExtensions << UIWizardNewVDPageBaseSizeLocation::defaultExtension(medFormat);
     762    // }
     763}
     764
     765QWidget *UIWizardNewVMPageExpert::createFormatButtonGroup(bool fExpertMode)
     766{
     767    Q_UNUSED(fExpertMode);
     768    QWidget *pContainerWidget = new QWidget;
     769    QVBoxLayout *pContainerLayout = new QVBoxLayout(pContainerWidget);
     770    pContainerLayout->setContentsMargins(0, 0, 0, 0);
     771
     772    m_pFormatButtonGroup = new QButtonGroup;
     773    if (m_pFormatButtonGroup)
     774    {
     775        /* Enumerate medium formats in special order: */
     776        CSystemProperties properties = uiCommon().virtualBox().GetSystemProperties();
     777        const QVector<CMediumFormat> &formats = properties.GetMediumFormats();
     778        QMap<QString, CMediumFormat> vdi, preferred, others;
     779        foreach (const CMediumFormat &format, formats)
     780        {
     781            /* VDI goes first: */
     782            if (format.GetName() == "VDI")
     783                vdi[format.GetId()] = format;
     784            else
     785            {
     786                const QVector<KMediumFormatCapabilities> &capabilities = format.GetCapabilities();
     787                /* Then goes preferred: */
     788                if (capabilities.contains(KMediumFormatCapabilities_Preferred))
     789                    preferred[format.GetId()] = format;
     790                /* Then others: */
     791                else
     792                    others[format.GetId()] = format;
     793            }
     794        }
     795
     796    //     /* Create buttons for VDI, preferred and others: */
     797    //     foreach (const QString &strId, vdi.keys())
     798    //         addFormatButton(pContainerWidget, pContainerLayout, vdi.value(strId), true);
     799    //     foreach (const QString &strId, preferred.keys())
     800    //         addFormatButton(pContainerWidget, pContainerLayout, preferred.value(strId), true);
     801    //     if (fExpertMode)
     802    //     {
     803    //         foreach (const QString &strId, others.keys())
     804    //             addFormatButton(pContainerWidget, pContainerLayout, others.value(strId));
     805    //     }
     806
     807    //     if (!m_pFormatButtonGroup->buttons().isEmpty())
     808    //     {
     809    //         m_pFormatButtonGroup->button(0)->click();
     810    //         m_pFormatButtonGroup->button(0)->setFocus();
     811    //     }
     812    }
     813    return pContainerWidget;
     814}
     815
     816QWidget *UIWizardNewVMPageExpert::createMediumVariantWidgets()
     817{
     818    QWidget *pContainerWidget = new QWidget;
     819    QVBoxLayout *pMainLayout = new QVBoxLayout(pContainerWidget);
     820    if (pMainLayout)
     821    {
     822        QVBoxLayout *pVariantLayout = new QVBoxLayout;
     823        if (pVariantLayout)
     824        {
     825            m_pFixedCheckBox = new QCheckBox;
     826            m_pSplitBox = new QCheckBox;
     827            pVariantLayout->addWidget(m_pFixedCheckBox);
     828            pVariantLayout->addWidget(m_pSplitBox);
     829        }
     830        pMainLayout->addLayout(pVariantLayout);
     831        pMainLayout->addStretch();
     832        pMainLayout->setContentsMargins(0, 0, 0, 0);
     833    }
     834    return pContainerWidget;
     835}
     836
     837QWidget *UIWizardNewVMPageExpert::createNameOSTypeWidgets()
     838{
     839    QWidget *pContainerWidget = new QWidget;
     840    AssertReturn(pContainerWidget, 0);
     841    m_pNameAndSystemLayout = new QGridLayout(pContainerWidget);
     842    AssertReturn(m_pNameAndSystemLayout, 0);
     843    m_pNameAndSystemLayout->setContentsMargins(0, 0, 0, 0);
     844    m_pNameAndSystemEditor = new UINameAndSystemEditor(0,
     845                                                       true /* fChooseName? */,
     846                                                       true /* fChoosePath? */,
     847                                                       true /* fChooseImage? */,
     848                                                       true /* fChooseType? */);
     849    if (m_pNameAndSystemEditor)
     850        m_pNameAndSystemLayout->addWidget(m_pNameAndSystemEditor, 0, 0, 1, 2);
     851    m_pSkipUnattendedCheckBox = new QCheckBox;
     852    if (m_pSkipUnattendedCheckBox)
     853        m_pNameAndSystemLayout->addWidget(m_pSkipUnattendedCheckBox, 1, 1);
     854    return pContainerWidget;
     855}
     856
     857QWidget *UIWizardNewVMPageExpert::createUserNameWidgets()
     858{
     859    if (m_pUserNameContainer)
     860        return m_pUserNameContainer;
     861
     862    m_pUserNameContainer = new QGroupBox;
     863    QVBoxLayout *pUserNameContainerLayout = new QVBoxLayout(m_pUserNameContainer);
     864    m_pUserNamePasswordEditor = new UIUserNamePasswordEditor;
     865    AssertReturn(m_pUserNamePasswordEditor, 0);
     866
     867    m_pUserNamePasswordEditor->setLabelsVisible(true);
     868    m_pUserNamePasswordEditor->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
     869    pUserNameContainerLayout->addWidget(m_pUserNamePasswordEditor);
     870
     871    return m_pUserNameContainer;
     872}
     873
     874QWidget *UIWizardNewVMPageExpert::createAdditionalOptionsWidgets()
     875{
     876    if (m_pAdditionalOptionsContainer)
     877        return m_pAdditionalOptionsContainer;
     878
     879    m_pAdditionalOptionsContainer = new QGroupBox;
     880    QGridLayout *pAdditionalOptionsContainerLayout = new QGridLayout(m_pAdditionalOptionsContainer);
     881    pAdditionalOptionsContainerLayout->setColumnStretch(0, 0);
     882    pAdditionalOptionsContainerLayout->setColumnStretch(1, 1);
     883
     884    m_pProductKeyLabel = new QLabel;
     885    if (m_pProductKeyLabel)
     886    {
     887        m_pProductKeyLabel->setAlignment(Qt::AlignRight);
     888        m_pProductKeyLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
     889        pAdditionalOptionsContainerLayout->addWidget(m_pProductKeyLabel, 0, 0);
     890    }
     891    m_pProductKeyLineEdit = new QLineEdit;
     892    if (m_pProductKeyLineEdit)
     893    {
     894        m_pProductKeyLineEdit->setInputMask(">NNNNN-NNNNN-NNNNN-NNNNN-NNNNN;#");
     895        if (m_pProductKeyLabel)
     896            m_pProductKeyLabel->setBuddy(m_pProductKeyLineEdit);
     897        pAdditionalOptionsContainerLayout->addWidget(m_pProductKeyLineEdit, 0, 1, 1, 2);
     898    }
     899
     900    m_pHostnameDomainNameEditor = new UIHostnameDomainNameEditor;
     901    if (m_pHostnameDomainNameEditor)
     902        pAdditionalOptionsContainerLayout->addWidget(m_pHostnameDomainNameEditor, 1, 0, 2, 3);
     903
     904    m_pStartHeadlessCheckBox = new QCheckBox;
     905    if (m_pStartHeadlessCheckBox)
     906        pAdditionalOptionsContainerLayout->addWidget(m_pStartHeadlessCheckBox, 3, 1);
     907
     908    return m_pAdditionalOptionsContainer;
     909}
     910
     911QWidget *UIWizardNewVMPageExpert::createGAInstallWidgets()
     912{
     913    if (m_pGAInstallationISOContainer)
     914        return m_pGAInstallationISOContainer;
     915
     916    m_pGAInstallationISOContainer = new QGroupBox;
     917    if (m_pGAInstallationISOContainer)
     918    {
     919        m_pGAInstallationISOContainer->setCheckable(true);
     920
     921        QHBoxLayout *pGAInstallationISOLayout = new QHBoxLayout(m_pGAInstallationISOContainer);
     922        if (pGAInstallationISOLayout)
     923        {
     924            m_pGAISOPathLabel = new QLabel;
     925            if (m_pGAISOPathLabel)
     926            {
     927                m_pGAISOPathLabel->setAlignment(Qt::AlignRight);
     928                m_pGAISOPathLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
     929
     930                pGAInstallationISOLayout->addWidget(m_pGAISOPathLabel);
     931            }
     932            m_pGAISOFilePathSelector = new UIFilePathSelector;
     933            {
     934                m_pGAISOFilePathSelector->setResetEnabled(false);
     935                m_pGAISOFilePathSelector->setMode(UIFilePathSelector::Mode_File_Open);
     936                m_pGAISOFilePathSelector->setFileDialogFilters("ISO Images(*.iso *.ISO)");
     937                m_pGAISOFilePathSelector->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
     938                m_pGAISOFilePathSelector->setInitialPath(uiCommon().defaultFolderPathForType(UIMediumDeviceType_DVD));
     939                if (m_pGAISOPathLabel)
     940                    m_pGAISOPathLabel->setBuddy(m_pGAISOFilePathSelector);
     941
     942                pGAInstallationISOLayout->addWidget(m_pGAISOFilePathSelector);
     943            }
     944        }
     945    }
     946
     947    return m_pGAInstallationISOContainer;
     948}
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.h

    r90003 r90159  
    2525#include <QSet>
    2626
    27 /* Local includes: */
    28 #include "UIWizardNewVMNameOSTypePageBasic.h"
    29 #include "UIWizardNewVMUnattendedPageBasic.h"
    30 #include "UIWizardNewVMHardwarePageBasic.h"
    31 #include "UIWizardNewVMDiskPageBasic.h"
    32 #include "UIWizardNewVDPageSizeLocation.h"
     27#include "UINativeWizardPage.h"
     28
     29#include "COMEnums.h"
     30#include "CMediumFormat.h"
    3331
    3432/* Forward declarations: */
     33class QButtonGroup;
     34class QCheckBox;
     35class QGridLayout;
    3536class QGroupBox;
     37class QLabel;
     38class QLineEdit;
     39class QVBoxLayout;
     40class UIFilePathSelector;
     41class UIHostnameDomainNameEditor;
     42class UIMediumSizeEditor;
     43class UINameAndSystemEditor;
    3644class UIToolBox;
     45class UIUserNamePasswordEditor;
     46class QIToolButton;
    3747
    3848/** Expert page of the New Virtual Machine wizard. */
    39 class UIWizardNewVMPageExpert : public UIWizardPage,
    40                                 public UIWizardNewVDPageBaseFileType,
    41                                 public UIWizardNewVDPageBaseVariant,
    42                                 public UIWizardNewVDPageBaseSizeLocation
     49class UIWizardNewVMPageExpert : public UINativeWizardPage
    4350{
    4451
     
    4754public:
    4855
    49     /** Constructor. */
    50     UIWizardNewVMPageExpert(const QString &strGroup);
     56    UIWizardNewVMPageExpert();
    5157
    5258protected:
     
    103109    QWidget *createUnattendedWidgets();
    104110    virtual QWidget *createNewDiskWidgets() /* override */;
     111    QWidget *createFormatButtonGroup(bool fExpertMode);
     112    QWidget *createMediumVariantWidgets();
     113    void addFormatButton(QWidget *pParent, QVBoxLayout *pFormatLayout,
     114                                                  CMediumFormat medFormat, bool fPreferred /* = false */);
     115    QWidget *createNameOSTypeWidgets();
     116    QWidget *createUserNameWidgets();
     117    QWidget *createAdditionalOptionsWidgets();
     118    QWidget *createGAInstallWidgets();
     119
    105120    void updateVirtualDiskPathFromMachinePathName();
    106121    void updateWidgetAterMediumFormatChange();
    107122    void setEnableNewDiskWidgets(bool fEnable);
    108123    void setVirtualDiskFromDiskCombo();
     124
     125
    109126
    110127    /** @name Variables
     
    114131       QGroupBox *m_pDiskVariantGroupBox;
    115132       QLabel *m_pLocationLabel;
    116        /** Set of widgets which user explicitly modified their values. They are exempt from
    117          * adjusting when OS type changes. */
    118        QSet<QObject*> m_userSetWidgets;
     133       QLineEdit *m_pLocationEditor;
     134       QIToolButton *m_pLocationOpenButton;
     135       QLabel *m_pMediumSizeEditorLabel;
     136       UIMediumSizeEditor *m_pMediumSizeEditor;
     137       QButtonGroup *m_pFormatButtonGroup;
     138       QCheckBox *m_pFixedCheckBox;
     139       QCheckBox *m_pSplitBox;
     140       UINameAndSystemEditor *m_pNameAndSystemEditor;
     141       QCheckBox *m_pSkipUnattendedCheckBox;
     142       QGridLayout *m_pNameAndSystemLayout;
     143       QGroupBox *m_pAdditionalOptionsContainer;
     144       QLabel *m_pProductKeyLabel;
     145       QLineEdit *m_pProductKeyLineEdit;
     146       UIHostnameDomainNameEditor *m_pHostnameDomainNameEditor;
     147
     148
     149    QCheckBox *m_pStartHeadlessCheckBox;
     150    QGroupBox *m_pGAInstallationISOContainer;
     151    QLabel *m_pGAISOPathLabel;
     152    UIFilePathSelector *m_pGAISOFilePathSelector;
     153    QGroupBox *m_pUserNameContainer;
     154    UIUserNamePasswordEditor *m_pUserNamePasswordEditor;
     155
    119156    /** @} */
    120157};
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