Index: /trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 91708)
+++ /trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 91709)
@@ -684,7 +684,7 @@
 	src/wizards/importappliance/UIApplianceUnverifiedCertificateViewer.h \
 	src/wizards/importappliance/UIWizardImportApp.h \
-	src/wizards/importappliance/UIWizardImportAppPageBasic1.h \
-	src/wizards/importappliance/UIWizardImportAppPageBasic2.h \
-	src/wizards/importappliance/UIWizardImportAppPageExpert.h
+	src/wizards/importappliance/UIWizardImportAppPageExpert.h \
+	src/wizards/importappliance/UIWizardImportAppPageSettings.h \
+	src/wizards/importappliance/UIWizardImportAppPageSource.h
 
 
@@ -1194,7 +1194,7 @@
 	src/wizards/importappliance/UIApplianceUnverifiedCertificateViewer.cpp \
 	src/wizards/importappliance/UIWizardImportApp.cpp \
-	src/wizards/importappliance/UIWizardImportAppPageBasic1.cpp \
-	src/wizards/importappliance/UIWizardImportAppPageBasic2.cpp \
-	src/wizards/importappliance/UIWizardImportAppPageExpert.cpp
+	src/wizards/importappliance/UIWizardImportAppPageExpert.cpp \
+	src/wizards/importappliance/UIWizardImportAppPageSettings.cpp \
+	src/wizards/importappliance/UIWizardImportAppPageSource.cpp
 
 VirtualBox_SOURCES.darwin += \
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportApp.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportApp.cpp	(revision 91708)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportApp.cpp	(revision 91709)
@@ -32,7 +32,7 @@
 #include "UINotificationCenter.h"
 #include "UIWizardImportApp.h"
-#include "UIWizardImportAppPageBasic1.h"
-#include "UIWizardImportAppPageBasic2.h"
 #include "UIWizardImportAppPageExpert.h"
+#include "UIWizardImportAppPageSettings.h"
+#include "UIWizardImportAppPageSource.h"
 
 /* COM includes: */
@@ -278,6 +278,6 @@
         {
             if (m_fImportFromOCIByDefault || m_strFileName.isEmpty())
-                addPage(new UIWizardImportAppPageBasic1(m_fImportFromOCIByDefault, m_strFileName));
-            addPage(new UIWizardImportAppPageBasic2(m_strFileName));
+                addPage(new UIWizardImportAppPageSource(m_fImportFromOCIByDefault, m_strFileName));
+            addPage(new UIWizardImportAppPageSettings(m_strFileName));
             break;
         }
