VirtualBox

Changeset 91254 in vbox


Ignore:
Timestamp:
Sep 15, 2021 1:46:39 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9996. Refactoring UIDiskFormatsGroupBox. part 2.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors
Files:
2 edited

Legend:

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

    r91252 r91254  
    173173UIDiskFormatsGroupBox::UIDiskFormatsGroupBox(bool fExpertMode, KDeviceType enmDeviceType, QWidget *pParent /* = 0 */)
    174174    : UIDiskEditorGroupBox(fExpertMode, pParent)
    175     , m_enmDeviceType(enmDeviceType)
     175    , UIDiskFormatBase(enmDeviceType)
    176176    , m_pFormatButtonGroup(0)
    177177    , m_pMainLayout(0)
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.h

    r91253 r91254  
    7474};
    7575
    76 class SHARED_LIBRARY_STUFF UIDiskFormatsGroupBox : public UIDiskEditorGroupBox
    77 {
    78     Q_OBJECT;
    79 
    80 signals:
    81 
    82     void sigMediumFormatChanged();
    83 
    84 public:
    85 
    86     UIDiskFormatsGroupBox(bool fExpertMode, KDeviceType enmDeviceType, QWidget *pParent = 0);
    87     CMediumFormat mediumFormat() const;
    88     void setMediumFormat(const CMediumFormat &mediumFormat);
    89     const CMediumFormat &VDIMediumFormat() const;
    90     const QStringList formatExtensions() const;
    91 
    92 private:
     76class UIDiskFormatBase
     77{
     78
     79public:
     80
     81    UIDiskFormatBase(KDeviceType enmDeviceType)
     82        : m_enmDeviceType(enmDeviceType)
     83    {}
     84
     85protected:
     86
    9387    struct Format
    9488    {
     
    106100    };
    107101
     102    QVector<Format> m_formatList;
     103    CMediumFormat m_comVDIMediumFormat;
     104    KDeviceType m_enmDeviceType;
     105
     106};
     107
     108class SHARED_LIBRARY_STUFF UIDiskFormatsGroupBox : public UIDiskEditorGroupBox, public UIDiskFormatBase
     109{
     110    Q_OBJECT;
     111
     112signals:
     113
     114    void sigMediumFormatChanged();
     115
     116public:
     117
     118    UIDiskFormatsGroupBox(bool fExpertMode, KDeviceType enmDeviceType, QWidget *pParent = 0);
     119    CMediumFormat mediumFormat() const;
     120    void setMediumFormat(const CMediumFormat &mediumFormat);
     121    const CMediumFormat &VDIMediumFormat() const;
     122    const QStringList formatExtensions() const;
     123
     124private:
     125
    108126    void prepare();
    109127    void populateFormats();
     
    112130    virtual void retranslateUi() /* override final */;
    113131
    114     QVector<Format> m_formatList;
    115 
    116     CMediumFormat m_comVDIMediumFormat;
    117     KDeviceType m_enmDeviceType;
    118132
    119133    QButtonGroup *m_pFormatButtonGroup;
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