VirtualBox

Changeset 91589 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 6, 2021 10:43:27 AM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9996: UIWizardImportApp: Get rid of UIWizardImportAppDefs.h and appliance widget field.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance
Files:
1 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportApp.cpp

    r91578 r91589  
    315315    /* Translate wizard: */
    316316    setWindowTitle(tr("Import Virtual Appliance"));
    317     setButtonText(QWizard::CustomButton2, tr("Restore Defaults"));
    318317    setButtonText(QWizard::FinishButton, tr("Import"));
    319 }
    320 
    321 void UIWizardImportApp::sltCurrentIdChanged(int iId)
    322 {
    323     /* Call to base-class: */
    324     UIWizard::sltCurrentIdChanged(iId);
    325     /* Enable 2nd button (Reset to Defaults) for 2nd and Expert pages only! */
    326     setOption(QWizard::HaveCustomButton2, (mode() == WizardMode_Basic && iId == Page2) ||
    327                                           (mode() == WizardMode_Expert && iId == PageExpert));
    328 }
    329 
    330 void UIWizardImportApp::sltCustomButtonClicked(int iId)
    331 {
    332     /* Call to base-class: */
    333     UIWizard::sltCustomButtonClicked(iId);
    334 
    335     /* Handle 2nd button: */
    336     if (iId == CustomButton2)
    337     {
    338         /* Get appliance widget: */
    339         ImportAppliancePointer pApplianceWidget = field("applianceWidget").value<ImportAppliancePointer>();
    340         AssertMsg(!pApplianceWidget.isNull(), ("Appliance Widget is not set!\n"));
    341         /* Reset it to default: */
    342         pApplianceWidget->restoreDefaults();
    343     }
    344318}
    345319
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportApp.h

    r91578 r91589  
    8181    virtual void retranslateUi() /* override */;
    8282
    83 protected slots:
    84 
    85     /** Handles change for page with @a iId. */
    86     virtual void sltCurrentIdChanged(int iId) /* override */;
    87     /** Handles custom button 2 click  for page with @a iId. */
    88     virtual void sltCustomButtonClicked(int iId) /* override */;
    89 
    9083private:
    9184
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.cpp

    r91578 r91589  
    4242/* COM includes: */
    4343#include "CStringArray.h"
     44#include "CVirtualSystemDescription.h"
    4445
    4546
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.h

    r91563 r91589  
    2323
    2424/* GUI includes: */
    25 #include "UIWizardImportAppDefs.h"
    2625#include "UIWizardPage.h"
    2726
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic2.cpp

    r91578 r91589  
    2727/* GUI includes: */
    2828#include "QIRichTextLabel.h"
     29#include "UIApplianceImportEditorWidget.h"
    2930#include "UIApplianceUnverifiedCertificateViewer.h"
    3031#include "UICommon.h"
    3132#include "UIFilePathSelector.h"
     33#include "UIFormEditorWidget.h"
    3234#include "UIMessageCenter.h"
    3335#include "UIWizardImportApp.h"
     
    4749UIWizardImportAppPage2::UIWizardImportAppPage2()
    4850    : m_pSettingsCntLayout(0)
     51    , m_pApplianceWidget(0)
    4952    , m_pLabelImportFilePath(0)
    5053    , m_pEditorImportFilePath(0)
     
    5356    , m_pLabelAdditionalOptions(0)
    5457    , m_pCheckboxImportHDsAsVDI(0)
     58    , m_pFormEditor(0)
    5559{
    5660}
     
    267271            this, &UIWizardImportAppPageBasic2::sltHandleMACImportPolicyChange);
    268272
    269     /* Register classes: */
    270     qRegisterMetaType<ImportAppliancePointer>();
    271273    /* Register fields: */
    272     registerField("applianceWidget", this, "applianceWidget");
    273274    registerField("macAddressImportPolicy", this, "macAddressImportPolicy");
    274275    registerField("importHDsAsVDI", this, "importHDsAsVDI");
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic2.h

    r91578 r91589  
    2323
    2424/* GUI includes: */
    25 #include "UIFormEditorWidget.h"
    2625#include "UIWizardImportApp.h"
    27 #include "UIWizardImportAppDefs.h"
    2826#include "UIWizardPage.h"
    2927
    3028/* Forward declarations: */
     29class QCheckBox;
    3130class QComboBox;
    3231class QLabel;
    3332class QStackedLayout;
    3433class QIRichTextLabel;
     34class UIApplianceImportEditorWidget;
    3535class UIFilePathSelector;
     36class UIFormEditorWidget;
    3637
    3738/** UIWizardPageBase extension for 2nd page of the Import Appliance wizard. */
     
    5556    void refreshFormPropertiesTable();
    5657
    57     /** Returns appliance widget instance. */
    58     ImportAppliancePointer applianceWidget() const { return m_pApplianceWidget; }
    59 
    6058    /** Returns MAC address import policy. */
    6159    MACAddressImportPolicy macAddressImportPolicy() const;
     
    7068
    7169    /** Holds the appliance widget instance. */
    72     ImportAppliancePointer  m_pApplianceWidget;
     70    UIApplianceImportEditorWidget *m_pApplianceWidget;
    7371    /** Holds the import file-path label instance. */
    74     QLabel                 *m_pLabelImportFilePath;
     72    QLabel                        *m_pLabelImportFilePath;
    7573    /** Holds the import file-path editor instance. */
    76     UIFilePathSelector     *m_pEditorImportFilePath;
     74    UIFilePathSelector            *m_pEditorImportFilePath;
    7775    /** Holds the MAC address label instance. */
    78     QLabel                 *m_pLabelMACImportPolicy;
     76    QLabel                        *m_pLabelMACImportPolicy;
    7977    /** Holds the MAC address combo instance. */
    80     QComboBox              *m_pComboMACImportPolicy;
     78    QComboBox                     *m_pComboMACImportPolicy;
    8179    /** Holds the additional options label instance. */
    82     QLabel                 *m_pLabelAdditionalOptions;
     80    QLabel                        *m_pLabelAdditionalOptions;
    8381    /** Holds the 'import HDs as VDI' checkbox instance. */
    84     QCheckBox              *m_pCheckboxImportHDsAsVDI;
     82    QCheckBox                     *m_pCheckboxImportHDsAsVDI;
    8583
    8684    /** Holds the Form Editor widget instance. */
    87     UIFormEditorWidgetPointer  m_pFormEditor;
     85    UIFormEditorWidget *m_pFormEditor;
    8886};
    8987
     
    9290{
    9391    Q_OBJECT;
    94     Q_PROPERTY(ImportAppliancePointer applianceWidget READ applianceWidget);
    9592    Q_PROPERTY(MACAddressImportPolicy macAddressImportPolicy READ macAddressImportPolicy);
    9693    Q_PROPERTY(bool importHDsAsVDI READ importHDsAsVDI);
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.cpp

    r91578 r91589  
    3434#include "UIEmptyFilePathSelector.h"
    3535#include "UIFilePathSelector.h"
     36#include "UIFormEditorWidget.h"
    3637#include "UIIconPool.h"
    3738#include "UIMessageCenter.h"
     
    285286            this, &UIWizardImportAppPageExpert::sltHandleMACImportPolicyChange);
    286287
    287     /* Register classes: */
    288     qRegisterMetaType<ImportAppliancePointer>();
    289288    /* Register fields: */
    290289    registerField("isSourceCloudOne", this, "isSourceCloudOne");
     
    293292    registerField("vsdForm", this, "vsdForm");
    294293    registerField("machineId", this, "machineId");
    295     registerField("applianceWidget", this, "applianceWidget");
    296294    registerField("macAddressImportPolicy", this, "macAddressImportPolicy");
    297295    registerField("importHDsAsVDI", this, "importHDsAsVDI");
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.h

    r91578 r91589  
    4040    Q_PROPERTY(CVirtualSystemDescriptionForm vsdForm READ vsdForm);
    4141    Q_PROPERTY(QString machineId READ machineId);
    42     Q_PROPERTY(ImportAppliancePointer applianceWidget READ applianceWidget);
    4342    Q_PROPERTY(MACAddressImportPolicy macAddressImportPolicy READ macAddressImportPolicy);
    4443    Q_PROPERTY(bool importHDsAsVDI READ importHDsAsVDI);
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