Index: unk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.cpp	(revision 91708)
+++ 	(revision )
@@ -1,836 +1,0 @@
-/* $Id$ */
-/** @file
- * VBox Qt GUI - UIWizardImportAppPageBasic1 class implementation.
- */
-
-/*
- * Copyright (C) 2009-2021 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-/* Qt includes: */
-#include <QGridLayout>
-#include <QLabel>
-#include <QListWidget>
-#include <QStackedWidget>
-
-/* GUI includes: */
-#include "QIComboBox.h"
-#include "QIRichTextLabel.h"
-#include "QIToolButton.h"
-#include "UICloudNetworkingStuff.h"
-#include "UIEmptyFilePathSelector.h"
-#include "UIIconPool.h"
-#include "UIMessageCenter.h"
-#include "UIVirtualBoxEventHandler.h"
-#include "UIVirtualBoxManager.h"
-#include "UIWizardImportApp.h"
-#include "UIWizardImportAppPageBasic1.h"
-
-/* COM includes: */
-#include "CAppliance.h"
-#include "CVirtualSystemDescription.h"
-#include "CVirtualSystemDescriptionForm.h"
-
-/* Namespaces: */
-using namespace UIWizardImportAppPage1;
-
-
-/*********************************************************************************************************************************
-*   Class UIWizardImportAppPage1 implementation.                                                                                 *
-*********************************************************************************************************************************/
-
-void UIWizardImportAppPage1::populateSources(QIComboBox *pCombo,
-                                             bool fImportFromOCIByDefault,
-                                             const QString &strSource)
-{
-    /* Sanity check: */
-    AssertPtrReturnVoid(pCombo);
-    /* We need top-level parent as well: */
-    QWidget *pParent = pCombo->window();
-    AssertPtrReturnVoid(pParent);
-
-    /* Remember current item data to be able to restore it: */
-    QString strOldData;
-    if (pCombo->currentIndex() != -1)
-        strOldData = pCombo->currentData(SourceData_ShortName).toString();
-    else
-    {
-        /* Otherwise "OCI" or "local" should be the default one: */
-        if (fImportFromOCIByDefault)
-            strOldData = strSource.isEmpty() ? "OCI" : strSource;
-        else
-            strOldData = "local";
-    }
-
-    /* Block signals while updating: */
-    pCombo->blockSignals(true);
-
-    /* Clear combo initially: */
-    pCombo->clear();
-
-    /* Compose hardcoded sources list: */
-    QStringList sources;
-    sources << "local";
-    /* Add that list to combo: */
-    foreach (const QString &strShortName, sources)
-    {
-        /* Compose empty item, fill it's data: */
-        pCombo->addItem(QString());
-        pCombo->setItemData(pCombo->count() - 1, strShortName, SourceData_ShortName);
-    }
-
-    /* Iterate through existing providers: */
-    foreach (const CCloudProvider &comProvider, listCloudProviders(pParent))
-    {
-        /* Skip if we have nothing to populate (file missing?): */
-        if (comProvider.isNull())
-            continue;
-        /* Acquire provider name: */
-        QString strProviderName;
-        if (!cloudProviderName(comProvider, strProviderName, pParent))
-            continue;
-        /* Acquire provider short name: */
-        QString strProviderShortName;
-        if (!cloudProviderShortName(comProvider, strProviderShortName, pParent))
-            continue;
-
-        /* Compose empty item, fill it's data: */
-        pCombo->addItem(QString());
-        pCombo->setItemData(pCombo->count() - 1, strProviderName,      SourceData_Name);
-        pCombo->setItemData(pCombo->count() - 1, strProviderShortName, SourceData_ShortName);
-        pCombo->setItemData(pCombo->count() - 1, true,                 SourceData_IsItCloudFormat);
-    }
-
-    /* Set previous/default item if possible: */
-    int iNewIndex = -1;
-    if (   iNewIndex == -1
-        && !strOldData.isNull())
-        iNewIndex = pCombo->findData(strOldData, SourceData_ShortName);
-    if (   iNewIndex == -1
-        && pCombo->count() > 0)
-        iNewIndex = 0;
-    if (iNewIndex != -1)
-        pCombo->setCurrentIndex(iNewIndex);
-
-    /* Unblock signals after update: */
-    pCombo->blockSignals(false);
-}
-
-QString UIWizardImportAppPage1::source(QIComboBox *pCombo)
-{
-    /* Sanity check: */
-    AssertPtrReturn(pCombo, QString());
-
-    /* Give the actual result: */
-    return pCombo->currentData(SourceData_ShortName).toString();
-}
-
-bool UIWizardImportAppPage1::isSourceCloudOne(QIComboBox *pCombo, int iIndex /* = -1 */)
-{
-    /* Sanity check: */
-    AssertPtrReturn(pCombo, false);
-
-    /* Handle special case, -1 means "current one": */
-    if (iIndex == -1)
-        iIndex = pCombo->currentIndex();
-
-    /* Give the actual result: */
-    return pCombo->itemData(iIndex, SourceData_IsItCloudFormat).toBool();
-}
-
-void UIWizardImportAppPage1::refreshStackedWidget(QStackedWidget *pStackedWidget,
-                                                  bool fIsSourceCloudOne)
-{
-    /* Sanity check: */
-    AssertPtrReturnVoid(pStackedWidget);
-
-    /* Update stack appearance according to chosen source: */
-    pStackedWidget->setCurrentIndex((int)fIsSourceCloudOne);
-}
-
-void UIWizardImportAppPage1::refreshProfileCombo(QIComboBox *pCombo,
-                                                 const QString &strSource,
-                                                 const QString &strProfileName,
-                                                 bool fIsSourceCloudOne)
-{
-    /* Sanity check: */
-    AssertPtrReturnVoid(pCombo);
-
-    /* If source is cloud one: */
-    if (fIsSourceCloudOne)
-    {
-        /* We need top-level parent as well: */
-        QWidget *pParent = pCombo->window();
-        AssertPtrReturnVoid(pParent);
-        /* Acquire provider: */
-        CCloudProvider comProvider = cloudProviderByShortName(strSource, pParent);
-        AssertReturnVoid(comProvider.isNotNull());
-
-        /* Remember current item data to be able to restore it: */
-        QString strOldData;
-        if (pCombo->currentIndex() != -1)
-            strOldData = pCombo->currentData(ProfileData_Name).toString();
-        else if (!strProfileName.isEmpty())
-            strOldData = strProfileName;
-
-        /* Block signals while updating: */
-        pCombo->blockSignals(true);
-
-        /* Clear combo initially: */
-        pCombo->clear();
-
-        /* Iterate through existing profile names: */
-        foreach (const CCloudProfile &comProfile, listCloudProfiles(comProvider, pParent))
-        {
-            /* Skip if we have nothing to populate (wtf happened?): */
-            if (comProfile.isNull())
-                continue;
-            /* Acquire profile name: */
-            QString strCurrentProfileName;
-            if (!cloudProfileName(comProfile, strCurrentProfileName, pParent))
-                continue;
-
-            /* Compose item, fill it's data: */
-            pCombo->addItem(strCurrentProfileName);
-            pCombo->setItemData(pCombo->count() - 1, strCurrentProfileName, ProfileData_Name);
-        }
-
-        /* Set previous/default item if possible: */
-        int iNewIndex = -1;
-        if (   iNewIndex == -1
-            && !strOldData.isNull())
-            iNewIndex = pCombo->findData(strOldData, ProfileData_Name);
-        if (   iNewIndex == -1
-            && pCombo->count() > 0)
-            iNewIndex = 0;
-        if (iNewIndex != -1)
-            pCombo->setCurrentIndex(iNewIndex);
-
-        /* Unblock signals after update: */
-        pCombo->blockSignals(false);
-    }
-    /* If source is local one: */
-    else
-    {
-        /* Block signals while updating: */
-        pCombo->blockSignals(true);
-
-        /* Clear combo initially: */
-        pCombo->clear();
-
-        /* Unblock signals after update: */
-        pCombo->blockSignals(false);
-    }
-}
-
-void UIWizardImportAppPage1::refreshCloudProfileInstances(QListWidget *pListWidget,
-                                                          const QString &strSource,
-                                                          const QString &strProfileName,
-                                                          bool fIsSourceCloudOne)
-{
-    /* Sanity check: */
-    AssertPtrReturnVoid(pListWidget);
-
-    /* If source is cloud one: */
-    if (fIsSourceCloudOne)
-    {
-        /* We need top-level parent as well: */
-        QWidget *pParent = pListWidget->window();
-        AssertPtrReturnVoid(pParent);
-        /* Acquire client: */
-        CCloudClient comClient = cloudClientByName(strSource, strProfileName, pParent);
-        AssertReturnVoid(comClient.isNotNull());
-
-        /* Block signals while updating: */
-        pListWidget->blockSignals(true);
-
-        /* Clear list initially: */
-        pListWidget->clear();
-
-        /* Gather VM names, ids and states.
-         * Currently we are interested in Running and Stopped VMs only. */
-        QString strErrorMessage;
-        const QMap<QString, QString> instances = listInstances(comClient, strErrorMessage, pParent);
-
-        /* Push acquired names to list rows: */
-        foreach (const QString &strId, instances.keys())
-        {
-            /* Create list item: */
-            QListWidgetItem *pItem = new QListWidgetItem(instances.value(strId), pListWidget);
-            if (pItem)
-            {
-                pItem->setFlags(pItem->flags() & ~Qt::ItemIsEditable);
-                pItem->setData(Qt::UserRole, strId);
-            }
-        }
-
-        /* Choose the 1st one by default if possible: */
-        if (pListWidget->count())
-            pListWidget->setCurrentRow(0);
-
-        /* Unblock signals after update: */
-        pListWidget->blockSignals(false);
-    }
-    /* If source is local one: */
-    else
-    {
-        /* Block signals while updating: */
-        pListWidget->blockSignals(true);
-
-        /* Clear combo initially: */
-        pListWidget->clear();
-
-        /* Unblock signals after update: */
-        pListWidget->blockSignals(false);
-    }
-}
-
-void UIWizardImportAppPage1::refreshCloudStuff(CAppliance &comCloudAppliance,
-                                               CVirtualSystemDescriptionForm &comCloudVsdImportForm,
-                                               QWidget *pParent,
-                                               const QString &strMachineId,
-                                               const QString &strSource,
-                                               const QString &strProfileName,
-                                               bool fIsSourceCloudOne)
-{
-    /* Clear stuff: */
-    comCloudAppliance = CAppliance();
-    comCloudVsdImportForm = CVirtualSystemDescriptionForm();
-
-    /* If source is NOT cloud one: */
-    if (!fIsSourceCloudOne)
-        return;
-
-    /* We need top-level parent as well: */
-    AssertPtrReturnVoid(pParent);
-    /* Acquire client: */
-    CCloudClient comClient = cloudClientByName(strSource, strProfileName, pParent);
-    AssertReturnVoid(comClient.isNotNull());
-
-    /* Create appliance: */
-    CVirtualBox comVBox = uiCommon().virtualBox();
-    CAppliance comAppliance = comVBox.CreateAppliance();
-    if (!comVBox.isOk())
-    {
-        msgCenter().cannotCreateAppliance(comVBox, pParent);
-        return;
-    }
-
-    /* Remember appliance: */
-    comCloudAppliance = comAppliance;
-
-    /* Read cloud instance info: */
-    CProgress comReadProgress = comCloudAppliance.Read(QString("OCI://%1/%2").arg(strProfileName, strMachineId));
-    if (!comCloudAppliance.isOk())
-    {
-        msgCenter().cannotImportAppliance(comCloudAppliance, pParent);
-        return;
-    }
-
-    /* Show "Read appliance" progress: */
-    msgCenter().showModalProgressDialog(comReadProgress, UIWizardImportApp::tr("Read appliance ..."),
-                                        ":/progress_reading_appliance_90px.png", pParent, 0);
-    if (!comReadProgress.isOk() || comReadProgress.GetResultCode() != 0)
-    {
-        msgCenter().cannotImportAppliance(comReadProgress, comCloudAppliance.GetPath(), pParent);
-        return;
-    }
-
-    /* Acquire virtual system description: */
-    QVector<CVirtualSystemDescription> descriptions = comCloudAppliance.GetVirtualSystemDescriptions();
-    if (!comCloudAppliance.isOk())
-    {
-        msgCenter().cannotAcquireVirtualSystemDescription(comCloudAppliance, pParent);
-        return;
-    }
-
-    /* Make sure there is at least one virtual system description created: */
-    AssertReturnVoid(!descriptions.isEmpty());
-    CVirtualSystemDescription comDescription = descriptions.at(0);
-
-    /* Read Cloud Client description form: */
-    CVirtualSystemDescriptionForm comVsdImportForm;
-    bool fSuccess = importDescriptionForm(comClient, comDescription, comVsdImportForm, pParent);
-    if (!fSuccess)
-        return;
-
-    /* Remember form: */
-    comCloudVsdImportForm = comVsdImportForm;
-}
-
-QString UIWizardImportAppPage1::path(UIEmptyFilePathSelector *pFileSelector)
-{
-    /* Sanity check: */
-    AssertPtrReturn(pFileSelector, QString());
-
-    /* Give the actual result: */
-    return pFileSelector->path().toLower();
-}
-
-QString UIWizardImportAppPage1::profileName(QIComboBox *pCombo)
-{
-    /* Sanity check: */
-    AssertPtrReturn(pCombo, QString());
-
-    /* Give the actual result: */
-    return pCombo->currentData(ProfileData_Name).toString();
-}
-
-QString UIWizardImportAppPage1::machineId(QListWidget *pListWidget)
-{
-    /* Sanity check: */
-    AssertPtrReturn(pListWidget, QString());
-
-    /* Give the actual result: */
-    QListWidgetItem *pItem = pListWidget->currentItem();
-    return pItem ? pItem->data(Qt::UserRole).toString() : QString();
-}
-
-void UIWizardImportAppPage1::updateSourceComboToolTip(QIComboBox *pCombo)
-{
-    /* Sanity check: */
-    AssertPtrReturnVoid(pCombo);
-
-    /* Update tool-tip: */
-    const QString strCurrentToolTip = pCombo->currentData(Qt::ToolTipRole).toString();
-    pCombo->setToolTip(strCurrentToolTip);
-}
-
-
-/*********************************************************************************************************************************
-*   Class UIWizardImportAppPageBasic1 implementation.                                                                            *
-*********************************************************************************************************************************/
-
-UIWizardImportAppPageBasic1::UIWizardImportAppPageBasic1(bool fImportFromOCIByDefault, const QString &strFileName)
-    : m_fImportFromOCIByDefault(fImportFromOCIByDefault)
-    , m_strFileName(strFileName)
-    , m_pLabelMain(0)
-    , m_pLabelDescription(0)
-    , m_pSourceLayout(0)
-    , m_pSourceLabel(0)
-    , m_pSourceComboBox(0)
-    , m_pSettingsWidget1(0)
-    , m_pLocalContainerLayout(0)
-    , m_pFileLabel(0)
-    , m_pFileSelector(0)
-    , m_pCloudContainerLayout(0)
-    , m_pProfileLabel(0)
-    , m_pProfileComboBox(0)
-    , m_pProfileToolButton(0)
-    , m_pProfileInstanceLabel(0)
-    , m_pProfileInstanceList(0)
-{
-    /* Prepare main layout: */
-    QVBoxLayout *pMainLayout = new QVBoxLayout(this);
-    if (pMainLayout)
-    {
-        /* Prepare main label: */
-        m_pLabelMain = new QIRichTextLabel(this);
-        if (m_pLabelMain)
-            pMainLayout->addWidget(m_pLabelMain);
-
-        /* Prepare source layout: */
-        m_pSourceLayout = new QGridLayout;
-        if (m_pSourceLayout)
-        {
-            m_pSourceLayout->setContentsMargins(0, 0, 0, 0);
-            m_pSourceLayout->setColumnStretch(0, 0);
-            m_pSourceLayout->setColumnStretch(1, 1);
-
-            /* Prepare source label: */
-            m_pSourceLabel = new QLabel(this);
-            if (m_pSourceLabel)
-                m_pSourceLayout->addWidget(m_pSourceLabel, 0, 0, Qt::AlignRight);
-            /* Prepare source selector: */
-            m_pSourceComboBox = new QIComboBox(this);
-            if (m_pSourceComboBox)
-            {
-                m_pSourceLabel->setBuddy(m_pSourceComboBox);
-                m_pSourceLayout->addWidget(m_pSourceComboBox, 0, 1);
-            }
-
-            /* Add into layout: */
-            pMainLayout->addLayout(m_pSourceLayout);
-        }
-
-        /* Prepare description label: */
-        m_pLabelDescription = new QIRichTextLabel(this);
-        if (m_pLabelDescription)
-            pMainLayout->addWidget(m_pLabelDescription);
-
-        /* Prepare settings widget: */
-        m_pSettingsWidget1 = new QStackedWidget(this);
-        if (m_pSettingsWidget1)
-        {
-            /* Prepare local container: */
-            QWidget *pContainerLocal = new QWidget(m_pSettingsWidget1);
-            if (pContainerLocal)
-            {
-                /* Prepare local container layout: */
-                m_pLocalContainerLayout = new QGridLayout(pContainerLocal);
-                if (m_pLocalContainerLayout)
-                {
-                    m_pLocalContainerLayout->setContentsMargins(0, 0, 0, 0);
-                    m_pLocalContainerLayout->setColumnStretch(0, 0);
-                    m_pLocalContainerLayout->setColumnStretch(1, 1);
-                    m_pLocalContainerLayout->setRowStretch(1, 1);
-
-                    /* Prepare file label: */
-                    m_pFileLabel = new QLabel(pContainerLocal);
-                    if (m_pFileLabel)
-                        m_pLocalContainerLayout->addWidget(m_pFileLabel, 0, 0, Qt::AlignRight);
-
-                    /* Prepare file-path selector: */
-                    m_pFileSelector = new UIEmptyFilePathSelector(pContainerLocal);
-                    if (m_pFileSelector)
-                    {
-                        m_pFileLabel->setBuddy(m_pFileSelector);
-                        m_pFileSelector->setHomeDir(uiCommon().documentsPath());
-                        m_pFileSelector->setMode(UIEmptyFilePathSelector::Mode_File_Open);
-                        m_pFileSelector->setButtonPosition(UIEmptyFilePathSelector::RightPosition);
-                        m_pFileSelector->setEditable(true);
-                        m_pLocalContainerLayout->addWidget(m_pFileSelector, 0, 1);
-                    }
-                }
-
-                /* Add into widget: */
-                m_pSettingsWidget1->addWidget(pContainerLocal);
-            }
-
-            /* Prepare cloud container: */
-            QWidget *pContainerCloud = new QWidget(m_pSettingsWidget1);
-            if (pContainerCloud)
-            {
-                /* Prepare cloud container layout: */
-                m_pCloudContainerLayout = new QGridLayout(pContainerCloud);
-                if (m_pCloudContainerLayout)
-                {
-                    m_pCloudContainerLayout->setContentsMargins(0, 0, 0, 0);
-                    m_pCloudContainerLayout->setColumnStretch(0, 0);
-                    m_pCloudContainerLayout->setColumnStretch(1, 1);
-                    m_pCloudContainerLayout->setRowStretch(1, 0);
-                    m_pCloudContainerLayout->setRowStretch(2, 1);
-
-                    /* Prepare profile label: */
-                    m_pProfileLabel = new QLabel(pContainerCloud);
-                    if (m_pProfileLabel)
-                        m_pCloudContainerLayout->addWidget(m_pProfileLabel, 0, 0, Qt::AlignRight);
-
-                    /* Prepare sub-layout: */
-                    QHBoxLayout *pSubLayout = new QHBoxLayout;
-                    if (pSubLayout)
-                    {
-                        pSubLayout->setContentsMargins(0, 0, 0, 0);
-                        pSubLayout->setSpacing(1);
-
-                        /* Prepare profile combo-box: */
-                        m_pProfileComboBox = new QIComboBox(pContainerCloud);
-                        if (m_pProfileComboBox)
-                        {
-                            m_pProfileLabel->setBuddy(m_pProfileComboBox);
-                            pSubLayout->addWidget(m_pProfileComboBox);
-                        }
-
-                        /* Prepare profile tool-button: */
-                        m_pProfileToolButton = new QIToolButton(pContainerCloud);
-                        if (m_pProfileToolButton)
-                        {
-                            m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png",
-                                                                              ":/cloud_profile_manager_disabled_16px.png"));
-                            pSubLayout->addWidget(m_pProfileToolButton);
-                        }
-
-                        /* Add into layout: */
-                        m_pCloudContainerLayout->addLayout(pSubLayout, 0, 1);
-                    }
-
-                    /* Prepare profile instance label: */
-                    m_pProfileInstanceLabel = new QLabel(pContainerCloud);
-                    if (m_pProfileInstanceLabel)
-                        m_pCloudContainerLayout->addWidget(m_pProfileInstanceLabel, 1, 0, Qt::AlignRight);
-
-                    /* Prepare profile instances table: */
-                    m_pProfileInstanceList = new QListWidget(pContainerCloud);
-                    if (m_pProfileInstanceList)
-                    {
-                        m_pProfileInstanceLabel->setBuddy(m_pProfileInstanceLabel);
-                        const QFontMetrics fm(m_pProfileInstanceList->font());
-                        const int iFontWidth = fm.width('x');
-                        const int iTotalWidth = 50 * iFontWidth;
-                        const int iFontHeight = fm.height();
-                        const int iTotalHeight = 4 * iFontHeight;
-                        m_pProfileInstanceList->setMinimumSize(QSize(iTotalWidth, iTotalHeight));
-//                        m_pProfileInstanceList->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
-                        m_pProfileInstanceList->setAlternatingRowColors(true);
-                        m_pCloudContainerLayout->addWidget(m_pProfileInstanceList, 1, 1, 2, 1);
-                    }
-                }
-
-                /* Add into widget: */
-                m_pSettingsWidget1->addWidget(pContainerCloud);
-            }
-
-            /* Add into layout: */
-            pMainLayout->addWidget(m_pSettingsWidget1);
-        }
-    }
-
-    /* Setup connections: */
-    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigCloudProfileRegistered,
-            this, &UIWizardImportAppPageBasic1::sltHandleSourceComboChange);
-    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigCloudProfileChanged,
-            this, &UIWizardImportAppPageBasic1::sltHandleSourceComboChange);
-    connect(m_pSourceComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),
-            this, &UIWizardImportAppPageBasic1::sltHandleSourceComboChange);
-    connect(m_pFileSelector, &UIEmptyFilePathSelector::pathChanged,
-            this, &UIWizardImportAppPageBasic1::completeChanged);
-    connect(m_pProfileComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),
-            this, &UIWizardImportAppPageBasic1::sltHandleProfileComboChange);
-    connect(m_pProfileToolButton, &QIToolButton::clicked,
-            this, &UIWizardImportAppPageBasic1::sltHandleProfileButtonClick);
-    connect(m_pProfileInstanceList, &QListWidget::currentRowChanged,
-            this, &UIWizardImportAppPageBasic1::completeChanged);
-
-    /* Parse passed full group name if any: */
-    if (   m_fImportFromOCIByDefault
-        && !m_strFileName.isEmpty())
-    {
-        const QString strProviderShortName = m_strFileName.section('/', 1, 1);
-        const QString strProfileName = m_strFileName.section('/', 2, 2);
-        if (!strProviderShortName.isEmpty() && !strProfileName.isEmpty())
-        {
-            m_strSource = strProviderShortName;
-            m_strProfileName = strProfileName;
-        }
-    }
-}
-
-UIWizardImportApp *UIWizardImportAppPageBasic1::wizard() const
-{
-    return qobject_cast<UIWizardImportApp*>(UINativeWizardPage::wizard());
-}
-
-void UIWizardImportAppPageBasic1::retranslateUi()
-{
-    /* Translate page: */
-    setTitle(UIWizardImportApp::tr("Appliance to import"));
-
-    /* Translate main label: */
-    if (m_pLabelMain)
-        m_pLabelMain->setText(UIWizardImportApp::tr("Please choose the source to import appliance from.  This can be a "
-                                                    "local file system to import OVF archive or one of known cloud "
-                                                    "service providers to import cloud VM from."));
-
-    /* Translate description label: */
-    if (m_pLabelDescription)
-    {
-        if (wizard()->isSourceCloudOne())
-            m_pLabelDescription->setText(UIWizardImportApp::
-                                         tr("<p>Please choose one of cloud service profiles you have registered to import virtual "
-                                            "machine from.  Corresponding machines list will be updated.  To continue, "
-                                            "select one of machines to import below.</p>"));
-        else
-            m_pLabelDescription->setText(UIWizardImportApp::
-                                         tr("<p>Please choose a file to import the virtual appliance from.  VirtualBox currently "
-                                            "supports importing appliances saved in the Open Virtualization Format (OVF).  "
-                                            "To continue, select the file to import below.</p>"));
-    }
-
-    /* Translate source label: */
-    if (m_pSourceLabel)
-        m_pSourceLabel->setText(UIWizardImportApp::tr("&Source:"));
-    if (m_pSourceComboBox)
-    {
-        /* Translate hardcoded values of Source combo-box: */
-        m_pSourceComboBox->setItemText(0, UIWizardImportApp::tr("Local File System"));
-        m_pSourceComboBox->setItemData(0, UIWizardImportApp::tr("Import from local file system."), Qt::ToolTipRole);
-
-        /* Translate received values of Source combo-box.
-         * We are enumerating starting from 0 for simplicity: */
-        for (int i = 0; i < m_pSourceComboBox->count(); ++i)
-            if (isSourceCloudOne(m_pSourceComboBox, i))
-            {
-                m_pSourceComboBox->setItemText(i, m_pSourceComboBox->itemData(i, SourceData_Name).toString());
-                m_pSourceComboBox->setItemData(i, UIWizardImportApp::tr("Import from cloud service provider."), Qt::ToolTipRole);
-            }
-    }
-
-    /* Translate local stuff: */
-    if (m_pFileLabel)
-        m_pFileLabel->setText(UIWizardImportApp::tr("&File:"));
-    if (m_pFileSelector)
-    {
-        m_pFileSelector->setChooseButtonToolTip(UIWizardImportApp::tr("Choose a virtual appliance file to import..."));
-        m_pFileSelector->setFileDialogTitle(UIWizardImportApp::tr("Please choose a virtual appliance file to import"));
-        m_pFileSelector->setFileFilters(UIWizardImportApp::tr("Open Virtualization Format (%1)").arg("*.ova *.ovf"));
-    }
-
-    /* Translate profile stuff: */
-    if (m_pProfileLabel)
-        m_pProfileLabel->setText(UIWizardImportApp::tr("&Profile:"));
-    if (m_pProfileToolButton)
-        m_pProfileToolButton->setToolTip(UIWizardImportApp::tr("Open Cloud Profile Manager..."));
-    if (m_pProfileInstanceLabel)
-        m_pProfileInstanceLabel->setText(UIWizardImportApp::tr("&Machines:"));
-
-    /* Adjust label widths: */
-    QList<QWidget*> labels;
-    if (m_pFileLabel)
-        labels << m_pFileLabel;
-    if (m_pSourceLabel)
-        labels << m_pSourceLabel;
-    if (m_pProfileLabel)
-        labels << m_pProfileLabel;
-    if (m_pProfileInstanceLabel)
-        labels << m_pProfileInstanceLabel;
-    int iMaxWidth = 0;
-    foreach (QWidget *pLabel, labels)
-        iMaxWidth = qMax(iMaxWidth, pLabel->minimumSizeHint().width());
-    if (m_pSourceLayout)
-        m_pSourceLayout->setColumnMinimumWidth(0, iMaxWidth);
-    if (m_pLocalContainerLayout)
-    {
-        m_pLocalContainerLayout->setColumnMinimumWidth(0, iMaxWidth);
-        m_pCloudContainerLayout->setColumnMinimumWidth(0, iMaxWidth);
-    }
-
-    /* Update tool-tips: */
-    updateSourceComboToolTip(m_pSourceComboBox);
-}
-
-void UIWizardImportAppPageBasic1::initializePage()
-{
-    /* Populate sources: */
-    populateSources(m_pSourceComboBox,
-                    m_fImportFromOCIByDefault,
-                    m_strSource);
-    /* Translate page: */
-    retranslateUi();
-
-    /* Choose initially focused widget: */
-    if (wizard()->isSourceCloudOne())
-        m_pProfileInstanceList->setFocus();
-    else
-        m_pFileSelector->setFocus();
-
-    /* Fetch it, asynchronously: */
-    QMetaObject::invokeMethod(this, "sltHandleSourceComboChange", Qt::QueuedConnection);
-}
-
-bool UIWizardImportAppPageBasic1::isComplete() const
-{
-    /* Initial result: */
-    bool fResult = true;
-
-    /* Check whether there was cloud source selected: */
-    if (wizard()->isSourceCloudOne())
-        fResult = !machineId(m_pProfileInstanceList).isEmpty();
-    else
-        fResult =    UICommon::hasAllowedExtension(path(m_pFileSelector), OVFFileExts)
-                  && QFile::exists(path(m_pFileSelector));
-
-    /* Return result: */
-    return fResult;
-}
-
-bool UIWizardImportAppPageBasic1::validatePage()
-{
-    /* Initial result: */
-    bool fResult = true;
-
-    /* Check whether there was cloud source selected: */
-    if (wizard()->isSourceCloudOne())
-    {
-        /* Update cloud stuff: */
-        updateCloudStuff();
-        /* Which is required to continue to the next page: */
-        fResult =    wizard()->cloudAppliance().isNotNull()
-                  && wizard()->vsdImportForm().isNotNull();
-    }
-    else
-    {
-        /* Update local stuff (only if something changed): */
-        if (m_pFileSelector->isModified())
-        {
-            updateLocalStuff();
-            m_pFileSelector->resetModified();
-        }
-        /* Which is required to continue to the next page: */
-        fResult = wizard()->localAppliance().isNotNull();
-    }
-
-    /* Return result: */
-    return fResult;
-}
-
-void UIWizardImportAppPageBasic1::sltHandleSourceComboChange()
-{
-    /* Update combo tool-tip: */
-    updateSourceComboToolTip(m_pSourceComboBox);
-
-    /* Update wizard fields: */
-    wizard()->setSourceCloudOne(isSourceCloudOne(m_pSourceComboBox));
-
-    /* Refresh page widgets: */
-    refreshStackedWidget(m_pSettingsWidget1,
-                         wizard()->isSourceCloudOne());
-    refreshProfileCombo(m_pProfileComboBox,
-                        source(m_pSourceComboBox),
-                        m_strProfileName,
-                        wizard()->isSourceCloudOne());
-
-    /* Update profile instances: */
-    sltHandleProfileComboChange();
-
-    /* Notify about changes: */
-    emit completeChanged();
-}
-
-void UIWizardImportAppPageBasic1::sltHandleProfileComboChange()
-{
-    /* Refresh required settings: */
-    refreshCloudProfileInstances(m_pProfileInstanceList,
-                                 source(m_pSourceComboBox),
-                                 profileName(m_pProfileComboBox),
-                                 wizard()->isSourceCloudOne());
-
-    /* Notify about changes: */
-    emit completeChanged();
-}
-
-void UIWizardImportAppPageBasic1::sltHandleProfileButtonClick()
-{
-    /* Open Cloud Profile Manager: */
-    if (gpManager)
-        gpManager->openCloudProfileManager();
-}
-
-void UIWizardImportAppPageBasic1::updateLocalStuff()
-{
-    /* Create local appliance: */
-    wizard()->setFile(path(m_pFileSelector));
-}
-
-void UIWizardImportAppPageBasic1::updateCloudStuff()
-{
-    /* Create cloud appliance and VSD import form: */
-    CAppliance comAppliance;
-    CVirtualSystemDescriptionForm comForm;
-    refreshCloudStuff(comAppliance,
-                      comForm,
-                      wizard(),
-                      machineId(m_pProfileInstanceList),
-                      source(m_pSourceComboBox),
-                      profileName(m_pProfileComboBox),
-                      wizard()->isSourceCloudOne());
-    wizard()->setCloudAppliance(comAppliance);
-    wizard()->setVsdImportForm(comForm);
-}
Index: unk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.h	(revision 91708)
+++ 	(revision )
@@ -1,195 +1,0 @@
-/* $Id$ */
-/** @file
- * VBox Qt GUI - UIWizardImportAppPageBasic1 class declaration.
- */
-
-/*
- * Copyright (C) 2009-2021 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-#ifndef FEQT_INCLUDED_SRC_wizards_importappliance_UIWizardImportAppPageBasic1_h
-#define FEQT_INCLUDED_SRC_wizards_importappliance_UIWizardImportAppPageBasic1_h
-#ifndef RT_WITHOUT_PRAGMA_ONCE
-# pragma once
-#endif
-
-/* GUI includes: */
-#include "UINativeWizardPage.h"
-
-/* Forward declarations: */
-class QGridLayout;
-class QLabel;
-class QListWidget;
-class QStackedWidget;
-class QIComboBox;
-class QIRichTextLabel;
-class QIToolButton;
-class UIEmptyFilePathSelector;
-class UIWizardImportApp;
-class CAppliance;
-class CVirtualSystemDescriptionForm;
-
-/** Source combo data fields. */
-enum
-{
-    SourceData_Name            = Qt::UserRole + 1,
-    SourceData_ShortName       = Qt::UserRole + 2,
-    SourceData_IsItCloudFormat = Qt::UserRole + 3
-};
-
-/** Profile combo data fields. */
-enum
-{
-    ProfileData_Name = Qt::UserRole + 1
-};
-
-/** Namespace for 1st basic page of the Import Appliance wizard. */
-namespace UIWizardImportAppPage1
-{
-    /** Populates sources. */
-    void populateSources(QIComboBox *pCombo,
-                         bool fImportFromOCIByDefault,
-                         const QString &strSource);
-
-    /** Returns current source of @a pCombo specified. */
-    QString source(QIComboBox *pCombo);
-    /** Returns whether source under certain @a iIndex is cloud one. */
-    bool isSourceCloudOne(QIComboBox *pCombo, int iIndex = -1);
-
-    /** Refresh stacked widget. */
-    void refreshStackedWidget(QStackedWidget *pStackedWidget,
-                              bool fIsFormatCloudOne);
-
-    /** Refresh profile combo. */
-    void refreshProfileCombo(QIComboBox *pCombo,
-                             const QString &strSource,
-                             const QString &strProfileName,
-                             bool fIsSourceCloudOne);
-    /** Refresh profile instances. */
-    void refreshCloudProfileInstances(QListWidget *pListWidget,
-                                      const QString &strSource,
-                                      const QString &strProfileName,
-                                      bool fIsSourceCloudOne);
-    /** Refresh cloud stuff. */
-    void refreshCloudStuff(CAppliance &comCloudAppliance,
-                           CVirtualSystemDescriptionForm &comCloudVsdImportForm,
-                           QWidget *pParent,
-                           const QString &strMachineId,
-                           const QString &strSource,
-                           const QString &strProfileName,
-                           bool fIsSourceCloudOne);
-
-    /** Returns imported file path. */
-    QString path(UIEmptyFilePathSelector *pFileSelector);
-
-    /** Returns profile name. */
-    QString profileName(QIComboBox *pCombo);
-    /** Returns machine ID. */
-    QString machineId(QListWidget *pListWidget);
-
-    /** Updates source combo tool-tips. */
-    void updateSourceComboToolTip(QIComboBox *pCombo);
-}
-
-/** UINativeWizardPage extension for 1st basic page of the Import Appliance wizard,
-  * based on UIWizardImportAppPage1 namespace functions. */
-class UIWizardImportAppPageBasic1 : public UINativeWizardPage
-{
-    Q_OBJECT;
-
-public:
-
-    /** Constructs 1st basic page.
-      * @param  fImportFromOCIByDefault  Brings whether we should propose import from OCI by default.
-      * @param  strFileName              Brings appliance file name. */
-    UIWizardImportAppPageBasic1(bool fImportFromOCIByDefault, const QString &strFileName);
-
-protected:
-
-    /** Returns wizard this page belongs to. */
-    UIWizardImportApp *wizard() const;
-
-    /** Handles translation event. */
-    virtual void retranslateUi() /* override final */;
-
-    /** Performs page initialization. */
-    virtual void initializePage() /* override final */;
-
-    /** Returns whether page is complete. */
-    virtual bool isComplete() const /* override final */;
-
-    /** Performs page validation. */
-    virtual bool validatePage() /* override final */;
-
-private slots:
-
-    /** Handles source combo change. */
-    void sltHandleSourceComboChange();
-
-    /** Handles profile combo change. */
-    void sltHandleProfileComboChange();
-    /** Handles profile tool-button click. */
-    void sltHandleProfileButtonClick();
-
-private:
-
-    /** Update local stuff. */
-    void updateLocalStuff();
-    /** Updates cloud stuff. */
-    void updateCloudStuff();
-
-    /** Holds whether default source should be Import from OCI. */
-    bool     m_fImportFromOCIByDefault;
-    /** Handles the appliance file name. */
-    QString  m_strFileName;
-
-    /** Holds the cached source. */
-    QString  m_strSource;
-    /** Holds the cached profile name. */
-    QString  m_strProfileName;
-
-    /** Holds the main label instance. */
-    QIRichTextLabel *m_pLabelMain;
-    /** Holds the description label instance. */
-    QIRichTextLabel *m_pLabelDescription;
-
-    /** Holds the source layout instance. */
-    QGridLayout *m_pSourceLayout;
-    /** Holds the source type label instance. */
-    QLabel      *m_pSourceLabel;
-    /** Holds the source type combo-box instance. */
-    QIComboBox  *m_pSourceComboBox;
-
-    /** Holds the settings widget 1 instance. */
-    QStackedWidget *m_pSettingsWidget1;
-
-    /** Holds the local container layout instance. */
-    QGridLayout             *m_pLocalContainerLayout;
-    /** Holds the file label instance. */
-    QLabel                  *m_pFileLabel;
-    /** Holds the file selector instance. */
-    UIEmptyFilePathSelector *m_pFileSelector;
-
-    /** Holds the cloud container layout instance. */
-    QGridLayout  *m_pCloudContainerLayout;
-    /** Holds the profile label instance. */
-    QLabel       *m_pProfileLabel;
-    /** Holds the profile combo-box instance. */
-    QIComboBox   *m_pProfileComboBox;
-    /** Holds the profile management tool-button instance. */
-    QIToolButton *m_pProfileToolButton;
-    /** Holds the profile instance label instance. */
-    QLabel       *m_pProfileInstanceLabel;
-    /** Holds the profile instance list instance. */
-    QListWidget  *m_pProfileInstanceList;
-};
-
-#endif /* !FEQT_INCLUDED_SRC_wizards_importappliance_UIWizardImportAppPageBasic1_h */
Index: unk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic2.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic2.cpp	(revision 91708)
+++ 	(revision )
@@ -1,641 +1,0 @@
-/* $Id$ */
-/** @file
- * VBox Qt GUI - UIWizardImportAppPageBasic2 class implementation.
- */
-
-/*
- * Copyright (C) 2009-2021 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-/* Qt includes: */
-#include <QCheckBox>
-#include <QLabel>
-#include <QStackedWidget>
-#include <QVBoxLayout>
-
-/* GUI includes: */
-#include "QIComboBox.h"
-#include "QIRichTextLabel.h"
-#include "UIApplianceImportEditorWidget.h"
-#include "UIApplianceUnverifiedCertificateViewer.h"
-#include "UICommon.h"
-#include "UIFilePathSelector.h"
-#include "UIFormEditorWidget.h"
-#include "UIMessageCenter.h"
-#include "UIWizardImportApp.h"
-#include "UIWizardImportAppPageBasic2.h"
-
-/* COM includes: */
-#include "CAppliance.h"
-#include "CCertificate.h"
-#include "CSystemProperties.h"
-#include "CVirtualSystemDescriptionForm.h"
-
-/* Namespaces: */
-using namespace UIWizardImportAppPage2;
-
-
-/*********************************************************************************************************************************
-*   Class UIWizardImportAppPage2 implementation.                                                                                 *
-*********************************************************************************************************************************/
-
-void UIWizardImportAppPage2::refreshStackedWidget(QStackedWidget *pStackedWidget,
-                                                  bool fIsSourceCloudOne)
-{
-    /* Sanity check: */
-    AssertPtrReturnVoid(pStackedWidget);
-
-    /* Update stack appearance according to chosen source: */
-    pStackedWidget->setCurrentIndex((int)fIsSourceCloudOne);
-}
-
-void UIWizardImportAppPage2::refreshApplianceWidget(UIApplianceImportEditorWidget *pApplianceWidget,
-                                                    const CAppliance &comAppliance,
-                                                    bool fIsSourceCloudOne)
-{
-    /* Sanity check: */
-    AssertPtrReturnVoid(pApplianceWidget);
-
-    /* If source is cloud one: */
-    if (fIsSourceCloudOne)
-    {
-        /* Clear form: */
-        pApplianceWidget->clear();
-    }
-    /* If source is local one: */
-    else
-    {
-        /* Make sure appliance widget get new appliance: */
-        if (comAppliance.isNotNull())
-            pApplianceWidget->setAppliance(comAppliance);
-    }
-}
-
-void UIWizardImportAppPage2::refreshMACAddressImportPolicies(QIComboBox *pCombo,
-                                                             bool fIsSourceCloudOne)
-{
-    /* Sanity check: */
-    AssertPtrReturnVoid(pCombo);
-
-    /* If source is cloud one: */
-    if (fIsSourceCloudOne)
-    {
-        /* Block signals while updating: */
-        pCombo->blockSignals(true);
-
-        /* Clear combo: */
-        pCombo->clear();
-
-        /* Unblock signals after update: */
-        pCombo->blockSignals(false);
-    }
-    /* If source is local one: */
-    else
-    {
-        /* We need top-level parent as well: */
-        QWidget *pParent = pCombo->window();
-        AssertPtrReturnVoid(pParent);
-
-        /* Map known import options to known MAC address import policies: */
-        QMap<KImportOptions, MACAddressImportPolicy> knownOptions;
-        knownOptions[KImportOptions_KeepAllMACs] = MACAddressImportPolicy_KeepAllMACs;
-        knownOptions[KImportOptions_KeepNATMACs] = MACAddressImportPolicy_KeepNATMACs;
-        /* Load currently supported import options: */
-        const QVector<KImportOptions> supportedOptions =
-            uiCommon().virtualBox().GetSystemProperties().GetSupportedImportOptions();
-        /* Check which of supported options/policies are known: */
-        QList<MACAddressImportPolicy> supportedPolicies;
-        foreach (const KImportOptions &enmOption, supportedOptions)
-            if (knownOptions.contains(enmOption))
-                supportedPolicies << knownOptions.value(enmOption);
-        /* Remember current item data to be able to restore it: */
-        MACAddressImportPolicy enmOldData = MACAddressImportPolicy_MAX;
-        if (pCombo->currentIndex() != -1)
-            enmOldData = pCombo->currentData().value<MACAddressImportPolicy>();
-        else
-        {
-            if (supportedPolicies.contains(MACAddressImportPolicy_KeepNATMACs))
-                enmOldData = MACAddressImportPolicy_KeepNATMACs;
-            else
-                enmOldData = MACAddressImportPolicy_StripAllMACs;
-        }
-
-        /* Block signals while updating: */
-        pCombo->blockSignals(true);
-
-        /* Cleanup combo: */
-        pCombo->clear();
-
-        /* Add supported policies first: */
-        foreach (const MACAddressImportPolicy &enmPolicy, supportedPolicies)
-            pCombo->addItem(QString(), QVariant::fromValue(enmPolicy));
-
-        /* Add hardcoded policy finally: */
-        pCombo->addItem(QString(), QVariant::fromValue(MACAddressImportPolicy_StripAllMACs));
-
-        /* Set previous/default item if possible: */
-        int iNewIndex = -1;
-        if (   iNewIndex == -1
-            && enmOldData != MACAddressImportPolicy_MAX)
-            iNewIndex = pCombo->findData(QVariant::fromValue(enmOldData));
-        if (   iNewIndex == -1
-            && pCombo->count() > 0)
-            iNewIndex = 0;
-        if (iNewIndex != -1)
-            pCombo->setCurrentIndex(iNewIndex);
-
-        /* Unblock signals after update: */
-        pCombo->blockSignals(false);
-
-        /* Translate finally: */
-        retranslateMACImportPolicyCombo(pCombo);
-    }
-}
-
-void UIWizardImportAppPage2::refreshFormPropertiesTable(UIFormEditorWidget *pFormEditor,
-                                                        const CVirtualSystemDescriptionForm &comForm,
-                                                        bool fIsSourceCloudOne)
-{
-    /* Sanity check: */
-    AssertPtrReturnVoid(pFormEditor);
-
-    /* If source is cloud one: */
-    if (fIsSourceCloudOne)
-    {
-        /* Make sure properties table get new description form: */
-        if (comForm.isNotNull())
-            pFormEditor->setVirtualSystemDescriptionForm(comForm);
-    }
-    /* If source is local one: */
-    else
-    {
-        /* Clear form: */
-        pFormEditor->clearForm();
-    }
-}
-
-MACAddressImportPolicy UIWizardImportAppPage2::macAddressImportPolicy(QIComboBox *pCombo)
-{
-    /* Sanity check: */
-    AssertPtrReturn(pCombo, MACAddressImportPolicy_MAX);
-
-    /* Give the actual result: */
-    return pCombo->currentData().value<MACAddressImportPolicy>();
-}
-
-bool UIWizardImportAppPage2::isImportHDsAsVDI(QCheckBox *pCheckBox)
-{
-    /* Sanity check: */
-    AssertPtrReturn(pCheckBox, false);
-
-    /* Give the actual result: */
-    return pCheckBox->isChecked();
-}
-
-void UIWizardImportAppPage2::retranslateMACImportPolicyCombo(QIComboBox *pCombo)
-{
-    /* Sanity check: */
-    AssertPtrReturnVoid(pCombo);
-
-    /* Enumerate combo items: */
-    for (int i = 0; i < pCombo->count(); ++i)
-    {
-        const MACAddressImportPolicy enmPolicy = pCombo->itemData(i).value<MACAddressImportPolicy>();
-        switch (enmPolicy)
-        {
-            case MACAddressImportPolicy_KeepAllMACs:
-            {
-                pCombo->setItemText(i, UIWizardImportApp::tr("Include all network adapter MAC addresses"));
-                pCombo->setItemData(i, UIWizardImportApp::tr("Include all network adapter MAC addresses "
-                                                             "during importing."), Qt::ToolTipRole);
-                break;
-            }
-            case MACAddressImportPolicy_KeepNATMACs:
-            {
-                pCombo->setItemText(i, UIWizardImportApp::tr("Include only NAT network adapter MAC addresses"));
-                pCombo->setItemData(i, UIWizardImportApp::tr("Include only NAT network adapter MAC addresses "
-                                                             "during importing."), Qt::ToolTipRole);
-                break;
-            }
-            case MACAddressImportPolicy_StripAllMACs:
-            {
-                pCombo->setItemText(i, UIWizardImportApp::tr("Generate new MAC addresses for all network adapters"));
-                pCombo->setItemData(i, UIWizardImportApp::tr("Generate new MAC addresses for all network adapters "
-                                                             "during importing."), Qt::ToolTipRole);
-                break;
-            }
-            default:
-                break;
-        }
-    }
-}
-
-void UIWizardImportAppPage2::retranslateCertificateLabel(QLabel *pLabel, const kCertText &enmType, const QString &strSignedBy)
-{
-    /* Sanity check: */
-    AssertPtrReturnVoid(pLabel);
-
-    /* Handle known types: */
-    switch (enmType)
-    {
-        case kCertText_Unsigned:
-            pLabel->setText(UIWizardImportApp::tr("Appliance is not signed"));
-            break;
-        case kCertText_IssuedTrusted:
-            pLabel->setText(UIWizardImportApp::tr("Appliance signed by %1 (trusted)").arg(strSignedBy));
-            break;
-        case kCertText_IssuedExpired:
-            pLabel->setText(UIWizardImportApp::tr("Appliance signed by %1 (expired!)").arg(strSignedBy));
-            break;
-        case kCertText_IssuedUnverified:
-            pLabel->setText(UIWizardImportApp::tr("Unverified signature by %1!").arg(strSignedBy));
-            break;
-        case kCertText_SelfSignedTrusted:
-            pLabel->setText(UIWizardImportApp::tr("Self signed by %1 (trusted)").arg(strSignedBy));
-            break;
-        case kCertText_SelfSignedExpired:
-            pLabel->setText(UIWizardImportApp::tr("Self signed by %1 (expired!)").arg(strSignedBy));
-            break;
-        case kCertText_SelfSignedUnverified:
-            pLabel->setText(UIWizardImportApp::tr("Unverified self signed signature by %1!").arg(strSignedBy));
-            break;
-        default:
-            AssertFailed();
-            RT_FALL_THRU();
-        case kCertText_Uninitialized:
-            pLabel->setText("<uninitialized page>");
-            break;
-    }
-}
-
-void UIWizardImportAppPage2::updateMACImportPolicyComboToolTip(QIComboBox *pCombo)
-{
-    /* Sanity check: */
-    AssertPtrReturnVoid(pCombo);
-
-    /* Update tool-tip: */
-    const QString strCurrentToolTip = pCombo->currentData(Qt::ToolTipRole).toString();
-    pCombo->setToolTip(strCurrentToolTip);
-}
-
-
-/*********************************************************************************************************************************
-*   Class UIWizardImportAppPageBasic2 implementation.                                                                            *
-*********************************************************************************************************************************/
-
-UIWizardImportAppPageBasic2::UIWizardImportAppPageBasic2(const QString &strFileName)
-    : m_strFileName(strFileName)
-    , m_pLabelDescription(0)
-    , m_pSettingsWidget2(0)
-    , m_pApplianceWidget(0)
-    , m_pLabelImportFilePath(0)
-    , m_pEditorImportFilePath(0)
-    , m_pLabelMACImportPolicy(0)
-    , m_pComboMACImportPolicy(0)
-    , m_pLabelAdditionalOptions(0)
-    , m_pCheckboxImportHDsAsVDI(0)
-    , m_pCertLabel(0)
-    , m_enmCertText(kCertText_Uninitialized)
-    , m_pFormEditor(0)
-{
-    /* Create main layout: */
-    QVBoxLayout *pMainLayout = new QVBoxLayout(this);
-    if (pMainLayout)
-    {
-        /* Prepare label: */
-        m_pLabelDescription = new QIRichTextLabel(this);
-        if (m_pLabelDescription)
-            pMainLayout->addWidget(m_pLabelDescription);
-
-        /* Prepare settings widget 2: */
-        m_pSettingsWidget2 = new QStackedWidget(this);
-        if (m_pSettingsWidget2)
-        {
-            /* Prepare appliance container: */
-            QWidget *pContainerAppliance = new QWidget(m_pSettingsWidget2);
-            if (pContainerAppliance)
-            {
-                /* Prepare appliance layout: */
-                QGridLayout *pLayoutAppliance = new QGridLayout(pContainerAppliance);
-                if (pLayoutAppliance)
-                {
-                    pLayoutAppliance->setContentsMargins(0, 0, 0, 0);
-                    pLayoutAppliance->setColumnStretch(0, 0);
-                    pLayoutAppliance->setColumnStretch(1, 1);
-
-                    /* Prepare appliance widget: */
-                    m_pApplianceWidget = new UIApplianceImportEditorWidget(pContainerAppliance);
-                    if (m_pApplianceWidget)
-                    {
-                        m_pApplianceWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding);
-                        pLayoutAppliance->addWidget(m_pApplianceWidget, 0, 0, 1, 3);
-                    }
-
-                    /* Prepare path selector label: */
-                    m_pLabelImportFilePath = new QLabel(pContainerAppliance);
-                    if (m_pLabelImportFilePath)
-                    {
-                        m_pLabelImportFilePath->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
-                        pLayoutAppliance->addWidget(m_pLabelImportFilePath, 1, 0);
-                    }
-                    /* Prepare path selector editor: */
-                    m_pEditorImportFilePath = new UIFilePathSelector(pContainerAppliance);
-                    if (m_pEditorImportFilePath)
-                    {
-                        m_pEditorImportFilePath->setResetEnabled(true);
-                        m_pEditorImportFilePath->setDefaultPath(uiCommon().virtualBox().GetSystemProperties().GetDefaultMachineFolder());
-                        m_pEditorImportFilePath->setPath(uiCommon().virtualBox().GetSystemProperties().GetDefaultMachineFolder());
-                        m_pLabelImportFilePath->setBuddy(m_pEditorImportFilePath);
-                        pLayoutAppliance->addWidget(m_pEditorImportFilePath, 1, 1, 1, 2);
-                    }
-
-                    /* Prepare MAC address policy label: */
-                    m_pLabelMACImportPolicy = new QLabel(pContainerAppliance);
-                    if (m_pLabelMACImportPolicy)
-                    {
-                        m_pLabelMACImportPolicy->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
-                        pLayoutAppliance->addWidget(m_pLabelMACImportPolicy, 2, 0);
-                    }
-                    /* Prepare MAC address policy combo: */
-                    m_pComboMACImportPolicy = new QIComboBox(pContainerAppliance);
-                    if (m_pComboMACImportPolicy)
-                    {
-                        m_pComboMACImportPolicy->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
-                        m_pLabelMACImportPolicy->setBuddy(m_pComboMACImportPolicy);
-                        pLayoutAppliance->addWidget(m_pComboMACImportPolicy, 2, 1, 1, 2);
-                    }
-
-                    /* Prepare additional options label: */
-                    m_pLabelAdditionalOptions = new QLabel(pContainerAppliance);
-                    if (m_pLabelAdditionalOptions)
-                    {
-                        m_pLabelAdditionalOptions->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
-                        pLayoutAppliance->addWidget(m_pLabelAdditionalOptions, 3, 0);
-                    }
-                    /* Prepare import HDs as VDIs checkbox: */
-                    m_pCheckboxImportHDsAsVDI = new QCheckBox(pContainerAppliance);
-                    {
-                        m_pCheckboxImportHDsAsVDI->setCheckState(Qt::Checked);
-                        pLayoutAppliance->addWidget(m_pCheckboxImportHDsAsVDI, 3, 1);
-                    }
-
-                    /* Prepare certificate label: */
-                    m_pCertLabel = new QLabel(pContainerAppliance);
-                    if (m_pCertLabel)
-                        pLayoutAppliance->addWidget(m_pCertLabel, 4, 0, 1, 3);
-                }
-
-                /* Add into widget: */
-                m_pSettingsWidget2->addWidget(pContainerAppliance);
-            }
-
-            /* Prepare form editor container: */
-            QWidget *pContainerFormEditor = new QWidget(m_pSettingsWidget2);
-            if (pContainerFormEditor)
-            {
-                /* Prepare form editor layout: */
-                QVBoxLayout *pLayoutFormEditor = new QVBoxLayout(pContainerFormEditor);
-                if (pLayoutFormEditor)
-                {
-                    pLayoutFormEditor->setContentsMargins(0, 0, 0, 0);
-
-                    /* Prepare form editor widget: */
-                    m_pFormEditor = new UIFormEditorWidget(pContainerFormEditor);
-                    if (m_pFormEditor)
-                        pLayoutFormEditor->addWidget(m_pFormEditor);
-                }
-
-                /* Add into widget: */
-                m_pSettingsWidget2->addWidget(pContainerFormEditor);
-            }
-
-            /* Add into layout: */
-            pMainLayout->addWidget(m_pSettingsWidget2);
-        }
-    }
-
-    /* Setup connections: */
-    connect(m_pEditorImportFilePath, &UIFilePathSelector::pathChanged,
-            this, &UIWizardImportAppPageBasic2::sltHandleImportPathEditorChange);
-    connect(m_pComboMACImportPolicy, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),
-            this, &UIWizardImportAppPageBasic2::sltHandleMACImportPolicyComboChange);
-    connect(m_pCheckboxImportHDsAsVDI, &QCheckBox::stateChanged,
-            this, &UIWizardImportAppPageBasic2::sltHandleImportHDsAsVDICheckBoxChange);
-}
-
-UIWizardImportApp *UIWizardImportAppPageBasic2::wizard() const
-{
-    return qobject_cast<UIWizardImportApp*>(UINativeWizardPage::wizard());
-}
-
-void UIWizardImportAppPageBasic2::retranslateUi()
-{
-    /* Translate page: */
-    setTitle(UIWizardImportApp::tr("Appliance settings"));
-
-    /* Translate description label: */
-    if (m_pLabelDescription)
-    {
-        if (wizard()->isSourceCloudOne())
-            m_pLabelDescription->setText(UIWizardImportApp::tr("These are the the suggested settings of the cloud VM import "
-                                                               "procedure, they are influencing the resulting local VM instance. "
-                                                               "You can change many of the properties shown by double-clicking "
-                                                               "on the items and disable others using the check boxes below."));
-        else
-            m_pLabelDescription->setText(UIWizardImportApp::tr("These are the virtual machines contained in the appliance "
-                                                               "and the suggested settings of the imported VirtualBox machines. "
-                                                               "You can change many of the properties shown by double-clicking "
-                                                               "on the items and disable others using the check boxes below."));
-    }
-
-    /* Translate path selector label: */
-    if (m_pLabelImportFilePath)
-        m_pLabelImportFilePath->setText(tr("&Machine Base Folder:"));
-
-    /* Translate MAC import policy label: */
-    if (m_pLabelMACImportPolicy)
-        m_pLabelMACImportPolicy->setText(tr("MAC Address &Policy:"));
-
-    /* Translate additional options label: */
-    if (m_pLabelAdditionalOptions)
-        m_pLabelAdditionalOptions->setText(tr("Additional Options:"));
-    /* Translate additional option check-box: */
-    if (m_pCheckboxImportHDsAsVDI)
-    {
-        m_pCheckboxImportHDsAsVDI->setText(tr("&Import hard drives as VDI"));
-        m_pCheckboxImportHDsAsVDI->setToolTip(tr("Import all the hard drives that belong to this appliance in VDI format."));
-    }
-
-    /* Translate separate stuff: */
-    retranslateMACImportPolicyCombo(m_pComboMACImportPolicy);
-    retranslateCertificateLabel(m_pCertLabel, m_enmCertText, m_strSignedBy);
-
-    /* Update tool-tips: */
-    updateMACImportPolicyComboToolTip(m_pComboMACImportPolicy);
-}
-
-void UIWizardImportAppPageBasic2::initializePage()
-{
-    /* Translate page: */
-    retranslateUi();
-
-    /* Choose initially focused widget: */
-    if (wizard()->isSourceCloudOne())
-        m_pFormEditor->setFocus();
-    else
-        m_pApplianceWidget->setFocus();
-
-    /* Fetch it, asynchronously: */
-    QMetaObject::invokeMethod(this, "sltAsyncInit", Qt::QueuedConnection);
-}
-
-bool UIWizardImportAppPageBasic2::validatePage()
-{
-    /* Initial result: */
-    bool fResult = true;
-
-    /* Check whether there was cloud source selected: */
-    if (wizard()->isSourceCloudOne())
-    {
-        /* Make sure table has own data committed: */
-        m_pFormEditor->makeSureEditorDataCommitted();
-
-        /* Check whether we have proper VSD form: */
-        CVirtualSystemDescriptionForm comForm = wizard()->vsdImportForm();
-        fResult = comForm.isNotNull();
-
-        /* Give changed VSD back to appliance: */
-        if (fResult)
-        {
-            comForm.GetVirtualSystemDescription();
-            fResult = comForm.isOk();
-            if (!fResult)
-                msgCenter().cannotAcquireVirtualSystemDescriptionFormProperty(comForm);
-        }
-    }
-    else
-    {
-        /* Make sure widget has own data committed: */
-        m_pApplianceWidget->prepareImport();
-    }
-
-    /* Try to import appliance: */
-    if (fResult)
-        fResult = wizard()->importAppliance();
-
-    /* Return result: */
-    return fResult;
-}
-
-void UIWizardImportAppPageBasic2::sltAsyncInit()
-{
-    /* If we have file name passed,
-     * check if specified file contains valid appliance: */
-    if (   !m_strFileName.isEmpty()
-        && !wizard()->setFile(m_strFileName))
-    {
-        wizard()->reject();
-        return;
-    }
-
-    /* Refresh page widgets: */
-    refreshStackedWidget(m_pSettingsWidget2,
-                         wizard()->isSourceCloudOne());
-    refreshApplianceWidget(m_pApplianceWidget,
-                           wizard()->localAppliance(),
-                           wizard()->isSourceCloudOne());
-    refreshMACAddressImportPolicies(m_pComboMACImportPolicy,
-                                    wizard()->isSourceCloudOne());
-    refreshFormPropertiesTable(m_pFormEditor,
-                               wizard()->vsdImportForm(),
-                               wizard()->isSourceCloudOne());
-
-    /* Init wizard fields: */
-    sltHandleImportPathEditorChange();
-    sltHandleMACImportPolicyComboChange();
-    sltHandleImportHDsAsVDICheckBoxChange();
-
-    /* Handle appliance certificate: */
-    if (!wizard()->isSourceCloudOne())
-        handleApplianceCertificate();
-}
-
-void UIWizardImportAppPageBasic2::sltHandleImportPathEditorChange()
-{
-    AssertPtrReturnVoid(m_pApplianceWidget);
-    AssertPtrReturnVoid(m_pEditorImportFilePath);
-    m_pApplianceWidget->setVirtualSystemBaseFolder(m_pEditorImportFilePath->path());
-}
-
-void UIWizardImportAppPageBasic2::sltHandleMACImportPolicyComboChange()
-{
-    /* Update combo tool-tip: */
-    updateMACImportPolicyComboToolTip(m_pComboMACImportPolicy);
-
-    /* Update wizard fields: */
-    wizard()->setMACAddressImportPolicy(macAddressImportPolicy(m_pComboMACImportPolicy));
-}
-
-void UIWizardImportAppPageBasic2::sltHandleImportHDsAsVDICheckBoxChange()
-{
-    /* Update wizard fields: */
-    wizard()->setImportHDsAsVDI(isImportHDsAsVDI(m_pCheckboxImportHDsAsVDI));
-}
-
-void UIWizardImportAppPageBasic2::handleApplianceCertificate()
-{
-    /* Handle certificate: */
-    CAppliance comAppliance = wizard()->localAppliance();
-    CCertificate comCertificate = comAppliance.GetCertificate();
-    if (comCertificate.isNull())
-        m_enmCertText = kCertText_Unsigned;
-    else
-    {
-        /* Pick a 'signed-by' name: */
-        m_strSignedBy = comCertificate.GetFriendlyName();
-
-        /* If trusted, just select the right message: */
-        if (comCertificate.GetTrusted())
-        {
-            if (comCertificate.GetSelfSigned())
-                m_enmCertText = !comCertificate.GetExpired() ? kCertText_SelfSignedTrusted : kCertText_SelfSignedExpired;
-            else
-                m_enmCertText = !comCertificate.GetExpired() ? kCertText_IssuedTrusted     : kCertText_IssuedExpired;
-        }
-        else
-        {
-            /* Not trusted!  Must ask the user whether to continue in this case: */
-            m_enmCertText = comCertificate.GetSelfSigned() ? kCertText_SelfSignedUnverified : kCertText_IssuedUnverified;
-
-            /* Translate page early: */
-            retranslateUi();
-
-            /* Instantiate the dialog: */
-            QPointer<UIApplianceUnverifiedCertificateViewer> pDialog =
-                new UIApplianceUnverifiedCertificateViewer(this, comCertificate);
-
-            /* Show viewer in modal mode: */
-            const int iResultCode = pDialog->exec();
-            /* Leave if viewer destroyed prematurely: */
-            if (!pDialog)
-                return;
-            /* Delete viewer finally: */
-            delete pDialog;
-
-            /* Dismiss the entire import-appliance wizard if user rejects certificate: */
-            if (iResultCode == QDialog::Rejected)
-                wizard()->reject();
-        }
-    }
-
-    /* Translate certificate label: */
-    retranslateCertificateLabel(m_pCertLabel, m_enmCertText, m_strSignedBy);
-}
Index: unk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic2.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic2.h	(revision 91708)
+++ 	(revision )
@@ -1,164 +1,0 @@
-/* $Id$ */
-/** @file
- * VBox Qt GUI - UIWizardImportAppPageBasic2 class declaration.
- */
-
-/*
- * Copyright (C) 2009-2021 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-#ifndef FEQT_INCLUDED_SRC_wizards_importappliance_UIWizardImportAppPageBasic2_h
-#define FEQT_INCLUDED_SRC_wizards_importappliance_UIWizardImportAppPageBasic2_h
-#ifndef RT_WITHOUT_PRAGMA_ONCE
-# pragma once
-#endif
-
-/* GUI includes: */
-#include "UINativeWizardPage.h"
-#include "UIWizardImportApp.h"
-
-/* Forward declarations: */
-class QCheckBox;
-class QIComboBox;
-class QLabel;
-class QStackedWidget;
-class QIRichTextLabel;
-class UIApplianceImportEditorWidget;
-class UIFilePathSelector;
-class UIFormEditorWidget;
-
-/** Certificate text template types. */
-enum kCertText
-{
-    kCertText_Uninitialized = 0,
-    kCertText_Unsigned,
-    kCertText_IssuedTrusted,
-    kCertText_IssuedExpired,
-    kCertText_IssuedUnverified,
-    kCertText_SelfSignedTrusted,
-    kCertText_SelfSignedExpired,
-    kCertText_SelfSignedUnverified
-};
-
-/** Namespace for 2nd basic page of the Import Appliance wizard. */
-namespace UIWizardImportAppPage2
-{
-    /** Refresh stacked widget. */
-    void refreshStackedWidget(QStackedWidget *pStackedWidget,
-                              bool fIsSourceCloudOne);
-
-    /** Refreshes appliance widget. */
-    void refreshApplianceWidget(UIApplianceImportEditorWidget *pApplianceWidget,
-                                const CAppliance &comAppliance,
-                                bool fIsSourceCloudOne);
-    /** Refresh MAC address import policies. */
-    void refreshMACAddressImportPolicies(QIComboBox *pCombo,
-                                         bool fIsSourceCloudOne);
-
-    /** Refreshes form properties table. */
-    void refreshFormPropertiesTable(UIFormEditorWidget *pFormEditor,
-                                    const CVirtualSystemDescriptionForm &comForm,
-                                    bool fIsSourceCloudOne);
-
-    /** Returns MAC address import policy. */
-    MACAddressImportPolicy macAddressImportPolicy(QIComboBox *pCombo);
-    /** Returns whether hard disks should be imported as VDIs. */
-    bool isImportHDsAsVDI(QCheckBox *pCheckBox);
-
-    /** Translates MAC import policy combo. */
-    void retranslateMACImportPolicyCombo(QIComboBox *pCombo);
-    /** Translates certificate label. */
-    void retranslateCertificateLabel(QLabel *pLabel, const kCertText &enmType, const QString &strSignedBy);
-
-    /** Updates MAC import policy combo tool-tips. */
-    void updateMACImportPolicyComboToolTip(QIComboBox *pCombo);
-}
-
-/** UINativeWizardPage extension for 2nd basic page of the Import Appliance wizard,
-  * based on UIWizardImportAppPage2 namespace functions. */
-class UIWizardImportAppPageBasic2 : public UINativeWizardPage
-{
-    Q_OBJECT;
-
-public:
-
-    /** Constructs 2nd basic page.
-      * @param  strFileName  Brings appliance file name. */
-    UIWizardImportAppPageBasic2(const QString &strFileName);
-
-protected:
-
-    /** Returns wizard this page belongs to. */
-    UIWizardImportApp *wizard() const;
-
-    /** Handles translation event. */
-    virtual void retranslateUi() /* override final */;
-
-    /** Performs page initialization. */
-    virtual void initializePage() /* override final */;
-
-    /** Performs page validation. */
-    virtual bool validatePage() /* override final */;
-
-private slots:
-
-    /** Inits page async way. */
-    void sltAsyncInit();
-
-    /** Handles import path editor change. */
-    void sltHandleImportPathEditorChange();
-    /** Handles MAC address import policy combo change. */
-    void sltHandleMACImportPolicyComboChange();
-    /** Handles import HDs as VDI check-box change. */
-    void sltHandleImportHDsAsVDICheckBoxChange();
-
-private:
-
-    /** Handles appliance certificate. */
-    void handleApplianceCertificate();
-
-    /** Handles the appliance file name. */
-    QString  m_strFileName;
-
-    /** Holds the description label instance. */
-    QIRichTextLabel *m_pLabelDescription;
-
-    /** Holds the settings widget 2 instance. */
-    QStackedWidget *m_pSettingsWidget2;
-
-    /** Holds the appliance widget instance. */
-    UIApplianceImportEditorWidget *m_pApplianceWidget;
-    /** Holds the import file-path label instance. */
-    QLabel                        *m_pLabelImportFilePath;
-    /** Holds the import file-path editor instance. */
-    UIFilePathSelector            *m_pEditorImportFilePath;
-    /** Holds the MAC address label instance. */
-    QLabel                        *m_pLabelMACImportPolicy;
-    /** Holds the MAC address combo instance. */
-    QIComboBox                    *m_pComboMACImportPolicy;
-    /** Holds the additional options label instance. */
-    QLabel                        *m_pLabelAdditionalOptions;
-    /** Holds the 'import HDs as VDI' checkbox instance. */
-    QCheckBox                     *m_pCheckboxImportHDsAsVDI;
-    /** Holds the signature/certificate info label instance. */
-    QLabel                        *m_pCertLabel;
-
-    /** Holds the certificate text template type. */
-    kCertText  m_enmCertText;
-
-    /** Holds the "signed by" information. */
-    QString  m_strSignedBy;
-
-    /** Holds the Form Editor widget instance. */
-    UIFormEditorWidget *m_pFormEditor;
-};
-
-#endif /* !FEQT_INCLUDED_SRC_wizards_importappliance_UIWizardImportAppPageBasic2_h */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.cpp	(revision 91708)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.cpp	(revision 91709)
@@ -41,7 +41,7 @@
 #include "UIVirtualBoxManager.h"
 #include "UIWizardImportApp.h"
