VirtualBox

Ignore:
Timestamp:
Oct 1, 2018 12:57:05 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: ​bugref: 9260: Extend the clone vm wizard to include additional options related to MAC addresses

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic1.h

    r72288 r74550  
    2525class QILineEdit;
    2626class QCheckBox;
     27class QComboBox;
     28class QGridLayout;
    2729class QLabel;
    2830class QIRichTextLabel;
    2931class UIFilePathSelector;
     32
     33/** MAC address policies. */
     34enum MACAddressClonePolicy
     35{
     36    MACAddressClonePolicy_KeepAllMACs,
     37    MACAddressClonePolicy_KeepNATMACs,
     38    MACAddressClonePolicy_StripAllMACs,
     39    MACAddressClonePolicy_MAX
     40};
     41Q_DECLARE_METATYPE(MACAddressClonePolicy);
    3042
    3143/* 1st page of the Clone Virtual Machine wizard (base part): */
     
    4557    void setCloneFilePath(const QString &path);
    4658
    47     bool isReinitMACsChecked() const;
    4859    /** calls CVirtualBox::ComposeMachineFilename(...) and sets related member variables */
    4960    void composeCloneFilePath();
     61    /** Populates MAC address policies. */
     62    void populateMACAddressClonePolicies();
    5063
    51     QString     m_strOriginalName;
    52     QString     m_strDefaultPath;
    53     QString     m_strGroup;
     64    /** Updates MAC address policy combo tool-tips. */
     65    void updateMACAddressClonePolicyComboToolTip();
     66    /** Returns MAC address clone policy. */
     67    MACAddressClonePolicy macAddressClonePolicy() const;
     68    /** Defines @a enmMACAddressClonePolicy. */
     69    void setMACAddressClonePolicy(MACAddressClonePolicy enmMACAddressClonePolicy);
     70
     71    QString      m_strOriginalName;
     72    QString      m_strDefaultPath;
     73    QString      m_strGroup;
    5474    /** Full, non-native path of the clone machines setting file. Generated by CVirtualBox::ComposeMachineFilename(...) */
    55     QString     m_strCloneFilePath;
     75    QString      m_strCloneFilePath;
    5676    /** The full path of the folder where clone machine's settings file is located.
    5777     * Generated from the m_strCloneFilePath by removing base file name */
    58     QString     m_strCloneFolder;
    59     QCheckBox  *m_pReinitMACsCheckBox;
    60     QILineEdit *m_pNameLineEdit;
     78    QString      m_strCloneFolder;
     79    QILineEdit  *m_pNameLineEdit;
    6180    UIFilePathSelector *m_pPathSelector;
    62     QLabel     *m_pNameLabel;
    63     QLabel     *m_pPathLabel;
    64 
     81    QLabel      *m_pNameLabel;
     82    QLabel      *m_pPathLabel;
     83    QLabel      *m_pMACComboBoxLabel;
     84    QComboBox   *m_pMACComboBox;
    6585};
    6686
     
    7191    Q_PROPERTY(QString cloneName READ cloneName WRITE setCloneName);
    7292    Q_PROPERTY(QString cloneFilePath READ cloneFilePath WRITE setCloneFilePath);
    73     Q_PROPERTY(bool reinitMACs READ isReinitMACsChecked);
     93    Q_PROPERTY(MACAddressClonePolicy macAddressClonePolicy READ macAddressClonePolicy WRITE setMACAddressClonePolicy);
    7494
    7595public:
     
    81101    void sltNameChanged();
    82102    void sltPathChanged();
     103    /** Handles change in MAC address policy combo-box. */
     104    void sltHandleMACAddressClonePolicyComboChange();
    83105
    84106private:
     
    91113
    92114    QIRichTextLabel *m_pMainLabel;
     115    QGridLayout     *m_pContainerLayout;
    93116};
    94117
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