VirtualBox

Changeset 105542 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Jul 30, 2024 12:43:20 PM (6 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10736. Integrating KDeviceType member to New VD wizard. It will be needed in VD cloning case since we clone floppy disks over the wizard as well.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.cpp

    r105539 r105542  
    5151    , m_uDefaultSize(uDefaultSize)
    5252    , m_iMediumVariantPageIndex(-1)
     53    , m_enmDeviceType(KDeviceType_HardDisk)
    5354{
    5455#ifndef VBOX_WS_MAC
     
    129130        case WizardMode_Basic:
    130131        {
    131             addPage(new UIWizardNewVDFileTypePage);
     132            addPage(new UIWizardNewVDFileTypePage(m_enmDeviceType));
    132133            m_iMediumVariantPageIndex = addPage(new UIWizardNewVDVariantPage);
    133134            addPage(new UIWizardNewVDSizeLocationPage(diskMinimumSize()));
     
    136137        case WizardMode_Expert:
    137138        {
    138             addPage(new UIWizardNewVDExpertPage(diskMinimumSize()));
     139            addPage(new UIWizardNewVDExpertPage(diskMinimumSize(), m_enmDeviceType));
    139140            break;
    140141        }
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.h

    r105539 r105542  
    110110    /** Holds the source virtual disk wrapper. */
    111111    CMedium m_comSourceVirtualDisk;
     112    KDeviceType m_enmDeviceType;
    112113};
    113114
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDExpertPage.cpp

    r105539 r105542  
    4242#include "CSystemProperties.h"
    4343
    44 UIWizardNewVDExpertPage::UIWizardNewVDExpertPage(qulonglong uDiskMinimumSize)
     44UIWizardNewVDExpertPage::UIWizardNewVDExpertPage(qulonglong uDiskMinimumSize, KDeviceType enmDeviceType)
    4545    : UINativeWizardPage()
    4646    , m_pSizeAndPathGroup(0)
     
    5151    , m_uMediumSizeMax(gpGlobalSession->virtualBox().GetSystemProperties().GetInfoVDSize())
    5252{
    53     prepare(uDiskMinimumSize);
    54 }
    55 
    56 void UIWizardNewVDExpertPage::prepare(qulonglong uDiskMinimumSize)
     53    prepare(uDiskMinimumSize, enmDeviceType);
     54}
     55
     56void UIWizardNewVDExpertPage::prepare(qulonglong uDiskMinimumSize, KDeviceType enmDeviceType)
    5757{
    5858    QVBoxLayout *pMainLayout = new QVBoxLayout(this);
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDExpertPage.h

    r105539 r105542  
    3535#include "UINativeWizardPage.h"
    3636
     37/* COM includes:*/
     38#include "KDeviceType.h"
     39
    3740/* Forward declarations: */
    3841class QGroupBox;
     
    4851public:
    4952
    50     UIWizardNewVDExpertPage(qulonglong uDiskMinimumSize);
     53    UIWizardNewVDExpertPage(qulonglong uDiskMinimumSize, KDeviceType enmDeviceType);
    5154
    5255private slots:
     
    6366
    6467    /** Prepare stuff. */
    65     void prepare(qulonglong uDiskMinimumSize);
     68    void prepare(qulonglong uDiskMinimumSize, KDeviceType enmDeviceType);
    6669    virtual void initializePage() RT_OVERRIDE RT_FINAL;
    6770
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDFileTypePage.cpp

    r104069 r105542  
    3535#include "QIRichTextLabel.h"
    3636
    37 UIWizardNewVDFileTypePage::UIWizardNewVDFileTypePage()
     37UIWizardNewVDFileTypePage::UIWizardNewVDFileTypePage(KDeviceType enmDeviceType)
    3838    : m_pLabel(0)
    3939    , m_pFormatButtonGroup(0)
    4040{
    41     prepare();
     41    prepare(enmDeviceType);
    4242}
    4343
    44 void UIWizardNewVDFileTypePage::prepare()
     44void UIWizardNewVDFileTypePage::prepare(KDeviceType enmDeviceType)
    4545{
    4646    QVBoxLayout *pMainLayout = new QVBoxLayout(this);
    4747    m_pLabel = new QIRichTextLabel(this);
    4848    pMainLayout->addWidget(m_pLabel);
    49     m_pFormatButtonGroup = new UIDiskFormatsGroupBox(false, KDeviceType_HardDisk, 0);
     49    m_pFormatButtonGroup = new UIDiskFormatsGroupBox(false, enmDeviceType, 0);
    5050    pMainLayout->addWidget(m_pFormatButtonGroup, false);
    5151
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDFileTypePage.h

    r103982 r105542  
    3535#include "UINativeWizardPage.h"
    3636
     37/* COM includes:*/
     38#include "KDeviceType.h"
     39
    3740/* Forward declarations: */
    3841class QIRichTextLabel;
     
    4750
    4851    /** Constructor. */
    49     UIWizardNewVDFileTypePage();
     52    UIWizardNewVDFileTypePage(KDeviceType enmDeviceType);
    5053
    5154private slots:
     
    5659private:
    5760
    58     void prepare();
     61    void prepare(KDeviceType enmDeviceType);
    5962    void initializePage() RT_OVERRIDE RT_FINAL;
    6063
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