-#include "UIWizardImportAppPageBasic1.h"
-#include "UIWizardImportAppPageBasic2.h"
 #include "UIWizardImportAppPageExpert.h"
+#include "UIWizardImportAppPageSettings.h"
+#include "UIWizardImportAppPageSource.h"
 
 /* COM includes: */
@@ -49,6 +49,6 @@
 
 /* Namespaces: */
-using namespace UIWizardImportAppPage1;
-using namespace UIWizardImportAppPage2;
+using namespace UIWizardImportAppSettings;
+using namespace UIWizardImportAppSource;
 
 
@@ -507,8 +507,8 @@
 
     /* Refresh page widgets: */
-    UIWizardImportAppPage1::refreshStackedWidget(m_pSettingsWidget1,
-                                                 wizard()->isSourceCloudOne());
-    UIWizardImportAppPage2::refreshStackedWidget(m_pSettingsWidget2,
-                                                 wizard()->isSourceCloudOne());
+    UIWizardImportAppSource::refreshStackedWidget(m_pSettingsWidget1,
+                                                  wizard()->isSourceCloudOne());
+    UIWizardImportAppSettings::refreshStackedWidget(m_pSettingsWidget2,
+                                                    wizard()->isSourceCloudOne());
 
     // WORKAROUND:
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.h	(revision 91708)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.h	(revision 91709)
@@ -41,5 +41,5 @@
 
 /** UINativeWizardPage extension for expert page of the Import Appliance wizard,
-  * based on UIWizardImportAppPage1 & UIWizardImportAppPage2 namespace functions. */
+  * based on UIWizardImportAppSource & UIWizardImportAppSettings namespace functions. */
 class UIWizardImportAppPageExpert : public UINativeWizardPage
 {
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageSettings.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageSettings.cpp	(revision 91709)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageSettings.cpp	(revision 91709)
@@ -0,0 +1,641 @@
+/* $Id$ */
+/** @file
+ * VBox Qt GUI - UIWizardImportAppPageSettings class implementation.
+ */
+
+/*
+ * Copyright (C) 2009-2021 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+/* Qt includes: */
+#include <QCheckBox>
+#include <QLabel>
+#include <QStackedWidget>
+#include <QVBoxLayout>
+
+/* GUI includes: */
+#include "QIComboBox.h"
+#include "QIRichTextLabel.h"
+#include "UIApplianceImportEditorWidget.h"
+#include "UIApplianceUnverifiedCertificateViewer.h"
+#include "UICommon.h"
+#include "UIFilePathSelector.h"
+#include "UIFormEditorWidget.h"
+#include "UIMessageCenter.h"
+#include "UIWizardImportApp.h"
+#include "UIWizardImportAppPageSettings.h"
+
+/* COM includes: */
+#include "CAppliance.h"
+#include "CCertificate.h"
+#include "CSystemProperties.h"
+#include "CVirtualSystemDescriptionForm.h"
+
+/* Namespaces: */
+using namespace UIWizardImportAppSettings;
+
+
+/*********************************************************************************************************************************
+*   Class UIWizardImportAppSettings implementation.                                                                              *
+*********************************************************************************************************************************/
+
+void UIWizardImportAppSettings::refreshStackedWidget(QStackedWidget *pStackedWidget,
+                                                     bool fIsSourceCloudOne)
+{
+    /* Sanity check: */
+    AssertPtrReturnVoid(pStackedWidget);
+
+    /* Update stack appearance according to chosen source: */
+    pStackedWidget->setCurrentIndex((int)fIsSourceCloudOne);
+}
+
+void UIWizardImportAppSettings::refreshApplianceWidget(UIApplianceImportEditorWidget *pApplianceWidget,
+                                                       const CAppliance &comAppliance,
+                                                       bool fIsSourceCloudOne)
+{
+    /* Sanity check: */
+    AssertPtrReturnVoid(pApplianceWidget);
+
+    /* If source is cloud one: */
+    if (fIsSourceCloudOne)
+    {
+        /* Clear form: */
+        pApplianceWidget->clear();
+    }
+    /* If source is local one: */
+    else
+    {
+        /* Make sure appliance widget get new appliance: */
+        if (comAppliance.isNotNull())
+            pApplianceWidget->setAppliance(comAppliance);
+    }
+}
+
+void UIWizardImportAppSettings::refreshMACAddressImportPolicies(QIComboBox *pCombo,
+                                                                bool fIsSourceCloudOne)
+{
+    /* Sanity check: */
+    AssertPtrReturnVoid(pCombo);
+
+    /* If source is cloud one: */
+    if (fIsSourceCloudOne)
+    {
+        /* Block signals while updating: */
+        pCombo->blockSignals(true);
+
+        /* Clear combo: */
+        pCombo->clear();
+
+        /* Unblock signals after update: */
+        pCombo->blockSignals(false);
+    }
+    /* If source is local one: */
+    else
+    {
+        /* We need top-level parent as well: */
+        QWidget *pParent = pCombo->window();
+        AssertPtrReturnVoid(pParent);
+
+        /* Map known import options to known MAC address import policies: */
+        QMap<KImportOptions, MACAddressImportPolicy> knownOptions;
+        knownOptions[KImportOptions_KeepAllMACs] = MACAddressImportPolicy_KeepAllMACs;
+        knownOptions[KImportOptions_KeepNATMACs] = MACAddressImportPolicy_KeepNATMACs;
+        /* Load currently supported import options: */
+        const QVector<KImportOptions> supportedOptions =
+            uiCommon().virtualBox().GetSystemProperties().GetSupportedImportOptions();
+        /* Check which of supported options/policies are known: */
+        QList<MACAddressImportPolicy> supportedPolicies;
+        foreach (const KImportOptions &enmOption, supportedOptions)
+            if (knownOptions.contains(enmOption))
+                supportedPolicies << knownOptions.value(enmOption);
+        /* Remember current item data to be able to restore it: */
+        MACAddressImportPolicy enmOldData = MACAddressImportPolicy_MAX;
+        if (pCombo->currentIndex() != -1)
+            enmOldData = pCombo->currentData().value<MACAddressImportPolicy>();
+        else
+        {
+            if (supportedPolicies.contains(MACAddressImportPolicy_KeepNATMACs))
+                enmOldData = MACAddressImportPolicy_KeepNATMACs;
+            else
+                enmOldData = MACAddressImportPolicy_StripAllMACs;
+        }
+
+        /* Block signals while updating: */
+        pCombo->blockSignals(true);
+
+        /* Cleanup combo: */
+        pCombo->clear();
+
+        /* Add supported policies first: */
+        foreach (const MACAddressImportPolicy &enmPolicy, supportedPolicies)
+            pCombo->addItem(QString(), QVariant::fromValue(enmPolicy));
+
+        /* Add hardcoded policy finally: */
+        pCombo->addItem(QString(), QVariant::fromValue(MACAddressImportPolicy_StripAllMACs));
+
+        /* Set previous/default item if possible: */
+        int iNewIndex = -1;
+        if (   iNewIndex == -1
+            && enmOldData != MACAddressImportPolicy_MAX)
+            iNewIndex = pCombo->findData(QVariant::fromValue(enmOldData));
+        if (   iNewIndex == -1
+            && pCombo->count() > 0)
+            iNewIndex = 0;
+        if (iNewIndex != -1)
+            pCombo->setCurrentIndex(iNewIndex);
+
+        /* Unblock signals after update: */
+        pCombo->blockSignals(false);
+
+        /* Translate finally: */
+        retranslateMACImportPolicyCombo(pCombo);
+    }
+}
+
+void UIWizardImportAppSettings::refreshFormPropertiesTable(UIFormEditorWidget *pFormEditor,
+                                                           const CVirtualSystemDescriptionForm &comForm,
+                                                           bool fIsSourceCloudOne)
+{
+    /* Sanity check: */
+    AssertPtrReturnVoid(pFormEditor);
+
+    /* If source is cloud one: */
+    if (fIsSourceCloudOne)
+    {
+        /* Make sure properties table get new description form: */
+        if (comForm.isNotNull())
+            pFormEditor->setVirtualSystemDescriptionForm(comForm);
+    }
+    /* If source is local one: */
+    else
+    {
+        /* Clear form: */
+        pFormEditor->clearForm();
+    }
+}
+
+MACAddressImportPolicy UIWizardImportAppSettings::macAddressImportPolicy(QIComboBox *pCombo)
+{
+    /* Sanity check: */
+    AssertPtrReturn(pCombo, MACAddressImportPolicy_MAX);
+
+    /* Give the actual result: */
+    return pCombo->currentData().value<MACAddressImportPolicy>();
+}
+
+bool UIWizardImportAppSettings::isImportHDsAsVDI(QCheckBox *pCheckBox)
+{
+    /* Sanity check: */
+    AssertPtrReturn(pCheckBox, false);
+
+    /* Give the actual result: */
+    return pCheckBox->isChecked();
+}
+
+void UIWizardImportAppSettings::retranslateMACImportPolicyCombo(QIComboBox *pCombo)
+{
+    /* Sanity check: */
+    AssertPtrReturnVoid(pCombo);
+
+    /* Enumerate combo items: */
+    for (int i = 0; i < pCombo->count(); ++i)
+    {
+        const MACAddressImportPolicy enmPolicy = pCombo->itemData(i).value<MACAddressImportPolicy>();
+        switch (enmPolicy)
+        {
+            case MACAddressImportPolicy_KeepAllMACs:
+            {
+                pCombo->setItemText(i, UIWizardImportApp::tr("Include all network adapter MAC addresses"));
+                pCombo->setItemData(i, UIWizardImportApp::tr("Include all network adapter MAC addresses "
+                                                             "during importing."), Qt::ToolTipRole);
+                break;
+            }
+            case MACAddressImportPolicy_KeepNATMACs:
+            {
+                pCombo->setItemText(i, UIWizardImportApp::tr("Include only NAT network adapter MAC addresses"));
+                pCombo->setItemData(i, UIWizardImportApp::tr("Include only NAT network adapter MAC addresses "
+                                                             "during importing."), Qt::ToolTipRole);
+                break;
+            }
+            case MACAddressImportPolicy_StripAllMACs:
+            {
+                pCombo->setItemText(i, UIWizardImportApp::tr("Generate new MAC addresses for all network adapters"));
+                pCombo->setItemData(i, UIWizardImportApp::tr("Generate new MAC addresses for all network adapters "
+                                                             "during importing."), Qt::ToolTipRole);
+                break;
+            }
+            default:
+                break;
+        }
+    }
+}
+
+void UIWizardImportAppSettings::retranslateCertificateLabel(QLabel *pLabel, const kCertText &enmType, const QString &strSignedBy)
+{
+    /* Sanity check: */
+    AssertPtrReturnVoid(pLabel);
+
+    /* Handle known types: */
+    switch (enmType)
+    {
+        case kCertText_Unsigned:
+            pLabel->setText(UIWizardImportApp::tr("Appliance is not signed"));
+            break;
+        case kCertText_IssuedTrusted:
+            pLabel->setText(UIWizardImportApp::tr("Appliance signed by %1 (trusted)").arg(strSignedBy));
+            break;
+        case kCertText_IssuedExpired:
+            pLabel->setText(UIWizardImportApp::tr("Appliance signed by %1 (expired!)").arg(strSignedBy));
+            break;
+        case kCertText_IssuedUnverified:
+            pLabel->setText(UIWizardImportApp::tr("Unverified signature by %1!").arg(strSignedBy));
+            break;
+        case kCertText_SelfSignedTrusted:
+            pLabel->setText(UIWizardImportApp::tr("Self signed by %1 (trusted)").arg(strSignedBy));
+            break;
+        case kCertText_SelfSignedExpired:
+            pLabel->setText(UIWizardImportApp::tr("Self signed by %1 (expired!)").arg(strSignedBy));
+            break;
+        case kCertText_SelfSignedUnverified:
+            pLabel->setText(UIWizardImportApp::tr("Unverified self signed signature by %1!").arg(strSignedBy));
+            break;
+        default:
+            AssertFailed();
+            RT_FALL_THRU();
+        case kCertText_Uninitialized:
+            pLabel->setText("<uninitialized page>");
+            break;
+    }
+}
+
+void UIWizardImportAppSettings::updateMACImportPolicyComboToolTip(QIComboBox *pCombo)
+{
+    /* Sanity check: */
+    AssertPtrReturnVoid(pCombo);
+
+    /* Update tool-tip: */
+    const QString strCurrentToolTip = pCombo->currentData(Qt::ToolTipRole).toString();
+    pCombo->setToolTip(strCurrentToolTip);
+}
+
+
+/*********************************************************************************************************************************
+*   Class UIWizardImportAppPageSettings implementation.                                                                          *
+*********************************************************************************************************************************/
+
+UIWizardImportAppPageSettings::UIWizardImportAppPageSettings(const QString &strFileName)
+    : m_strFileName(strFileName)
+    , m_pLabelDescription(0)
+    , m_pSettingsWidget2(0)
+    , m_pApplianceWidget(0)
+    , m_pLabelImportFilePath(0)
+    , m_pEditorImportFilePath(0)
+    , m_pLabelMACImportPolicy(0)
+    , m_pComboMACImportPolicy(0)
+    , m_pLabelAdditionalOptions(0)
+    , m_pCheckboxImportHDsAsVDI(0)
+    , m_pCertLabel(0)
+    , m_enmCertText(kCertText_Uninitialized)
+    , m_pFormEditor(0)
+{
+    /* Create main layout: */
+    QVBoxLayout *pMainLayout = new QVBoxLayout(this);
+    if (pMainLayout)
+    {
+        /* Prepare label: */
+        m_pLabelDescription = new QIRichTextLabel(this);
+        if (m_pLabelDescription)
+            pMainLayout->addWidget(m_pLabelDescription);
+
+        /* Prepare settings widget 2: */
+        m_pSettingsWidget2 = new QStackedWidget(this);
+        if (m_pSettingsWidget2)
+        {
+            /* Prepare appliance container: */
+            QWidget *pContainerAppliance = new QWidget(m_pSettingsWidget2);
+            if (pContainerAppliance)
+            {
+                /* Prepare appliance layout: */
+                QGridLayout *pLayoutAppliance = new QGridLayout(pContainerAppliance);
+                if (pLayoutAppliance)
+                {
+                    pLayoutAppliance->setContentsMargins(0, 0, 0, 0);
+                    pLayoutAppliance->setColumnStretch(0, 0);
+                    pLayoutAppliance->setColumnStretch(1, 1);
+
+                    /* Prepare appliance widget: */
+                    m_pApplianceWidget = new UIApplianceImportEditorWidget(pContainerAppliance);
+                    if (m_pApplianceWidget)
+                    {
+                        m_pApplianceWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding);
+                        pLayoutAppliance->addWidget(m_pApplianceWidget, 0, 0, 1, 3);
+                    }
+
+                    /* Prepare path selector label: */
+                    m_pLabelImportFilePath = new QLabel(pContainerAppliance);
+                    if (m_pLabelImportFilePath)
+                    {
+                        m_pLabelImportFilePath->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
+                        pLayoutAppliance->addWidget(m_pLabelImportFilePath, 1, 0);
+                    }
+                    /* Prepare path selector editor: */
+                    m_pEditorImportFilePath = new UIFilePathSelector(pContainerAppliance);
+                    if (m_pEditorImportFilePath)
+                    {
+                        m_pEditorImportFilePath->setResetEnabled(true);
+                        m_pEditorImportFilePath->setDefaultPath(uiCommon().virtualBox().GetSystemProperties().GetDefaultMachineFolder());
+                        m_pEditorImportFilePath->setPath(uiCommon().virtualBox().GetSystemProperties().GetDefaultMachineFolder());
+                        m_pLabelImportFilePath->setBuddy(m_pEditorImportFilePath);
+                        pLayoutAppliance->addWidget(m_pEditorImportFilePath, 1, 1, 1, 2);
+                    }
+
+                    /* Prepare MAC address policy label: */
+                    m_pLabelMACImportPolicy = new QLabel(pContainerAppliance);
+                    if (m_pLabelMACImportPolicy)
+                    {
+                        m_pLabelMACImportPolicy->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
+                        pLayoutAppliance->addWidget(m_pLabelMACImportPolicy, 2, 0);
+                    }
+                    /* Prepare MAC address policy combo: */
+                    m_pComboMACImportPolicy = new QIComboBox(pContainerAppliance);
+                    if (m_pComboMACImportPolicy)
+                    {
+                        m_pComboMACImportPolicy->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
+                        m_pLabelMACImportPolicy->setBuddy(m_pComboMACImportPolicy);
+                        pLayoutAppliance->addWidget(m_pComboMACImportPolicy, 2, 1, 1, 2);
+                    }
+
+                    /* Prepare additional options label: */
+                    m_pLabelAdditionalOptions = new QLabel(pContainerAppliance);
+                    if (m_pLabelAdditionalOptions)
+                    {
+                        m_pLabelAdditionalOptions->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
+                        pLayoutAppliance->addWidget(m_pLabelAdditionalOptions, 3, 0);
+                    }
+                    /* Prepare import HDs as VDIs checkbox: */
+                    m_pCheckboxImportHDsAsVDI = new QCheckBox(pContainerAppliance);
+                    {
+                        m_pCheckboxImportHDsAsVDI->setCheckState(Qt::Checked);
+                        pLayoutAppliance->addWidget(m_pCheckboxImportHDsAsVDI, 3, 1);
+                    }
+
+                    /* Prepare certificate label: */
+                    m_pCertLabel = new QLabel(pContainerAppliance);
+                    if (m_pCertLabel)
+                        pLayoutAppliance->addWidget(m_pCertLabel, 4, 0, 1, 3);
+                }
+
+                /* Add into widget: */
+                m_pSettingsWidget2->addWidget(pContainerAppliance);
+            }
+
+            /* Prepare form editor container: */
+            QWidget *pContainerFormEditor = new QWidget(m_pSettingsWidget2);
+            if (pContainerFormEditor)
+            {
+                /* Prepare form editor layout: */
+                QVBoxLayout *pLayoutFormEditor = new QVBoxLayout(pContainerFormEditor);
+                if (pLayoutFormEditor)
+                {
+                    pLayoutFormEditor->setContentsMargins(0, 0, 0, 0);
+
+                    /* Prepare form editor widget: */
+                    m_pFormEditor = new UIFormEditorWidget(pContainerFormEditor);
+                    if (m_pFormEditor)
+                        pLayoutFormEditor->addWidget(m_pFormEditor);
+                }
+
+                /* Add into widget: */
+                m_pSettingsWidget2->addWidget(pContainerFormEditor);
+            }
+
+            /* Add into layout: */
+            pMainLayout->addWidget(m_pSettingsWidget2);
+        }
+    }
+
+    /* Setup connections: */
+    connect(m_pEditorImportFilePath, &UIFilePathSelector::pathChanged,
+            this, &UIWizardImportAppPageSettings::sltHandleImportPathEditorChange);
+    connect(m_pComboMACImportPolicy, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),
+            this, &UIWizardImportAppPageSettings::sltHandleMACImportPolicyComboChange);
+    connect(m_pCheckboxImportHDsAsVDI, &QCheckBox::stateChanged,
+            this, &UIWizardImportAppPageSettings::sltHandleImportHDsAsVDICheckBoxChange);
+}
+
+UIWizardImportApp *UIWizardImportAppPageSettings::wizard() const
+{
+    return qobject_cast<UIWizardImportApp*>(UINativeWizardPage::wizard());
+}
+
+void UIWizardImportAppPageSettings::retranslateUi()
+{
+    /* Translate page: */
+    setTitle(UIWizardImportApp::tr("Appliance settings"));
+
+    /* Translate description label: */
+    if (m_pLabelDescription)
+    {
+        if (wizard()->isSourceCloudOne())
+            m_pLabelDescription->setText(UIWizardImportApp::tr("These are the the suggested settings of the cloud VM import "
+                                                               "procedure, they are influencing the resulting local VM instance. "
+                                                               "You can change many of the properties shown by double-clicking "
+                                                               "on the items and disable others using the check boxes below."));
+        else
+            m_pLabelDescription->setText(UIWizardImportApp::tr("These are the virtual machines contained in the appliance "
+                                                               "and the suggested settings of the imported VirtualBox machines. "
+                                                               "You can change many of the properties shown by double-clicking "
+                                                               "on the items and disable others using the check boxes below."));
+    }
+
+    /* Translate path selector label: */
+    if (m_pLabelImportFilePath)
+        m_pLabelImportFilePath->setText(tr("&Machine Base Folder:"));
+
+    /* Translate MAC import policy label: */
+    if (m_pLabelMACImportPolicy)
+        m_pLabelMACImportPolicy->setText(tr("MAC Address &Policy:"));
+
+    /* Translate additional options label: */
+    if (m_pLabelAdditionalOptions)
+        m_pLabelAdditionalOptions->setText(tr("Additional Options:"));
+    /* Translate additional option check-box: */
+    if (m_pCheckboxImportHDsAsVDI)
+    {
+        m_pCheckboxImportHDsAsVDI->setText(tr("&Import hard drives as VDI"));
+        m_pCheckboxImportHDsAsVDI->setToolTip(tr("Import all the hard drives that belong to this appliance in VDI format."));
+    }
+
+    /* Translate separate stuff: */
+    retranslateMACImportPolicyCombo(m_pComboMACImportPolicy);
+    retranslateCertificateLabel(m_pCertLabel, m_enmCertText, m_strSignedBy);
+
+    /* Update tool-tips: */
+    updateMACImportPolicyComboToolTip(m_pComboMACImportPolicy);
+}
+
+void UIWizardImportAppPageSettings::initializePage()
+{
+    /* Translate page: */
+    retranslateUi();
+
+    /* Choose initially focused widget: */
+    if (wizard()->isSourceCloudOne())
+        m_pFormEditor->setFocus();
+    else
+        m_pApplianceWidget->setFocus();
+
+    /* Fetch it, asynchronously: */
+    QMetaObject::invokeMethod(this, "sltAsyncInit", Qt::QueuedConnection);
+}
+
+bool UIWizardImportAppPageSettings::validatePage()
+{
+    /* Initial result: */
+    bool fResult = true;
+
+    /* Check whether there was cloud source selected: */
+    if (wizard()->isSourceCloudOne())
+    {
+        /* Make sure table has own data committed: */
+        m_pFormEditor->makeSureEditorDataCommitted();
+
+        /* Check whether we have proper VSD form: */
+        CVirtualSystemDescriptionForm comForm = wizard()->vsdImportForm();
+        fResult = comForm.isNotNull();
+
+        /* Give changed VSD back to appliance: */
+        if (fResult)
+        {
+            comForm.GetVirtualSystemDescription();
+            fResult = comForm.isOk();
+            if (!fResult)
+                msgCenter().cannotAcquireVirtualSystemDescriptionFormProperty(comForm);
+        }
+    }
+    else
+    {
+        /* Make sure widget has own data committed: */
+        m_pApplianceWidget->prepareImport();
+    }
+
+    /* Try to import appliance: */
+    if (fResult)
+        fResult = wizard()->importAppliance();
+
+    /* Return result: */
+    return fResult;
+}
+
+void UIWizardImportAppPageSettings::sltAsyncInit()
+{
+    /* If we have file name passed,
+     * check if specified file contains valid appliance: */
+    if (   !m_strFileName.isEmpty()
+        && !wizard()->setFile(m_strFileName))
+    {
+        wizard()->reject();
+        return;
+    }
+
+    /* Refresh page widgets: */
+    refreshStackedWidget(m_pSettingsWidget2,
+                         wizard()->isSourceCloudOne());
+    refreshApplianceWidget(m_pApplianceWidget,
+                           wizard()->localAppliance(),
+                           wizard()->isSourceCloudOne());
+    refreshMACAddressImportPolicies(m_pComboMACImportPolicy,
+                                    wizard()->isSourceCloudOne());
+    refreshFormPropertiesTable(m_pFormEditor,
+                               wizard()->vsdImportForm(),
+                               wizard()->isSourceCloudOne());
+
+    /* Init wizard fields: */
+    sltHandleImportPathEditorChange();
+    sltHandleMACImportPolicyComboChange();
+    sltHandleImportHDsAsVDICheckBoxChange();
+
+    /* Handle appliance certificate: */
+    if (!wizard()->isSourceCloudOne())
+        handleApplianceCertificate();
+}
+
+void UIWizardImportAppPageSettings::sltHandleImportPathEditorChange()
+{
+    AssertPtrReturnVoid(m_pApplianceWidget);
+    AssertPtrReturnVoid(m_pEditorImportFilePath);
+    m_pApplianceWidget->setVirtualSystemBaseFolder(m_pEditorImportFilePath->path());
+}
+
+void UIWizardImportAppPageSettings::sltHandleMACImportPolicyComboChange()
+{
+    /* Update combo tool-tip: */
+    updateMACImportPolicyComboToolTip(m_pComboMACImportPolicy);
+
+    /* Update wizard fields: */
+    wizard()->setMACAddressImportPolicy(macAddressImportPolicy(m_pComboMACImportPolicy));
+}
+
+void UIWizardImportAppPageSettings::sltHandleImportHDsAsVDICheckBoxChange()
+{
+    /* Update wizard fields: */
+    wizard()->setImportHDsAsVDI(isImportHDsAsVDI(m_pCheckboxImportHDsAsVDI));
+}
+
+void UIWizardImportAppPageSettings::handleApplianceCertificate()
+{
+    /* Handle certificate: */
+    CAppliance comAppliance = wizard()->localAppliance();
+    CCertificate comCertificate = comAppliance.GetCertificate();
+    if (comCertificate.isNull())
+        m_enmCertText = kCertText_Unsigned;
+    else
+    {
+        /* Pick a 'signed-by' name: */
+        m_strSignedBy = comCertificate.GetFriendlyName();
+
+        /* If trusted, just select the right message: */
+        if (comCertificate.GetTrusted())
+        {
+            if (comCertificate.GetSelfSigned())
+                m_enmCertText = !comCertificate.GetExpired() ? kCertText_SelfSignedTrusted : kCertText_SelfSignedExpired;
+            else
+                m_enmCertText = !comCertificate.GetExpired() ? kCertText_IssuedTrusted     : kCertText_IssuedExpired;
+        }
+        else
+        {
+            /* Not trusted!  Must ask the user whether to continue in this case: */
+            m_enmCertText = comCertificate.GetSelfSigned() ? kCertText_SelfSignedUnverified : kCertText_IssuedUnverified;
+
+            /* Translate page early: */
+            retranslateUi();
+
+            /* Instantiate the dialog: */
+            QPointer<UIApplianceUnverifiedCertificateViewer> pDialog =
+                new UIApplianceUnverifiedCertificateViewer(this, comCertificate);
+
+            /* Show viewer in modal mode: */
+            const int iResultCode = pDialog->exec();
+            /* Leave if viewer destroyed prematurely: */
+            if (!pDialog)
+                return;
+            /* Delete viewer finally: */
+            delete pDialog;
+
+            /* Dismiss the entire import-appliance wizard if user rejects certificate: */
+            if (iResultCode == QDialog::Rejected)
+                wizard()->reject();
+        }
+    }
+
+    /* Translate certificate label: */
+    retranslateCertificateLabel(m_pCertLabel, m_enmCertText, m_strSignedBy);
+}
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageSettings.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageSettings.h	(revision 91709)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageSettings.h	(revision 91709)
@@ -0,0 +1,164 @@
+/* $Id$ */
+/** @file
+ * VBox Qt GUI - UIWizardImportAppPageSettings class declaration.
+ */
+
+/*
+ * Copyright (C) 2009-2021 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+#ifndef FEQT_INCLUDED_SRC_wizards_importappliance_UIWizardImportAppPageSettings_h
+#define FEQT_INCLUDED_SRC_wizards_importappliance_UIWizardImportAppPageSettings_h
+#ifndef RT_WITHOUT_PRAGMA_ONCE
+# pragma once
+#endif
+
+/* GUI includes: */
+#include "UINativeWizardPage.h"
+#include "UIWizardImportApp.h"
+
+/* Forward declarations: */
+class QCheckBox;
+class QIComboBox;
+class QLabel;
+class QStackedWidget;
+class QIRichTextLabel;
+class UIApplianceImportEditorWidget;
+class UIFilePathSelector;
+class UIFormEditorWidget;
+
+/** Certificate text template types. */
+enum kCertText
+{
+    kCertText_Uninitialized = 0,
+    kCertText_Unsigned,
+    kCertText_IssuedTrusted,
+    kCertText_IssuedExpired,
+    kCertText_IssuedUnverified,
+    kCertText_SelfSignedTrusted,
+    kCertText_SelfSignedExpired,
+    kCertText_SelfSignedUnverified
+};
+
+/** Namespace for Settings page of the Import Appliance wizard. */
+namespace UIWizardImportAppSettings
+{
+    /** Refresh stacked widget. */
+    void refreshStackedWidget(QStackedWidget *pStackedWidget,
+                              bool fIsSourceCloudOne);
+
+    /** Refreshes appliance widget. */
+    void refreshApplianceWidget(UIApplianceImportEditorWidget *pApplianceWidget,
+                                const CAppliance &comAppliance,
+                                bool fIsSourceCloudOne);
+    /** Refresh MAC address import policies. */
+    void refreshMACAddressImportPolicies(QIComboBox *pCombo,
+                                         bool fIsSourceCloudOne);
+
+    /** Refreshes form properties table. */
+    void refreshFormPropertiesTable(UIFormEditorWidget *pFormEditor,
+                                    const CVirtualSystemDescriptionForm &comForm,
+                                    bool fIsSourceCloudOne);
+
+    /** Returns MAC address import policy. */
+    MACAddressImportPolicy macAddressImportPolicy(QIComboBox *pCombo);
+    /** Returns whether hard disks should be imported as VDIs. */
+    bool isImportHDsAsVDI(QCheckBox *pCheckBox);
+
+    /** Translates MAC import policy combo. */
+    void retranslateMACImportPolicyCombo(QIComboBox *pCombo);
+    /** Translates certificate label. */
+    void retranslateCertificateLabel(QLabel *pLabel, const kCertText &enmType, const QString &strSignedBy);
+
+    /** Updates MAC import policy combo tool-tips. */
+    void updateMACImportPolicyComboToolTip(QIComboBox *pCombo);
+}
+
+/** UINativeWizardPage extension for Settings page of the Import Appliance wizard,
+  * based on UIWizardImportAppSettings namespace functions. */
+class UIWizardImportAppPageSettings : public UINativeWizardPage
+{
+    Q_OBJECT;
+
+public:
+
+    /** Constructs Settings page.
+      * @param  strFileName  Brings appliance file name. */
+    UIWizardImportAppPageSettings(const QString &strFileName);
+
+protected:
+
+    /** Returns wizard this page belongs to. */
+    UIWizardImportApp *wizard() const;
+
+    /** Handles translation event. */
+    virtual void retranslateUi() /* override final */;
+
+    /** Performs page initialization. */
+    virtual void initializePage() /* override final */;
+
+    /** Performs page validation. */
+    virtual bool validatePage() /* override final */;
+
+private slots:
+
+    /** Inits page async way. */
+    void sltAsyncInit();
+
+    /** Handles import path editor change. */
+    void sltHandleImportPathEditorChange();
+    /** Handles MAC address import policy combo change. */
+    void sltHandleMACImportPolicyComboChange();
+    /** Handles import HDs as VDI check-box change. */
+    void sltHandleImportHDsAsVDICheckBoxChange();
+
+private:
+
+    /** Handles appliance certificate. */
+    void handleApplianceCertificate();
+
+    /** Handles the appliance file name. */
+    QString  m_strFileName;
+
+    /** Holds the description label instance. */
+    QIRichTextLabel *m_pLabelDescription;
+
+    /** Holds the settings widget 2 instance. */
+    QStackedWidget *m_pSettingsWidget2;
+
+    /** Holds the appliance widget instance. */
+    UIApplianceImportEditorWidget *m_pApplianceWidget;
+    /** Holds the import file-path label instance. */
+    QLabel                        *m_pLabelImportFilePath;
+    /** Holds the import file-path editor instance. */
+    UIFilePathSelector            *m_pEditorImportFilePath;
+    /** Holds the MAC address label instance. */
+    QLabel                        *m_pLabelMACImportPolicy;
+    /** Holds the MAC address combo instance. */
+    QIComboBox                    *m_pComboMACImportPolicy;
+    /** Holds the additional options label instance. */
+    QLabel                        *m_pLabelAdditionalOptions;
+    /** Holds the 'import HDs as VDI' checkbox instance. */
+    QCheckBox                     *m_pCheckboxImportHDsAsVDI;
+    /** Holds the signature/certificate info label instance. */
+    QLabel                        *m_pCertLabel;
+
+    /** Holds the certificate text template type. */
+    kCertText  m_enmCertText;
+
+    /** Holds the "signed by" information. */
+    QString  m_strSignedBy;
+
+    /** Holds the Form Editor widget instance. */
+    UIFormEditorWidget *m_pFormEditor;
+};
+
+#endif /* !FEQT_INCLUDED_SRC_wizards_importappliance_UIWizardImportAppPageSettings_h */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageSource.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageSource.cpp	(revision 91709)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageSource.cpp	(revision 91709)
@@ -0,0 +1,836 @@
+/* $Id$ */
+/** @file
+ * VBox Qt GUI - UIWizardImportAppPageSource class implementation.
+ */
+
+/*
+ * Copyright (C) 2009-2021 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+/* Qt includes: */
+#include <QGridLayout>
+#include <QLabel>
+#include <QListWidget>
+#include <QStackedWidget>
+
+/* GUI includes: */
+#include "QIComboBox.h"
+#include "QIRichTextLabel.h"
+#include "QIToolButton.h"
+#include "UICloudNetworkingStuff.h"
+#include "UIEmptyFilePathSelector.h"
+#include "UIIconPool.h"
+#include "UIMessageCenter.h"
+#include "UIVirtualBoxEventHandler.h"
+#include "UIVirtualBoxManager.h"
+#include "UIWizardImportApp.h"
+#include "UIWizardImportAppPageSource.h"
+
+/* COM includes: */
+#include "CAppliance.h"
+#include "CVirtualSystemDescription.h"
+#include "CVirtualSystemDescriptionForm.h"
+
+/* Namespaces: */
+using namespace UIWizardImportAppSource;
+
+
+/*********************************************************************************************************************************
+*   Class UIWizardImportAppSource implementation.                                                                                *
+*********************************************************************************************************************************/
+
+void UIWizardImportAppSource::populateSources(QIComboBox *pCombo,
+                                              bool fImportFromOCIByDefault,
+                                              const QString &strSource)
+{
+    /* Sanity check: */
+    AssertPtrReturnVoid(pCombo);
+    /* We need top-level parent as well: */
+    QWidget *pParent = pCombo->window();
+    AssertPtrReturnVoid(pParent);
+
+    /* Remember current item data to be able to restore it: */
+    QString strOldData;
+    if (pCombo->currentIndex() != -1)
+        strOldData = pCombo->currentData(SourceData_ShortName).toString();
+    else
+    {
+        /* Otherwise "OCI" or "local" should be the default one: */
+        if (fImportFromOCIByDefault)
+            strOldData = strSource.isEmpty() ? "OCI" : strSource;
+        else
+            strOldData = "local";
+    }
+
+    /* Block signals while updating: */
+    pCombo->blockSignals(true);
+
+    /* Clear combo initially: */
+    pCombo->clear();
+
+    /* Compose hardcoded sources list: */
+    QStringList sources;
+    sources << "local";
+    /* Add that list to combo: */
+    foreach (const QString &strShortName, sources)
+    {
+        /* Compose empty item, fill it's data: */
+        pCombo->addItem(QString());
+        pCombo->setItemData(pCombo->count() - 1, strShortName, SourceData_ShortName);
+    }
+
+    /* Iterate through existing providers: */
+    foreach (const CCloudProvider &comProvider, listCloudProviders(pParent))
+    {
+        /* Skip if we have nothing to populate (file missing?): */
+        if (comProvider.isNull())
+            continue;
+        /* Acquire provider name: */
+        QString strProviderName;
+        if (!cloudProviderName(comProvider, strProviderName, pParent))
+            continue;
+        /* Acquire provider short name: */
+        QString strProviderShortName;
+        if (!cloudProviderShortName(comProvider, strProviderShortName, pParent))
+            continue;
+
+        /* Compose empty item, fill it's data: */
+        pCombo->addItem(QString());
+        pCombo->setItemData(pCombo->count() - 1, strProviderName,      SourceData_Name);
+        pCombo->setItemData(pCombo->count() - 1, strProviderShortName, SourceData_ShortName);
+        pCombo->setItemData(pCombo->count() - 1, true,                 SourceData_IsItCloudFormat);
+    }
+
+    /* Set previous/default item if possible: */
+    int iNewIndex = -1;
+    if (   iNewIndex == -1
+        && !strOldData.isNull())
+        iNewIndex = pCombo->findData(strOldData, SourceData_ShortName);
+    if (   iNewIndex == -1
+        && pCombo->count() > 0)
+        iNewIndex = 0;
+    if (iNewIndex != -1)
+        pCombo->setCurrentIndex(iNewIndex);
+
+    /* Unblock signals after update: */
+    pCombo->blockSignals(false);
+}
+
+QString UIWizardImportAppSource::source(QIComboBox *pCombo)
+{
+    /* Sanity check: */
+    AssertPtrReturn(pCombo, QString());
+
+    /* Give the actual result: */
+    return pCombo->currentData(SourceData_ShortName).toString();
+}
+
+bool UIWizardImportAppSource::isSourceCloudOne(QIComboBox *pCombo, int iIndex /* = -1 */)
+{
+    /* Sanity check: */
+    AssertPtrReturn(pCombo, false);
+
+    /* Handle special case, -1 means "current one": */
+    if (iIndex == -1)
+        iIndex = pCombo->currentIndex();
+
+    /* Give the actual result: */
+    return pCombo->itemData(iIndex, SourceData_IsItCloudFormat).toBool();
+}
+
+void UIWizardImportAppSource::refreshStackedWidget(QStackedWidget *pStackedWidget,
+                                                   bool fIsSourceCloudOne)
+{
+    /* Sanity check: */
+    AssertPtrReturnVoid(pStackedWidget);
+
+    /* Update stack appearance according to chosen source: */
+    pStackedWidget->setCurrentIndex((int)fIsSourceCloudOne);
+}
+
+void UIWizardImportAppSource::refreshProfileCombo(QIComboBox *pCombo,
+                                                  const QString &strSource,
+                                                  const QString &strProfileName,
+                                                  bool fIsSourceCloudOne)
+{
+    /* Sanity check: */
+    AssertPtrReturnVoid(pCombo);
+
+    /* If source is cloud one: */
+    if (fIsSourceCloudOne)
+    {
+        /* We need top-level parent as well: */
+        QWidget *pParent = pCombo->window();
+        AssertPtrReturnVoid(pParent);
+        /* Acquire provider: */
+        CCloudProvider comProvider = cloudProviderByShortName(strSource, pParent);
+        AssertReturnVoid(comProvider.isNotNull());
+
+        /* Remember current item data to be able to restore it: */
+        QString strOldData;
+        if (pCombo->currentIndex() != -1)
+            strOldData = pCombo->currentData(ProfileData_Name).toString();
+        else if (!strProfileName.isEmpty())
+            strOldData = strProfileName;
+
+        /* Block signals while updating: */
+        pCombo->blockSignals(true);
+
+        /* Clear combo initially: */
+        pCombo->clear();
+
+        /* Iterate through existing profile names: */
+        foreach (const CCloudProfile &comProfile, listCloudProfiles(comProvider, pParent))
+        {
+            /* Skip if we have nothing to populate (wtf happened?): */
+            if (comProfile.isNull())
+                continue;
+            /* Acquire profile name: */
+            QString strCurrentProfileName;
+            if (!cloudProfileName(comProfile, strCurrentProfileName, pParent))
+                continue;
+
+            /* Compose item, fill it's data: */
+            pCombo->addItem(strCurrentProfileName);
+            pCombo->setItemData(pCombo->count() - 1, strCurrentProfileName, ProfileData_Name);
+        }
+
+        /* Set previous/default item if possible: */
+        int iNewIndex = -1;
+        if (   iNewIndex == -1
+            && !strOldData.isNull())
+            iNewIndex = pCombo->findData(strOldData, ProfileData_Name);
+        if (   iNewIndex == -1
+            && pCombo->count() > 0)
+            iNewIndex = 0;
+        if (iNewIndex != -1)
+            pCombo->setCurrentIndex(iNewIndex);
+
+        /* Unblock signals after update: */
+        pCombo->blockSignals(false);
+    }
+    /* If source is local one: */
+    else
+    {
+        /* Block signals while updating: */
+        pCombo->blockSignals(true);
+
+        /* Clear combo initially: */
+        pCombo->clear();
+
+        /* Unblock signals after update: */
+        pCombo->blockSignals(false);
+    }
+}
+
+void UIWizardImportAppSource::refreshCloudProfileInstances(QListWidget *pListWidget,
+                                                           const QString &strSource,
+                                                           const QString &strProfileName,
+                                                           bool fIsSourceCloudOne)
+{
+    /* Sanity check: */
+    AssertPtrReturnVoid(pListWidget);
+
+    /* If source is cloud one: */
+    if (fIsSourceCloudOne)
+    {
+        /* We need top-level parent as well: */
+        QWidget *pParent = pListWidget->window();
+        AssertPtrReturnVoid(pParent);
+        /* Acquire client: */
+        CCloudClient comClient = cloudClientByName(strSource, strProfileName, pParent);
+        AssertReturnVoid(comClient.isNotNull());
+
+        /* Block signals while updating: */
+        pListWidget->blockSignals(true);
+
+        /* Clear list initially: */
+        pListWidget->clear();
+
+        /* Gather VM names, ids and states.
+         * Currently we are interested in Running and Stopped VMs only. */
+        QString strErrorMessage;
+        const QMap<QString, QString> instances = listInstances(comClient, strErrorMessage, pParent);
+
+        /* Push acquired names to list rows: */
+        foreach (const QString &strId, instances.keys())
+        {
+            /* Create list item: */
+            QListWidgetItem *pItem = new QListWidgetItem(instances.value(strId), pListWidget);
+            if (pItem)
+            {
+                pItem->setFlags(pItem->flags() & ~Qt::ItemIsEditable);
+                pItem->setData(Qt::UserRole, strId);
+            }
+        }
+
+        /* Choose the 1st one by default if possible: */
+        if (pListWidget->count())
+            pListWidget->setCurrentRow(0);
+
+        /* Unblock signals after update: */
+        pListWidget->blockSignals(false);
+    }
+    /* If source is local one: */
+    else
+    {
+        /* Block signals while updating: */
+        pListWidget->blockSignals(true);
+
+        /* Clear combo initially: */
+        pListWidget->clear();
+
+        /* Unblock signals after update: */
+        pListWidget->blockSignals(false);
+    }
+}
+
+void UIWizardImportAppSource::refreshCloudStuff(CAppliance &comCloudAppliance,
+                                                CVirtualSystemDescriptionForm &comCloudVsdImportForm,
+                                                QWidget *pParent,
+                                                const QString &strMachineId,
+                                                const QString &strSource,
+                                                const QString &strProfileName,
+                                                bool fIsSourceCloudOne)
+{
+    /* Clear stuff: */
+    comCloudAppliance = CAppliance();
+    comCloudVsdImportForm = CVirtualSystemDescriptionForm();
+
+    /* If source is NOT cloud one: */
+    if (!fIsSourceCloudOne)
+        return;
+
+    /* We need top-level parent as well: */
+    AssertPtrReturnVoid(pParent);
+    /* Acquire client: */
+    CCloudClient comClient = cloudClientByName(strSource, strProfileName, pParent);
+    AssertReturnVoid(comClient.isNotNull());
+
+    /* Create appliance: */
+    CVirtualBox comVBox = uiCommon().virtualBox();
+    CAppliance comAppliance = comVBox.CreateAppliance();
+    if (!comVBox.isOk())
+    {
+        msgCenter().cannotCreateAppliance(comVBox, pParent);
+        return;
+    }
+
+    /* Remember appliance: */
+    comCloudAppliance = comAppliance;
+
+    /* Read cloud instance info: */
+    CProgress comReadProgress = comCloudAppliance.Read(QString("OCI://%1/%2").arg(strProfileName, strMachineId));
+    if (!comCloudAppliance.isOk())
+    {
+        msgCenter().cannotImportAppliance(comCloudAppliance, pParent);
+        return;
+    }
+
+    /* Show "Read appliance" progress: */
+    msgCenter().showModalProgressDialog(comReadProgress, UIWizardImportApp::tr("Read appliance ..."),
+                                        ":/progress_reading_appliance_90px.png", pParent, 0);
+    if (!comReadProgress.isOk() || comReadProgress.GetResultCode() != 0)
+    {
+        msgCenter().cannotImportAppliance(comReadProgress, comCloudAppliance.GetPath(), pParent);
+        return;
+    }
+
+    /* Acquire virtual system description: */
+    QVector<CVirtualSystemDescription> descriptions = comCloudAppliance.GetVirtualSystemDescriptions();
+    if (!comCloudAppliance.isOk())
+    {
+        msgCenter().cannotAcquireVirtualSystemDescription(comCloudAppliance, pParent);
+        return;
+    }
+
+    /* Make sure there is at least one virtual system description created: */
+    AssertReturnVoid(!descriptions.isEmpty());
+    CVirtualSystemDescription comDescription = descriptions.at(0);
+
+    /* Read Cloud Client description form: */
+    CVirtualSystemDescriptionForm comVsdImportForm;
+    bool fSuccess = importDescriptionForm(comClient, comDescription, comVsdImportForm, pParent);
+    if (!fSuccess)
+        return;
+
+    /* Remember form: */
+    comCloudVsdImportForm = comVsdImportForm;
+}
+
+QString UIWizardImportAppSource::path(UIEmptyFilePathSelector *pFileSelector)
+{
+    /* Sanity check: */
+    AssertPtrReturn(pFileSelector, QString());
+
+    /* Give the actual result: */
+    return pFileSelector->path().toLower();
+}
+
+QString UIWizardImportAppSource::profileName(QIComboBox *pCombo)
+{
+    /* Sanity check: */
+    AssertPtrReturn(pCombo, QString());
+
+    /* Give the actual result: */
+    return pCombo->currentData(ProfileData_Name).toString();
+}
+
+QString UIWizardImportAppSource::machineId(QListWidget *pListWidget)
+{
+    /* Sanity check: */
+    AssertPtrReturn(pListWidget, QString());
+
+    /* Give the actual result: */
+    QListWidgetItem *pItem = pListWidget->currentItem();
+    return pItem ? pItem->data(Qt::UserRole).toString() : QString();
+}
+
+void UIWizardImportAppSource::updateSourceComboToolTip(QIComboBox *pCombo)
+{
+    /* Sanity check: */
+    AssertPtrReturnVoid(pCombo);
+
+    /* Update tool-tip: */
+    const QString strCurrentToolTip = pCombo->currentData(Qt::ToolTipRole).toString();
+    pCombo->setToolTip(strCurrentToolTip);
+}
+
+
+/*********************************************************************************************************************************
+*   Class UIWizardImportAppPageSource implementation.                                                                            *
+*********************************************************************************************************************************/
+
+UIWizardImportAppPageSource::UIWizardImportAppPageSource(bool fImportFromOCIByDefault, const QString &strFileName)
+    : m_fImportFromOCIByDefault(fImportFromOCIByDefault)
+    , m_strFileName(strFileName)
+    , m_pLabelMain(0)
+    , m_pLabelDescription(0)
+    , m_pSourceLayout(0)
+    , m_pSourceLabel(0)
+    , m_pSourceComboBox(0)
+    , m_pSettingsWidget1(0)
+    , m_pLocalContainerLayout(0)
+    , m_pFileLabel(0)
+    , m_pFileSelector(0)
+    , m_pCloudContainerLayout(0)
+    , m_pProfileLabel(0)
+    , m_pProfileComboBox(0)
+    , m_pProfileToolButton(0)
+    , m_pProfileInstanceLabel(0)
+    , m_pProfileInstanceList(0)
+{
+    /* Prepare main layout: */
+    QVBoxLayout *pMainLayout = new QVBoxLayout(this);
+    if (pMainLayout)
+    {
+        /* Prepare main label: */
+        m_pLabelMain = new QIRichTextLabel(this);
+        if (m_pLabelMain)
+            pMainLayout->addWidget(m_pLabelMain);
+
+        /* Prepare source layout: */
+        m_pSourceLayout = new QGridLayout;
+        if (m_pSourceLayout)
+        {
+            m_pSourceLayout->setContentsMargins(0, 0, 0, 0);
+            m_pSourceLayout->setColumnStretch(0, 0);
+            m_pSourceLayout->setColumnStretch(1, 1);
+
+            /* Prepare source label: */
+            m_pSourceLabel = new QLabel(this);
+            if (m_pSourceLabel)
+                m_pSourceLayout->addWidget(m_pSourceLabel, 0, 0, Qt::AlignRight);
+            /* Prepare source selector: */
+            m_pSourceComboBox = new QIComboBox(this);
+            if (m_pSourceComboBox)
+            {
+                m_pSourceLabel->setBuddy(m_pSourceComboBox);
+                m_pSourceLayout->addWidget(m_pSourceComboBox, 0, 1);
+            }
+
+            /* Add into layout: */
+            pMainLayout->addLayout(m_pSourceLayout);
+        }
+
+        /* Prepare description label: */
+        m_pLabelDescription = new QIRichTextLabel(this);
+        if (m_pLabelDescription)
+            pMainLayout->addWidget(m_pLabelDescription);
+
+        /* Prepare settings widget: */
+        m_pSettingsWidget1 = new QStackedWidget(this);
+        if (m_pSettingsWidget1)
+        {
+            /* Prepare local container: */
+            QWidget *pContainerLocal = new QWidget(m_pSettingsWidget1);
+            if (pContainerLocal)
+            {
+                /* Prepare local container layout: */
+                m_pLocalContainerLayout = new QGridLayout(pContainerLocal);
+                if (m_pLocalContainerLayout)
+                {
+                    m_pLocalContainerLayout->setContentsMargins(0, 0, 0, 0);
+                    m_pLocalContainerLayout->setColumnStretch(0, 0);
+                    m_pLocalContainerLayout->setColumnStretch(1, 1);
+                    m_pLocalContainerLayout->setRowStretch(1, 1);
+
+                    /* Prepare file label: */
+                    m_pFileLabel = new QLabel(pContainerLocal);
+                    if (m_pFileLabel)
+                        m_pLocalContainerLayout->addWidget(m_pFileLabel, 0, 0, Qt::AlignRight);
+
+                    /* Prepare file-path selector: */
+                    m_pFileSelector = new UIEmptyFilePathSelector(pContainerLocal);
+                    if (m_pFileSelector)
+                    {
+                        m_pFileLabel->setBuddy(m_pFileSelector);
+                        m_pFileSelector->setHomeDir(uiCommon().documentsPath());
+                        m_pFileSelector->setMode(UIEmptyFilePathSelector::Mode_File_Open);
+                        m_pFileSelector->setButtonPosition(UIEmptyFilePathSelector::RightPosition);
+                        m_pFileSelector->setEditable(true);
+                        m_pLocalContainerLayout->addWidget(m_pFileSelector, 0, 1);
+                    }
+                }
+
+                /* Add into widget: */
+                m_pSettingsWidget1->addWidget(pContainerLocal);
+            }
+
+            /* Prepare cloud container: */
+            QWidget *pContainerCloud = new QWidget(m_pSettingsWidget1);
+            if (pContainerCloud)
+            {
+                /* Prepare cloud container layout: */
+                m_pCloudContainerLayout = new QGridLayout(pContainerCloud);
+                if (m_pCloudContainerLayout)
+                {
+                    m_pCloudContainerLayout->setContentsMargins(0, 0, 0, 0);
+                    m_pCloudContainerLayout->setColumnStretch(0, 0);
+                    m_pCloudContainerLayout->setColumnStretch(1, 1);
+                    m_pCloudContainerLayout->setRowStretch(1, 0);
+                    m_pCloudContainerLayout->setRowStretch(2, 1);
+
+                    /* Prepare profile label: */
+                    m_pProfileLabel = new QLabel(pContainerCloud);
+                    if (m_pProfileLabel)
+                        m_pCloudContainerLayout->addWidget(m_pProfileLabel, 0, 0, Qt::AlignRight);
+
+                    /* Prepare sub-layout: */
+                    QHBoxLayout *pSubLayout = new QHBoxLayout;
+                    if (pSubLayout)
+                    {
+                        pSubLayout->setContentsMargins(0, 0, 0, 0);
+                        pSubLayout->setSpacing(1);
+
+                        /* Prepare profile combo-box: */
+                        m_pProfileComboBox = new QIComboBox(pContainerCloud);
+                        if (m_pProfileComboBox)
+                        {
+                            m_pProfileLabel->setBuddy(m_pProfileComboBox);
+                            pSubLayout->addWidget(m_pProfileComboBox);
+                        }
+
+                        /* Prepare profile tool-button: */
+                        m_pProfileToolButton = new QIToolButton(pContainerCloud);
+                        if (m_pProfileToolButton)
+                        {
+                            m_pProfileToolButton->setIcon(UIIconPool::iconSet(":/cloud_profile_manager_16px.png",
+                                                                              ":/cloud_profile_manager_disabled_16px.png"));
+                            pSubLayout->addWidget(m_pProfileToolButton);
+                        }
+
+                        /* Add into layout: */
+                        m_pCloudContainerLayout->addLayout(pSubLayout, 0, 1);
+                    }
+
+                    /* Prepare profile instance label: */
+                    m_pProfileInstanceLabel = new QLabel(pContainerCloud);
+                    if (m_pProfileInstanceLabel)
+                        m_pCloudContainerLayout->addWidget(m_pProfileInstanceLabel, 1, 0, Qt::AlignRight);
+
+                    /* Prepare profile instances table: */
+                    m_pProfileInstanceList = new QListWidget(pContainerCloud);
+                    if (m_pProfileInstanceList)
+                    {
+                        m_pProfileInstanceLabel->setBuddy(m_pProfileInstanceLabel);
+                        const QFontMetrics fm(m_pProfileInstanceList->font());
+                        const int iFontWidth = fm.width('x');
+                        const int iTotalWidth = 50 * iFontWidth;
+                        const int iFontHeight = fm.height();
+                        const int iTotalHeight = 4 * iFontHeight;
+                        m_pProfileInstanceList->setMinimumSize(QSize(iTotalWidth, iTotalHeight));
+//                        m_pProfileInstanceList->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
+                        m_pProfileInstanceList->setAlternatingRowColors(true);
+                        m_pCloudContainerLayout->addWidget(m_pProfileInstanceList, 1, 1, 2, 1);
+                    }
+                }
+
+                /* Add into widget: */
+                m_pSettingsWidget1->addWidget(pContainerCloud);
+            }
+
+            /* Add into layout: */
+            pMainLayout->addWidget(m_pSettingsWidget1);
+        }
+    }
+
+    /* Setup connections: */
+    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigCloudProfileRegistered,
+            this, &UIWizardImportAppPageSource::sltHandleSourceComboChange);
+    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigCloudProfileChanged,
+            this, &UIWizardImportAppPageSource::sltHandleSourceComboChange);
+    connect(m_pSourceComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),
+            this, &UIWizardImportAppPageSource::sltHandleSourceComboChange);
+    connect(m_pFileSelector, &UIEmptyFilePathSelector::pathChanged,
+            this, &UIWizardImportAppPageSource::completeChanged);
+    connect(m_pProfileComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),
+            this, &UIWizardImportAppPageSource::sltHandleProfileComboChange);
+    connect(m_pProfileToolButton, &QIToolButton::clicked,
+            this, &UIWizardImportAppPageSource::sltHandleProfileButtonClick);
+    connect(m_pProfileInstanceList, &QListWidget::currentRowChanged,
+            this, &UIWizardImportAppPageSource::completeChanged);
+
+    /* Parse passed full group name if any: */
+    if (   m_fImportFromOCIByDefault
+        && !m_strFileName.isEmpty())
+    {
+        const QString strProviderShortName = m_strFileName.section('/', 1, 1);
+        const QString strProfileName = m_strFileName.section('/', 2, 2);
+        if (!strProviderShortName.isEmpty() && !strProfileName.isEmpty())
+        {
+            m_strSource = strProviderShortName;
+            m_strProfileName = strProfileName;
+        }
+    }
+}
+
+UIWizardImportApp *UIWizardImportAppPageSource::wizard() const
+{
+    return qobject_cast<UIWizardImportApp*>(UINativeWizardPage::wizard());
+}
+
+void UIWizardImportAppPageSource::retranslateUi()
+{
+    /* Translate page: */
+    setTitle(UIWizardImportApp::tr("Appliance to import"));
+
+    /* Translate main label: */
+    if (m_pLabelMain)
+        m_pLabelMain->setText(UIWizardImportApp::tr("Please choose the source to import appliance from.  This can be a "
+                                                    "local file system to import OVF archive or one of known cloud "
+                                                    "service providers to import cloud VM from."));
+
+    /* Translate description label: */
+    if (m_pLabelDescription)
+    {
+        if (wizard()->isSourceCloudOne())
+            m_pLabelDescription->setText(UIWizardImportApp::
+                                         tr("<p>Please choose one of cloud service profiles you have registered to import virtual "
+                                            "machine from.  Corresponding machines list will be updated.  To continue, "
+                                            "select one of machines to import below.</p>"));
+        else
+            m_pLabelDescription->setText(UIWizardImportApp::
+                                         tr("<p>Please choose a file to import the virtual appliance from.  VirtualBox currently "
+                                            "supports importing appliances saved in the Open Virtualization Format (OVF).  "
+                                            "To continue, select the file to import below.</p>"));
+    }
+
+    /* Translate source label: */
+    if (m_pSourceLabel)
+        m_pSourceLabel->setText(UIWizardImportApp::tr("&Source:"));
+    if (m_pSourceComboBox)
+    {
+        /* Translate hardcoded values of Source combo-box: */
+        m_pSourceComboBox->setItemText(0, UIWizardImportApp::tr("Local File System"));
+        m_pSourceComboBox->setItemData(0, UIWizardImportApp::tr("Import from local file system."), Qt::ToolTipRole);
+
+        /* Translate received values of Source combo-box.
+         * We are enumerating starting from 0 for simplicity: */
+        for (int i = 0; i < m_pSourceComboBox->count(); ++i)
+            if (isSourceCloudOne(m_pSourceComboBox, i))
+            {
+                m_pSourceComboBox->setItemText(i, m_pSourceComboBox->itemData(i, SourceData_Name).toString());
+                m_pSourceComboBox->setItemData(i, UIWizardImportApp::tr("Import from cloud service provider."), Qt::ToolTipRole);
+            }
+    }
+
+    /* Translate local stuff: */
+    if (m_pFileLabel)
+        m_pFileLabel->setText(UIWizardImportApp::tr("&File:"));
+    if (m_pFileSelector)
+    {
+        m_pFileSelector->setChooseButtonToolTip(UIWizardImportApp::tr("Choose a virtual appliance file to import..."));
+        m_pFileSelector->setFileDialogTitle(UIWizardImportApp::tr("Please choose a virtual appliance file to import"));
+        m_pFileSelector->setFileFilters(UIWizardImportApp::tr("Open Virtualization Format (%1)").arg("*.ova *.ovf"));
+    }
+
+    /* Translate profile stuff: */
+    if (m_pProfileLabel)
+        m_pProfileLabel->setText(UIWizardImportApp::tr("&Profile:"));
+    if (m_pProfileToolButton)
+        m_pProfileToolButton->setToolTip(UIWizardImportApp::tr("Open Cloud Profile Manager..."));
+    if (m_pProfileInstanceLabel)
+        m_pProfileInstanceLabel->setText(UIWizardImportApp::tr("&Machines:"));
+
+    /* Adjust label widths: */
+    QList<QWidget*> labels;
+    if (m_pFileLabel)
+        labels << m_pFileLabel;
+    if (m_pSourceLabel)
+        labels << m_pSourceLabel;
+    if (m_pProfileLabel)
+        labels << m_pProfileLabel;
+    if (m_pProfileInstanceLabel)
+        labels << m_pProfileInstanceLabel;
+    int iMaxWidth = 0;
+    foreach (QWidget *pLabel, labels)
+        iMaxWidth = qMax(iMaxWidth, pLabel->minimumSizeHint().width());
+    if (m_pSourceLayout)
+        m_pSourceLayout->setColumnMinimumWidth(0, iMaxWidth);
+    if (m_pLocalContainerLayout)
+    {
+        m_pLocalContainerLayout->setColumnMinimumWidth(0, iMaxWidth);
+        m_pCloudContainerLayout->setColumnMinimumWidth(0, iMaxWidth);
+    }
+
+    /* Update tool-tips: */
+    updateSourceComboToolTip(m_pSourceComboBox);
+}
+
+void UIWizardImportAppPageSource::initializePage()
+{
+    /* Populate sources: */
+    populateSources(m_pSourceComboBox,
+                    m_fImportFromOCIByDefault,
+                    m_strSource);
+    /* Translate page: */
+    retranslateUi();
+
+    /* Choose initially focused widget: */
+    if (wizard()->isSourceCloudOne())
+        m_pProfileInstanceList->setFocus();
+    else
+        m_pFileSelector->setFocus();
+
+    /* Fetch it, asynchronously: */
+    QMetaObject::invokeMethod(this, "sltHandleSourceComboChange", Qt::QueuedConnection);
+}
+
+bool UIWizardImportAppPageSource::isComplete() const
+{
+    /* Initial result: */
+    bool fResult = true;
+
+    /* Check whether there was cloud source selected: */
+    if (wizard()->isSourceCloudOne())
+        fResult = !machineId(m_pProfileInstanceList).isEmpty();
+    else
+        fResult =    UICommon::hasAllowedExtension(path(m_pFileSelector), OVFFileExts)
+                  && QFile::exists(path(m_pFileSelector));
+
+    /* Return result: */
+    return fResult;
+}
+
+bool UIWizardImportAppPageSource::validatePage()
+{
+    /* Initial result: */
+    bool fResult = true;
+
+    /* Check whether there was cloud source selected: */
+    if (wizard()->isSourceCloudOne())
+    {
+        /* Update cloud stuff: */
+        updateCloudStuff();
+        /* Which is required to continue to the next page: */
+        fResult =    wizard()->cloudAppliance().isNotNull()
+                  && wizard()->vsdImportForm().isNotNull();
+    }
+    else
+    {
+        /* Update local stuff (only if something changed): */
+        if (m_pFileSelector->isModified())
+        {
+            updateLocalStuff();
+            m_pFileSelector->resetModified();
+        }
+        /* Which is required to continue to the next page: */
+        fResult = wizard()->localAppliance().isNotNull();
+    }
+
+    /* Return result: */
+    return fResult;
+}
+
+void UIWizardImportAppPageSource::sltHandleSourceComboChange()
+{
+    /* Update combo tool-tip: */
+    updateSourceComboToolTip(m_pSourceComboBox);
+
+    /* Update wizard fields: */
+    wizard()->setSourceCloudOne(isSourceCloudOne(m_pSourceComboBox));
+
+    /* Refresh page widgets: */
+    refreshStackedWidget(m_pSettingsWidget1,
+                         wizard()->isSourceCloudOne());
+    refreshProfileCombo(m_pProfileComboBox,
+                        source(m_pSourceComboBox),
+                        m_strProfileName,
+                        wizard()->isSourceCloudOne());
+
+    /* Update profile instances: */
+    sltHandleProfileComboChange();
+
+    /* Notify about changes: */
+    emit completeChanged();
+}
+
+void UIWizardImportAppPageSource::sltHandleProfileComboChange()
+{
+    /* Refresh required settings: */
+    refreshCloudProfileInstances(m_pProfileInstanceList,
+                                 source(m_pSourceComboBox),
+                                 profileName(m_pProfileComboBox),
+                                 wizard()->isSourceCloudOne());
+
+    /* Notify about changes: */
+    emit completeChanged();
+}
+
+void UIWizardImportAppPageSource::sltHandleProfileButtonClick()
+{
+    /* Open Cloud Profile Manager: */
+    if (gpManager)
+        gpManager->openCloudProfileManager();
+}
+
+void UIWizardImportAppPageSource::updateLocalStuff()
+{
+    /* Create local appliance: */
+    wizard()->setFile(path(m_pFileSelector));
+}
+
+void UIWizardImportAppPageSource::updateCloudStuff()
+{
+    /* Create cloud appliance and VSD import form: */
+    CAppliance comAppliance;
+    CVirtualSystemDescriptionForm comForm;
+    refreshCloudStuff(comAppliance,
+                      comForm,
+                      wizard(),
+                      machineId(m_pProfileInstanceList),
+                      source(m_pSourceComboBox),
+                      profileName(m_pProfileComboBox),
+                      wizard()->isSourceCloudOne());
+    wizard()->setCloudAppliance(comAppliance);
+    wizard()->setVsdImportForm(comForm);
+}
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageSource.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageSource.h	(revision 91709)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageSource.h	(revision 91709)
@@ -0,0 +1,195 @@
+/* $Id$ */
+/** @file
+ * VBox Qt GUI - UIWizardImportAppPageSource class declaration.
+ */
+
+/*
+ * Copyright (C) 2009-2021 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+#ifndef FEQT_INCLUDED_SRC_wizards_importappliance_UIWizardImportAppPageSource_h
+#define FEQT_INCLUDED_SRC_wizards_importappliance_UIWizardImportAppPageSource_h
+#ifndef RT_WITHOUT_PRAGMA_ONCE
+# pragma once
+#endif
+
+/* GUI includes: */
+#include "UINativeWizardPage.h"
+
+/* Forward declarations: */
+class QGridLayout;
+class QLabel;
+class QListWidget;
+class QStackedWidget;
+class QIComboBox;
+class QIRichTextLabel;
+class QIToolButton;
+class UIEmptyFilePathSelector;
+class UIWizardImportApp;
+class CAppliance;
+class CVirtualSystemDescriptionForm;
+
+/** Source combo data fields. */
+enum
+{
+    SourceData_Name            = Qt::UserRole + 1,
+    SourceData_ShortName       = Qt::UserRole + 2,
+    SourceData_IsItCloudFormat = Qt::UserRole + 3
+};
+
+/** Profile combo data fields. */
+enum
+{
+    ProfileData_Name = Qt::UserRole + 1
+};
+
+/** Namespace for Source page of the Import Appliance wizard. */
+namespace UIWizardImportAppSource
+{
+    /** Populates sources. */
+    void populateSources(QIComboBox *pCombo,
+                         bool fImportFromOCIByDefault,
+                         const QString &strSource);
+
+    /** Returns current source of @a pCombo specified. */
+    QString source(QIComboBox *pCombo);
+    /** Returns whether source under certain @a iIndex is cloud one. */
+    bool isSourceCloudOne(QIComboBox *pCombo, int iIndex = -1);
+
+    /** Refresh stacked widget. */
+    void refreshStackedWidget(QStackedWidget *pStackedWidget,
+                              bool fIsFormatCloudOne);
+
+    /** Refresh profile combo. */
+    void refreshProfileCombo(QIComboBox *pCombo,
+                             const QString &strSource,
+                             const QString &strProfileName,
+                             bool fIsSourceCloudOne);
+    /** Refresh profile instances. */
+    void refreshCloudProfileInstances(QListWidget *pListWidget,
+                                      const QString &strSource,
+                                      const QString &strProfileName,
+                                      bool fIsSourceCloudOne);
+    /** Refresh cloud stuff. */
+    void refreshCloudStuff(CAppliance &comCloudAppliance,
+                           CVirtualSystemDescriptionForm &comCloudVsdImportForm,
+                           QWidget *pParent,
+                           const QString &strMachineId,
+                           const QString &strSource,
+                           const QString &strProfileName,
+                           bool fIsSourceCloudOne);
+
+    /** Returns imported file path. */
+    QString path(UIEmptyFilePathSelector *pFileSelector);
+
+    /** Returns profile name. */
+    QString profileName(QIComboBox *pCombo);
+    /** Returns machine ID. */
+    QString machineId(QListWidget *pListWidget);
+
+    /** Updates source combo tool-tips. */
+    void updateSourceComboToolTip(QIComboBox *pCombo);
+}
+
+/** UINativeWizardPage extension for Source page of the Import Appliance wizard,
+  * based on UIWizardImportAppSource namespace functions. */
+class UIWizardImportAppPageSource : public UINativeWizardPage
+{
+    Q_OBJECT;
+
+public:
+
+    /** Constructs Source page.
+      * @param  fImportFromOCIByDefault  Brings whether we should propose import from OCI by default.
+      * @param  strFileName              Brings appliance file name. */
+    UIWizardImportAppPageSource(bool fImportFromOCIByDefault, const QString &strFileName);
+
+protected:
+
+    /** Returns wizard this page belongs to. */
+    UIWizardImportApp *wizard() const;
+
+    /** Handles translation event. */
+    virtual void retranslateUi() /* override final */;
+
+    /** Performs page initialization. */
+    virtual void initializePage() /* override final */;
+
+    /** Returns whether page is complete. */
+    virtual bool isComplete() const /* override final */;
+
+    /** Performs page validation. */
+    virtual bool validatePage() /* override final */;
+
+private slots:
+
+    /** Handles source combo change. */
+    void sltHandleSourceComboChange();
+
+    /** Handles profile combo change. */
+    void sltHandleProfileComboChange();
+    /** Handles profile tool-button click. */
+    void sltHandleProfileButtonClick();
+
+private:
+
+    /** Update local stuff. */
+    void updateLocalStuff();
+    /** Updates cloud stuff. */
+    void updateCloudStuff();
+
+    /** Holds whether default source should be Import from OCI. */
+    bool     m_fImportFromOCIByDefault;
+    /** Handles the appliance file name. */
+    QString  m_strFileName;
+
+    /** Holds the cached source. */
+    QString  m_strSource;
+    /** Holds the cached profile name. */
+    QString  m_strProfileName;
+
+    /** Holds the main label instance. */
+    QIRichTextLabel *m_pLabelMain;
+    /** Holds the description label instance. */
+    QIRichTextLabel *m_pLabelDescription;
+
+    /** Holds the source layout instance. */
+    QGridLayout *m_pSourceLayout;
+    /** Holds the source type label instance. */
+    QLabel      *m_pSourceLabel;
+    /** Holds the source type combo-box instance. */
+    QIComboBox  *m_pSourceComboBox;
+
+    /** Holds the settings widget 1 instance. */
+    QStackedWidget *m_pSettingsWidget1;
+
+    /** Holds the local container layout instance. */
+    QGridLayout             *m_pLocalContainerLayout;
+    /** Holds the file label instance. */
+    QLabel                  *m_pFileLabel;
+    /** Holds the file selector instance. */
+    UIEmptyFilePathSelector *m_pFileSelector;
+
+    /** Holds the cloud container layout instance. */
+    QGridLayout  *m_pCloudContainerLayout;
+    /** Holds the profile label instance. */
+    QLabel       *m_pProfileLabel;
+    /** Holds the profile combo-box instance. */
+    QIComboBox   *m_pProfileComboBox;
+    /** Holds the profile management tool-button instance. */
+    QIToolButton *m_pProfileToolButton;
+    /** Holds the profile instance label instance. */
+    QLabel       *m_pProfileInstanceLabel;
+    /** Holds the profile instance list instance. */
+    QListWidget  *m_pProfileInstanceList;
+};
+
+#endif /* !FEQT_INCLUDED_SRC_wizards_importappliance_UIWizardImportAppPageSource_h */
