Index: trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 17047)
+++ trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 17049)
@@ -285,5 +285,7 @@
 	include/VBoxSettingsPage.h \
 	include/VBoxSettingsSelector.h \
-	include/VBoxImportAppliance.h
+	include/VBoxImportApplianceWgt.h \
+	include/VBoxImportApplianceWzd.h \
+	include/VBoxChangeLogWgt.h
 
 # Sources containing local definitions of classes that use the Q_OBJECT macro.
@@ -362,5 +364,7 @@
 	src/VBoxSettingsSelector.cpp \
 	src/VBoxMediaManagerDlg.cpp \
-	src/VBoxImportAppliance.cpp
+	src/VBoxImportApplianceWgt.cpp \
+	src/VBoxImportApplianceWzd.cpp \
+	src/VBoxChangeLogWgt.cpp
 
 ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
Index: trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro	(revision 17047)
+++ trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro	(revision 17049)
@@ -56,5 +56,6 @@
     ui/VBoxGLSettingsUpdate.ui \
     ui/VBoxGLSettingsLanguage.ui \
-    ui/VBoxImportApplianceDlg.ui
+    ui/VBoxImportApplianceWgt.ui \
+    ui/VBoxImportApplianceWzd.ui
 
 TRANSLATIONS = \
Index: trunk/src/VBox/Frontends/VirtualBox/include/VBoxImportAppliance.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/include/VBoxImportAppliance.h	(revision 17047)
+++ 	(revision )
@@ -1,78 +1,0 @@
-/** @file
- *
- * VBox frontends: Qt4 GUI ("VirtualBox"):
- * VBoxImportAppliance class declaration
- */
-
-/*
- * Copyright (C) 2009 Sun Microsystems, Inc.
- *
- * 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.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
- * Clara, CA 95054 USA or visit http://www.sun.com if you need
- * additional information or have any questions.
- */
-
-#ifndef __VBoxImportAppliance_h__
-#define __VBoxImportAppliance_h__
-
-#include "VBoxImportApplianceDlg.gen.h"
-#include "QIWithRetranslateUI.h"
-#include "QIDialog.h"
-
-class CAppliance;
-class CVirtualSystemDescription;
-class VirtualSystemModel;
-
-class VBoxImportAppliance
-{
-public:
-    static void import (QWidget *aParent = NULL);
-
-    static int minGuestRAM() { return mMinGuestRAM; }
-    static int maxGuestRAM() { return mMaxGuestRAM; }
-    static int minGuestCPUCount() { return mMinGuestCPUCount; }
-    static int maxGuestCPUCount() { return mMaxGuestCPUCount; }
-
-private:
-    /* Private member vars */
-    static void initSystemSettings();
-
-    static int mMinGuestRAM;
-    static int mMaxGuestRAM;
-    static int mMinGuestCPUCount;
-    static int mMaxGuestCPUCount;
-};
-
-class VBoxImportApplianceDlg : public QIWithRetranslateUI<QIDialog>,
-                               public Ui::VBoxImportApplianceDlg
-{
-    Q_OBJECT;
-
-public:
-    VBoxImportApplianceDlg (CAppliance *aAppliance, QWidget *aParent);
-
-public slots:
-    void accept();
-
-protected:
-    void retranslateUi();
-
-private slots:
-    void restoreDefaults();
-
-private:
-    /* Private member vars */
-    CAppliance *mAppliance;
-    VirtualSystemModel *mModel;
-};
-
-#endif /* __VBoxImportAppliance_h__ */
-
Index: trunk/src/VBox/Frontends/VirtualBox/include/VBoxImportApplianceWgt.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/include/VBoxImportApplianceWgt.h	(revision 17049)
+++ trunk/src/VBox/Frontends/VirtualBox/include/VBoxImportApplianceWgt.h	(revision 17049)
@@ -0,0 +1,58 @@
+/** @file
+ *
+ * VBox frontends: Qt4 GUI ("VirtualBox"):
+ * VBoxImportApplianceWgt class declaration
+ */
+
+/*
+ * Copyright (C) 2009 Sun Microsystems, Inc.
+ *
+ * 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.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
+ * Clara, CA 95054 USA or visit http://www.sun.com if you need
+ * additional information or have any questions.
+ */
+
+#ifndef __VBoxImportApplianceWgt_h__
+#define __VBoxImportApplianceWgt_h__
+
+#include "VBoxImportApplianceWgt.gen.h"
+#include "QIWithRetranslateUI.h"
+
+class CAppliance;
+class VirtualSystemModel;
+
+class VBoxImportApplianceWgt : public QIWithRetranslateUI<QWidget>,
+                               public Ui::VBoxImportApplianceWgt
+{
+    Q_OBJECT;
+
+public:
+    VBoxImportApplianceWgt (QWidget *aParent);
+
+    bool setFile (const QString& aFile);
+    bool import();
+
+    bool isValid() const { return mAppliance != NULL; }
+
+public slots:
+    void restoreDefaults();
+
+protected:
+    void retranslateUi();
+
+private:
+    /* Private member vars */
+    CAppliance *mAppliance;
+    VirtualSystemModel *mModel;
+};
+
+#endif /* __VBoxImportApplianceWgt_h__ */
+
Index: trunk/src/VBox/Frontends/VirtualBox/include/VBoxImportApplianceWzd.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/include/VBoxImportApplianceWzd.h	(revision 17049)
+++ trunk/src/VBox/Frontends/VirtualBox/include/VBoxImportApplianceWzd.h	(revision 17049)
@@ -0,0 +1,77 @@
+/** @file
+ *
+ * VBox frontends: Qt4 GUI ("VirtualBox"):
+ * VBoxImportApplianceWzd class declaration
+ */
+
+/*
+ * Copyright (C) 2009 Sun Microsystems, Inc.
+ *
+ * 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.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
+ * Clara, CA 95054 USA or visit http://www.sun.com if you need
+ * additional information or have any questions.
+ */
+
+#ifndef __VBoxImportApplianceWzd_h__
+#define __VBoxImportApplianceWzd_h__
+
+#include "VBoxImportApplianceWzd.gen.h"
+#include "QIAbstractWizard.h"
+#include "QIWithRetranslateUI.h"
+
+class QIWidgetValidator;
+
+class VBoxImportAppliance
+{
+public:
+    static void import (QWidget *aParent = NULL);
+
+    static int minGuestRAM() { return mMinGuestRAM; }
+    static int maxGuestRAM() { return mMaxGuestRAM; }
+    static int minGuestCPUCount() { return mMinGuestCPUCount; }
+    static int maxGuestCPUCount() { return mMaxGuestCPUCount; }
+
+private:
+    /* Private member vars */
+    static void initSystemSettings();
+
+    static int mMinGuestRAM;
+    static int mMaxGuestRAM;
+    static int mMinGuestCPUCount;
+    static int mMaxGuestCPUCount;
+};
+
+class VBoxImportApplianceWzd : public QIWithRetranslateUI<QIAbstractWizard>,
+                               public Ui::VBoxImportApplianceWzd
+{
+    Q_OBJECT;
+
+public:
+    VBoxImportApplianceWzd (QWidget* aParent = NULL);
+
+protected:
+    void retranslateUi();
+
+private slots:
+    void revalidate (QIWidgetValidator *aWval);
+    void enableNext (const QIWidgetValidator *aWval);
+
+    void accept();
+
+    void showNextPage();
+    void onPageShow();
+
+private:
+    QIWidgetValidator *mWValFileSelector;
+};
+
+#endif /* __VBoxImportApplianceWzd_h__ */
+
Index: trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h	(revision 17047)
+++ trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h	(revision 17049)
@@ -372,6 +372,6 @@
     void cannotRunInSelectorMode();
 
-    void cannotImportAppliance (const CAppliance &aAppliance);
-    void cannotImportAppliance (const CProgress &aProgress, const CAppliance &aAppliance);
+    void cannotImportAppliance (CAppliance *aAppliance, QWidget *aParent = NULL);
+    void cannotImportAppliance (const CProgress &aProgress, CAppliance *aAppliance, QWidget *aParent = NULL);
 
     void showRuntimeError (const CConsole &console, bool fatal,
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxImportAppliance.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxImportAppliance.cpp	(revision 17047)
+++ 	(revision )
@@ -1,1113 +1,0 @@
-/** @file
- *
- * VBox frontends: Qt4 GUI ("VirtualBox"):
- * VBoxImportAppliance class implementation
- */
-
-/*
- * Copyright (C) 2009 Sun Microsystems, Inc.
- *
- * 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.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
- * Clara, CA 95054 USA or visit http://www.sun.com if you need
- * additional information or have any questions.
- */
-
-#include "VBoxImportAppliance.h"
-#include "VBoxGlobal.h"
-#include "VBoxProblemReporter.h"
-#include "VBoxFilePathSelectorWidget.h"
-#include "VBoxOSTypeSelectorButton.h"
-
-#include <QItemDelegate>
-#include <QSortFilterProxyModel>
-#include <QHeaderView>
-#include <QLineEdit>
-#include <QSpinBox>
-#include <QComboBox>
-
-class ModelItem;
-
-////////////////////////////////////////////////////////////////////////////////
-// Globals
-
-enum TreeViewSection { DescriptionSection = 0, OriginalValueSection, ConfigValueSection };
-
-////////////////////////////////////////////////////////////////////////////////
-// Private helper class declarations
-
-class VirtualSystemSortProxyModel: public QSortFilterProxyModel
-{
-public:
-    VirtualSystemSortProxyModel (QObject *aParent = NULL);
-
-protected:
-    bool lessThan (const QModelIndex &aLeft, const QModelIndex &aRight) const;
-
-    static KVirtualSystemDescriptionType mSortList[];
-};
-
-class VirtualSystemModel: public QAbstractItemModel
-{
-
-public:
-    VirtualSystemModel (QVector<CVirtualSystemDescription>& aVSDs, QObject *aParent = NULL);
-
-    inline QModelIndex index (int aRow, int aColumn, const QModelIndex &aParent = QModelIndex()) const;
-    inline QModelIndex parent (const QModelIndex &aIndex) const;
-    inline int rowCount (const QModelIndex &aParent = QModelIndex()) const;
-    inline int columnCount (const QModelIndex &aParent = QModelIndex()) const;
-    inline bool setData (const QModelIndex &aIndex, const QVariant &aValue, int aRole);
-    inline QVariant data (const QModelIndex &aIndex, int aRole = Qt::DisplayRole) const;
-    inline Qt::ItemFlags flags (const QModelIndex &aIndex) const;
-    inline QVariant headerData (int aSection, Qt::Orientation aOrientation, int aRole) const;
-
-    inline void restoreDefaults (const QModelIndex& aParent = QModelIndex());
-    inline void putBack();
-
-private:
-    /* Private member vars */
-    ModelItem *mRootItem;
-};
-
-////////////////////////////////////////////////////////////////////////////////
-// ModelItem
-
-enum ModelItemType { RootType, VirtualSystemType, HardwareType };
-
-/* This & the following derived classes represent the data items of a Virtual
-   System. All access/manipulation is done with the help of virtual functions
-   to keep the interface clean. ModelItem is able to handle tree structures
-   with a parent & several children's. */
-class ModelItem
-{
-public:
-    ModelItem (int aNumber, ModelItemType aType, ModelItem *aParent = NULL)
-      : mNumber (aNumber)
-      , mType (aType)
-      , mParentItem (aParent)
-    {}
-
-    ~ModelItem()
-    {
-        qDeleteAll (mChildItems);
-    }
-
-    ModelItem *parent() const { return mParentItem; }
-
-    void appendChild (ModelItem *aChild)
-    {
-        AssertPtr (aChild);
-        mChildItems << aChild;
-    }
-    ModelItem * child (int aRow) const { return mChildItems.value (aRow); }
-
-    int row() const
-    {
-        if (mParentItem)
-            return mParentItem->mChildItems.indexOf (const_cast<ModelItem*> (this));
-
-        return 0;
-    }
-
-    int childCount() const { return mChildItems.count(); }
-    int columnCount() const { return 3; }
-
-    virtual Qt::ItemFlags itemFlags (int aColumn) const { return 0; }
-    virtual bool setData (int aColumn, const QVariant &aValue, int aRole) { return false; }
-    virtual QVariant data (int aColumn, int aRole) const { return QVariant(); }
-    virtual QWidget * createEditor (QWidget *aParent, const QStyleOptionViewItem &aOption, const QModelIndex &aIndex) const { return NULL; }
-    virtual bool setEditorData (QWidget *aEditor, const QModelIndex &aIndex) const { return false; }
-    virtual bool setModelData (QWidget *aEditor, QAbstractItemModel *aModel, const QModelIndex &aIndex) { return false; }
-
-    virtual void restoreDefaults() {}
-    virtual void putBack (QVector<BOOL>& aFinalStates, QVector<QString>& aFinalValues, QVector<QString>& aFinalExtraValues)
-    {
-        for (int i = 0; i < childCount(); ++i)
-            child (i)->putBack (aFinalStates, aFinalValues, aFinalExtraValues);
-    }
-
-    ModelItemType type() const { return mType; }
-
-protected:
-    int mNumber;
-    ModelItemType mType;
-
-    ModelItem *mParentItem;
-    QList<ModelItem*> mChildItems;
-};
-
-/* This class represent a Virtual System with an index. */
-class VirtualSystemItem: public ModelItem
-{
-public:
-    VirtualSystemItem (int aNumber, CVirtualSystemDescription aDesc, ModelItem *aParent)
-      : ModelItem (aNumber, VirtualSystemType, aParent)
-      , mDesc (aDesc)
-    {}
-
-    virtual QVariant data (int aColumn, int aRole) const
-    {
-        QVariant v;
-        if (aColumn == DescriptionSection &&
-            aRole == Qt::DisplayRole)
-            v = VBoxImportApplianceDlg::tr ("Virtual System %1").arg (mNumber + 1);
-        return v;
-    }
-
-    virtual void putBack (QVector<BOOL>& aFinalStates, QVector<QString>& aFinalValues, QVector<QString>& aFinalExtraValues)
-    {
-        /* Resize the vectors */
-        unsigned long count = mDesc.GetCount();
-        aFinalStates.resize (count);
-        aFinalValues.resize (count);
-        aFinalExtraValues.resize (count);
-        /* Recursively fill the vectors */
-        ModelItem::putBack (aFinalStates, aFinalValues, aFinalExtraValues);
-        /* Set all final values at once */
-        mDesc.SetFinalValues (aFinalStates, aFinalValues, aFinalExtraValues);
-    }
-
-private:
-    CVirtualSystemDescription mDesc;
-};
-
-/* This class represent an hardware item of a Virtual System. All values of
-   KVirtualSystemDescriptionType are supported & handled differently. */
-class HardwareItem: public ModelItem
-{
-    friend class VirtualSystemSortProxyModel;
-public:
-
-    HardwareItem (int aNumber,
-                  KVirtualSystemDescriptionType aType,
-                  const QString &aRef,
-                  const QString &aOrigValue,
-                  const QString &aConfigValue,
-                  const QString &aExtraConfigValue,
-                  ModelItem *aParent)
-        : ModelItem (aNumber, HardwareType, aParent)
-        , mType (aType)
-        , mRef (aRef)
-        , mOrigValue (aOrigValue)
-        , mConfigValue (aConfigValue)
-        , mConfigDefaultValue (aConfigValue)
-        , mExtraConfigValue (aExtraConfigValue)
-        , mCheckState (Qt::Checked)
-    {}
-
-    virtual void putBack (QVector<BOOL>& aFinalStates, QVector<QString>& aFinalValues, QVector<QString>& aFinalExtraValues)
-    {
-        aFinalStates[mNumber] = mCheckState == Qt::Checked;
-        aFinalValues[mNumber] = mConfigValue;
-        aFinalExtraValues[mNumber] = mExtraConfigValue;
-        ModelItem::putBack (aFinalStates, aFinalValues, aFinalExtraValues);
-    }
-
-    bool setData (int aColumn, const QVariant &aValue, int aRole)
-    {
-        bool fDone = false;
-        switch (aRole)
-        {
-            case Qt::CheckStateRole:
-            {
-                if (aColumn == ConfigValueSection &&
-                    (mType == KVirtualSystemDescriptionType_Floppy ||
-                     mType == KVirtualSystemDescriptionType_CDROM ||
-                     mType == KVirtualSystemDescriptionType_USBController ||
-                     mType == KVirtualSystemDescriptionType_SoundCard ||
-                     mType == KVirtualSystemDescriptionType_NetworkAdapter))
-                {
-                    mCheckState = static_cast<Qt::CheckState> (aValue.toInt());
-                    fDone = true;
-                }
-                break;
-            }
-            default: break;
-        }
-        return fDone;
-    }
-
-    virtual QVariant data (int aColumn, int aRole) const
-    {
-        QVariant v;
-        switch (aRole)
-        {
-            case Qt::DisplayRole:
-            {
-                if (aColumn == DescriptionSection)
-                {
-                    switch (mType)
-                    {
-                        case KVirtualSystemDescriptionType_Name: v = VBoxImportApplianceDlg::tr ("Name"); break;
-                        case KVirtualSystemDescriptionType_OS: v = VBoxImportApplianceDlg::tr ("Guest OS Type"); break;
-                        case KVirtualSystemDescriptionType_CPU: v = VBoxImportApplianceDlg::tr ("CPU"); break;
-                        case KVirtualSystemDescriptionType_Memory: v = VBoxImportApplianceDlg::tr ("RAM"); break;
-                        case KVirtualSystemDescriptionType_HardDiskControllerIDE: v = VBoxImportApplianceDlg::tr ("Hard Disk Controller IDE"); break;
-                        case KVirtualSystemDescriptionType_HardDiskControllerSATA: v = VBoxImportApplianceDlg::tr ("Hard Disk Controller SATA"); break;
-                        case KVirtualSystemDescriptionType_HardDiskControllerSCSI: v = VBoxImportApplianceDlg::tr ("Hard Disk Controller SCSI"); break;
-                        case KVirtualSystemDescriptionType_CDROM: v = VBoxImportApplianceDlg::tr ("DVD"); break;
-                        case KVirtualSystemDescriptionType_Floppy: v = VBoxImportApplianceDlg::tr ("Floppy"); break;
-                        case KVirtualSystemDescriptionType_NetworkAdapter: v = VBoxImportApplianceDlg::tr ("Network Adapter"); break;
-                        case KVirtualSystemDescriptionType_USBController: v = VBoxImportApplianceDlg::tr ("USB Controller"); break;
-                        case KVirtualSystemDescriptionType_SoundCard: v = VBoxImportApplianceDlg::tr ("Sound Card"); break;
-                        case KVirtualSystemDescriptionType_HardDiskImage: v = VBoxImportApplianceDlg::tr ("Virtual Disk Image"); break;
-                        default: v = VBoxImportApplianceDlg::tr ("Unknown Hardware Item"); break;
-                    }
-                }
-                else if (aColumn == OriginalValueSection)
-                    v = mOrigValue;
-                else if (aColumn == ConfigValueSection)
-                {
-                    switch (mType)
-                    {
-                        case KVirtualSystemDescriptionType_OS: v = vboxGlobal().vmGuestOSTypeDescription (mConfigValue); break;
-                        case KVirtualSystemDescriptionType_Memory: v = mConfigValue + " " + VBoxImportApplianceDlg::tr ("MB"); break;
-                        case KVirtualSystemDescriptionType_SoundCard: v = vboxGlobal().toString (static_cast<KAudioControllerType> (mConfigValue.toInt())); break;
-                        case KVirtualSystemDescriptionType_NetworkAdapter: v = vboxGlobal().toString (static_cast<KNetworkAdapterType> (mConfigValue.toInt())); break;
-                        default: v = mConfigValue; break;
-                    }
-                }
-                break;
-            }
-            case Qt::ToolTipRole:
-            {
-                if (aColumn == ConfigValueSection)
-                {
-                    if (!mOrigValue.isEmpty())
-                        v = VBoxImportApplianceDlg::tr ("<b>Original Value:</b> %1").arg (mOrigValue);
-                }
-                break;
-            }
-            case Qt::DecorationRole:
-            {
-                if (aColumn == DescriptionSection)
-                {
-                    switch (mType)
-                    {
-                        case KVirtualSystemDescriptionType_Name: v = QIcon (":/name_16px.png"); break;
-                        case KVirtualSystemDescriptionType_OS: v = QIcon (":/os_type_16px.png"); break;
-                        case KVirtualSystemDescriptionType_CPU: v = QIcon (":/cpu_16px.png"); break;
-                        case KVirtualSystemDescriptionType_Memory: v = QIcon (":/ram_16px.png"); break;
-                        case KVirtualSystemDescriptionType_HardDiskControllerIDE: v = QIcon (":/ide_16px.png"); break;
-                        case KVirtualSystemDescriptionType_HardDiskControllerSATA: v = QIcon (":/sata_16px.png"); break;
-                        case KVirtualSystemDescriptionType_HardDiskControllerSCSI: v = QIcon (":/scsi_16px.png"); break;
-                        case KVirtualSystemDescriptionType_HardDiskImage: v = QIcon (":/hd_16px.png"); break;
-                        case KVirtualSystemDescriptionType_CDROM: v = QIcon (":/cd_16px.png"); break;
-                        case KVirtualSystemDescriptionType_Floppy: v = QIcon (":/fd_16px.png"); break;
-                        case KVirtualSystemDescriptionType_NetworkAdapter: v = QIcon (":/nw_16px.png"); break;
-                        case KVirtualSystemDescriptionType_USBController: v = QIcon (":/usb_16px.png"); break;
-                        case KVirtualSystemDescriptionType_SoundCard: v = QIcon (":/sound_16px.png"); break;
-                        default: break;
-                    }
-                }
-                else if (aColumn == ConfigValueSection &&
-                         mType == KVirtualSystemDescriptionType_OS)
-                {
-                    v = vboxGlobal().vmGuestOSTypeIcon (mConfigValue).scaledToHeight (16, Qt::SmoothTransformation);
-                }
-                break;
-            }
-            case Qt::FontRole:
-            {
-                /* If the item is unchecked mark it with italic text. */
-                if (aColumn == ConfigValueSection &&
-                    mCheckState == Qt::Unchecked)
-                {
-                    QFont font = qApp->font();
-                    font.setItalic (true);
-                    v = font;
-                }
-                break;
-            }
-            case Qt::ForegroundRole:
-            {
-                /* If the item is unchecked mark it with gray text. */
-                if (aColumn == ConfigValueSection &&
-                    mCheckState == Qt::Unchecked)
-                {
-                    QPalette pal = qApp->palette();
-                    v = pal.brush (QPalette::Disabled, QPalette::WindowText);
-                }
-                break;
-            }
-            case Qt::CheckStateRole:
-            {
-                if (aColumn == ConfigValueSection &&
-                    (mType == KVirtualSystemDescriptionType_Floppy ||
-                     mType == KVirtualSystemDescriptionType_CDROM ||
-                     mType == KVirtualSystemDescriptionType_USBController ||
-                     mType == KVirtualSystemDescriptionType_SoundCard ||
-                     mType == KVirtualSystemDescriptionType_NetworkAdapter))
-                    v = mCheckState;
-                break;
-            }
-        }
-        return v;
-    }
-
-    virtual Qt::ItemFlags itemFlags (int aColumn) const
-    {
-        Qt::ItemFlags flags = 0;
-        if (aColumn == ConfigValueSection)
-        {
-            /* Some items are checkable */
-            if (mType == KVirtualSystemDescriptionType_Floppy ||
-                mType == KVirtualSystemDescriptionType_CDROM ||
-                mType == KVirtualSystemDescriptionType_USBController ||
-                mType == KVirtualSystemDescriptionType_SoundCard ||
-                mType == KVirtualSystemDescriptionType_NetworkAdapter)
-                flags |= Qt::ItemIsUserCheckable;
-            /* Some items are editable */
-            if ((mType == KVirtualSystemDescriptionType_Name ||
-                 mType == KVirtualSystemDescriptionType_OS ||
-                 mType == KVirtualSystemDescriptionType_Memory ||
-                 mType == KVirtualSystemDescriptionType_SoundCard ||
-                 mType == KVirtualSystemDescriptionType_NetworkAdapter ||
-                 mType == KVirtualSystemDescriptionType_HardDiskControllerIDE ||
-                 mType == KVirtualSystemDescriptionType_HardDiskImage) &&
-                mCheckState == Qt::Checked) /* Item has to be enabled */
-                flags |= Qt::ItemIsEditable;
-        }
-        return flags;
-    }
-
-    virtual QWidget * createEditor (QWidget *aParent, const QStyleOptionViewItem &aOption, const QModelIndex &aIndex) const
-    {
-        QWidget *editor = NULL;
-        if (aIndex.column() == ConfigValueSection)
-        {
-            switch (mType)
-            {
-                case KVirtualSystemDescriptionType_OS:
-                {
-                    VBoxOSTypeSelectorButton *e = new VBoxOSTypeSelectorButton (aParent);
-                    /* Fill the background with the highlight color in the case
-                     * the button hasn't a rectangle shape. This prevents the
-                     * display of parts from the current text on the Mac. */
-                    e->setAutoFillBackground (true);
-                    e->setBackgroundRole (QPalette::Highlight);
-                    editor = e;
-                    break;
-                }
-                case KVirtualSystemDescriptionType_Name:
-                {
-                    QLineEdit *e = new QLineEdit (aParent);
-                    editor = e;
-                    break;
-                }
-                case KVirtualSystemDescriptionType_CPU:
-                {
-                    QSpinBox *e = new QSpinBox (aParent);
-                    e->setRange (VBoxImportAppliance::minGuestCPUCount(), VBoxImportAppliance::maxGuestCPUCount());
-                    editor = e;
-                    break;
-                }
-                case KVirtualSystemDescriptionType_Memory:
-                {
-                    QSpinBox *e = new QSpinBox (aParent);
-                    e->setRange (VBoxImportAppliance::minGuestRAM(), VBoxImportAppliance::maxGuestRAM());
-                    e->setSuffix (" " + VBoxImportApplianceDlg::tr ("MB"));
-                    editor = e;
-                    break;
-                }
-                case KVirtualSystemDescriptionType_SoundCard:
-                {
-                    QComboBox *e = new QComboBox (aParent);
-                    e->addItem (vboxGlobal().toString (KAudioControllerType_AC97), KAudioControllerType_AC97);
-                    e->addItem (vboxGlobal().toString (KAudioControllerType_SB16), KAudioControllerType_SB16);
-                    editor = e;
-                    break;
-                }
-                case KVirtualSystemDescriptionType_NetworkAdapter:
-                {
-                    QComboBox *e = new QComboBox (aParent);
-                    e->addItem (vboxGlobal().toString (KNetworkAdapterType_Am79C970A), KNetworkAdapterType_Am79C970A);
-                    e->addItem (vboxGlobal().toString (KNetworkAdapterType_Am79C973), KNetworkAdapterType_Am79C973);
-#ifdef VBOX_WITH_E1000
-                    e->addItem (vboxGlobal().toString (KNetworkAdapterType_I82540EM), KNetworkAdapterType_I82540EM);
-                    e->addItem (vboxGlobal().toString (KNetworkAdapterType_I82543GC), KNetworkAdapterType_I82543GC);
-#endif /* VBOX_WITH_E1000 */
-                    editor = e;
-                    break;
-                }
-                case KVirtualSystemDescriptionType_HardDiskControllerIDE:
-                {
-                    QComboBox *e = new QComboBox (aParent);
-                    e->addItem (vboxGlobal().toString (KIDEControllerType_PIIX3), "PIIX3");
-                    e->addItem (vboxGlobal().toString (KIDEControllerType_PIIX4), "PIIX4");
-                    editor = e;
-                    break;
-                }
-                case KVirtualSystemDescriptionType_HardDiskImage:
-                {
-                /* disabled for now
-                    VBoxFilePathSelectorWidget *e = new VBoxFilePathSelectorWidget (aParent);
-                    e->setMode (VBoxFilePathSelectorWidget::Mode_File);
-                    e->setResetEnabled (false);
-                */
-                    QLineEdit *e = new QLineEdit (aParent);
-                    editor = e;
-                    break;
-                }
-                default: break;
-            }
-        }
-        return editor;
-    }
-
-    virtual bool setEditorData (QWidget *aEditor, const QModelIndex &aIndex) const
-    {
-        bool fDone = false;
-        switch (mType)
-        {
-            case KVirtualSystemDescriptionType_OS:
-            {
-                if (VBoxOSTypeSelectorButton *e = qobject_cast<VBoxOSTypeSelectorButton*> (aEditor))
-                {
-                    e->setOSTypeId (mConfigValue);
-                    fDone = true;
-                }
-                break;
-            }
-            case KVirtualSystemDescriptionType_HardDiskControllerIDE:
-            {
-                if (QComboBox *e = qobject_cast<QComboBox*> (aEditor))
-                {
-                    int i = e->findData (mConfigValue);
-                    if (i != -1)
-                        e->setCurrentIndex (i);
-                    fDone = true;
-                }
-                break;
-            }
-            case KVirtualSystemDescriptionType_CPU:
-            case KVirtualSystemDescriptionType_Memory:
-            {
-                if (QSpinBox *e = qobject_cast<QSpinBox*> (aEditor))
-                {
-                    e->setValue (mConfigValue.toInt());
-                    fDone = true;
-                }
-                break;
-            }
-            case KVirtualSystemDescriptionType_Name:
-            {
-                if (QLineEdit *e = qobject_cast<QLineEdit*> (aEditor))
-                {
-                    e->setText (mConfigValue);
-                    fDone = true;
-                }
-                break;
-            }
-            case KVirtualSystemDescriptionType_SoundCard:
-            case KVirtualSystemDescriptionType_NetworkAdapter:
-            {
-                if (QComboBox *e = qobject_cast<QComboBox*> (aEditor))
-                {
-                    int i = e->findData (mConfigValue.toInt());
-                    if (i != -1)
-                        e->setCurrentIndex (i);
-                    fDone = true;
-                }
-                break;
-            }
-            case KVirtualSystemDescriptionType_HardDiskImage:
-            {
-                /* disabled for now
-                if (VBoxFilePathSelectorWidget *e = qobject_cast<VBoxFilePathSelectorWidget*> (aEditor))
-                {
-                    e->setPath (mConfigValue);
-                */
-                if (QLineEdit *e = qobject_cast<QLineEdit*> (aEditor))
-                {
-                    e->setText (mConfigValue);
-                    fDone = true;
-                }
-                break;
-            }
-            default: break;
-        }
-        return fDone;
-    }
-
-    virtual bool setModelData (QWidget *aEditor, QAbstractItemModel *aModel, const QModelIndex &aIndex)
-    {
-        bool fDone = false;
-        switch (mType)
-        {
-            case KVirtualSystemDescriptionType_OS:
-            {
-                if (VBoxOSTypeSelectorButton *e = qobject_cast<VBoxOSTypeSelectorButton*> (aEditor))
-                {
-                    mConfigValue = e->osTypeId();
-                    fDone = true;
-                }
-                break;
-            }
-            case KVirtualSystemDescriptionType_HardDiskControllerIDE:
-            {
-                if (QComboBox *e = qobject_cast<QComboBox*> (aEditor))
-                {
-                    mConfigValue = e->itemData (e->currentIndex()).toString();
-                    fDone = true;
-                }
-                break;
-            }
-            case KVirtualSystemDescriptionType_CPU:
-            case KVirtualSystemDescriptionType_Memory:
-            {
-                if (QSpinBox *e = qobject_cast<QSpinBox*> (aEditor))
-                {
-                    mConfigValue = QString::number (e->value());
-                    fDone = true;
-                }
-                break;
-            }
-            case KVirtualSystemDescriptionType_Name:
-            {
-                if (QLineEdit *e = qobject_cast<QLineEdit*> (aEditor))
-                {
-                    mConfigValue = e->text();
-                    fDone = true;
-                }
-                break;
-            }
-            case KVirtualSystemDescriptionType_SoundCard:
-            case KVirtualSystemDescriptionType_NetworkAdapter:
-            {
-                if (QComboBox *e = qobject_cast<QComboBox*> (aEditor))
-                {
-                    mConfigValue = e->itemData (e->currentIndex()).toString();
-                    fDone = true;
-                }
-                break;
-            }
-            case KVirtualSystemDescriptionType_HardDiskImage:
-            {
-                /* disabled for now
-                if (VBoxFilePathSelectorWidget *e = qobject_cast<VBoxFilePathSelectorWidget*> (aEditor))
-                {
-                    mConfigValue = e->path();
-                */
-                if (QLineEdit *e = qobject_cast<QLineEdit*> (aEditor))
-                {
-                    mConfigValue = e->text();
-                    fDone = true;
-                }
-                break;
-            }
-            default: break;
-        }
-        return fDone;
-    }
-
-    virtual void restoreDefaults()
-    {
-        mConfigValue = mConfigDefaultValue;
-        mCheckState = Qt::Checked;
-    }
-
-private:
-
-    /* Private member vars */
-    KVirtualSystemDescriptionType mType;
-    QString mRef;
-    QString mOrigValue;
-    QString mConfigValue;
-    QString mConfigDefaultValue;
-    QString mExtraConfigValue;
-    Qt::CheckState mCheckState;
-};
-
-////////////////////////////////////////////////////////////////////////////////
-// VirtualSystemDelegate
-
-/* The delegate is used for creating/handling the different editors for the
-   various types we support. This class forward the requests to the virtual
-   methods of our different ModelItems. If this is not possible the default
-   methods of QItemDelegate are used to get some standard behavior. Note: We
-   have to handle the proxy model ourself. I really don't understand why Qt is
-   not doing this for us. */
-class VirtualSystemDelegate: public QItemDelegate
-{
-public:
-    VirtualSystemDelegate (QAbstractProxyModel *aProxy, QObject *aParent = NULL)
-        : QItemDelegate (aParent)
-        , mProxy (aProxy)
-    {}
-
-    QWidget * createEditor (QWidget *aParent, const QStyleOptionViewItem &aOption, const QModelIndex &aIndex) const
-    {
-        if (!aIndex.isValid())
-            return QItemDelegate::createEditor (aParent, aOption, aIndex);
-
-        QModelIndex index (aIndex);
-        if (mProxy)
-            index = mProxy->mapToSource (aIndex);
-
-        ModelItem *item = static_cast<ModelItem*> (index.internalPointer());
-        QWidget *editor = item->createEditor (aParent, aOption, index);
-
-        if (editor == NULL)
-            return QItemDelegate::createEditor (aParent, aOption, index);
-        else
-            return editor;
-    }
-
-    void setEditorData (QWidget *aEditor, const QModelIndex &aIndex) const
-    {
-        if (!aIndex.isValid())
-            return QItemDelegate::setEditorData (aEditor, aIndex);
-
-        QModelIndex index (aIndex);
-        if (mProxy)
-            index = mProxy->mapToSource (aIndex);
-
-        ModelItem *item = static_cast<ModelItem*> (index.internalPointer());
-
-        if (!item->setEditorData (aEditor, index))
-            QItemDelegate::setEditorData (aEditor, index);
-    }
-
-    void setModelData (QWidget *aEditor, QAbstractItemModel *aModel, const QModelIndex &aIndex) const
-    {
-        if (!aIndex.isValid())
-            return QItemDelegate::setModelData (aEditor, aModel, aIndex);
-
-        QModelIndex index = aModel->index (aIndex.row(), aIndex.column());
-        if (mProxy)
-            index = mProxy->mapToSource (aIndex);
-
-        ModelItem *item = static_cast<ModelItem*> (index.internalPointer());
-        if (!item->setModelData (aEditor, aModel, index))
-            QItemDelegate::setModelData (aEditor, aModel, aIndex);
-    }
-
-    void updateEditorGeometry (QWidget *aEditor, const QStyleOptionViewItem &aOption, const QModelIndex & /* aIndex */) const
-    {
-        if (aEditor)
-            aEditor->setGeometry (aOption.rect);
-    }
-
-    QSize sizeHint (const QStyleOptionViewItem &aOption, const QModelIndex &aIndex) const
-    {
-        QSize size = QItemDelegate::sizeHint (aOption, aIndex);
-#ifdef Q_WS_MAC
-        int h = 28;
-#else /* Q_WS_MAC */
-        int h = 24;
-#endif /* Q_WS_MAC */
-        size.setHeight (RT_MAX (h, size.height()));
-        return size;
-    }
-private:
-    /* Private member vars */
-    QAbstractProxyModel *mProxy;
-};
-
-////////////////////////////////////////////////////////////////////////////////
-// VirtualSystemSortProxyModel
-
-/* How to sort the items in the tree view */
-KVirtualSystemDescriptionType VirtualSystemSortProxyModel::mSortList[] =
-{
-    KVirtualSystemDescriptionType_Name,
-    KVirtualSystemDescriptionType_OS,
-    KVirtualSystemDescriptionType_CPU,
-    KVirtualSystemDescriptionType_Memory,
-    KVirtualSystemDescriptionType_Floppy,
-    KVirtualSystemDescriptionType_CDROM,
-    KVirtualSystemDescriptionType_USBController,
-    KVirtualSystemDescriptionType_SoundCard,
-    KVirtualSystemDescriptionType_NetworkAdapter,
-    KVirtualSystemDescriptionType_HardDiskControllerIDE,
-    KVirtualSystemDescriptionType_HardDiskControllerSATA,
-    KVirtualSystemDescriptionType_HardDiskControllerSCSI
-};
-
-VirtualSystemSortProxyModel::VirtualSystemSortProxyModel (QObject *aParent)
-    : QSortFilterProxyModel (aParent)
-{}
-
-bool VirtualSystemSortProxyModel::lessThan (const QModelIndex &aLeft, const QModelIndex &aRight) const
-{
-    if (!aLeft.isValid() ||
-        !aRight.isValid())
-        return false;
-
-    ModelItem *leftItem = static_cast<ModelItem*> (aLeft.internalPointer());
-    ModelItem *rightItem = static_cast<ModelItem*> (aRight.internalPointer());
-
-    /* We sort hardware types only */
-    if (!(leftItem->type() == HardwareType &&
-          rightItem->type() == HardwareType))
-        return false;
-
-    HardwareItem *hwLeft = static_cast<HardwareItem*> (leftItem);
-    HardwareItem *hwRight = static_cast<HardwareItem*> (rightItem);
-
-    for (unsigned int i = 0; i < RT_ELEMENTS (mSortList); ++i)
-        if (hwLeft->mType == mSortList[i])
-        {
-            for (unsigned int a = 0; a <= i; ++a)
-                if (hwRight->mType == mSortList[a])
-                    return true;
-            return false;
-        }
-
-    return true;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// VirtualSystemModel
-
-/* This class is a wrapper model for our ModelItem. It could be used with any
-   TreeView & forward mostly all calls to the methods of ModelItem. The
-   ModelItems itself are stored as internal pointers in the QModelIndex class. */
-VirtualSystemModel::VirtualSystemModel (QVector<CVirtualSystemDescription>& aVSDs, QObject *aParent /* = NULL */)
-   : QAbstractItemModel (aParent)
-{
-    mRootItem = new ModelItem (0, RootType);
-    for (int a = 0; a < aVSDs.size(); ++a)
-    {
-        CVirtualSystemDescription vs = aVSDs[a];
-
-        VirtualSystemItem *vi = new VirtualSystemItem (a, vs, mRootItem);
-        mRootItem->appendChild (vi);
-
-        /* @todo: ask Dmitry about include/COMDefs.h:232 */
-        QVector<KVirtualSystemDescriptionType> types;
-        QVector<QString> refs;
-        QVector<QString> origValues;
-        QVector<QString> configValues;
-        QVector<QString> extraConfigValues;
-
-        QList<int> hdIndizies;
-        QMap<int, HardwareItem*> controllerMap;
-        vs.GetDescription (types, refs, origValues, configValues, extraConfigValues);
-        for (int i = 0; i < types.size(); ++i)
-        {
-            /* We add the hard disk images in an second step, so save a
-               reference to them. */
-            if (types[i] == KVirtualSystemDescriptionType_HardDiskImage)
-                hdIndizies << i;
-            else
-            {
-                HardwareItem *hi = new HardwareItem (i, types[i], refs[i], origValues[i], configValues[i], extraConfigValues[i], vi);
-                vi->appendChild (hi);
-                /* Save the hard disk controller types in an extra map */
-                if (types[i] == KVirtualSystemDescriptionType_HardDiskControllerIDE ||
-                    types[i] == KVirtualSystemDescriptionType_HardDiskControllerSATA ||
-                    types[i] == KVirtualSystemDescriptionType_HardDiskControllerSCSI)
-                    controllerMap[i] = hi;
-            }
-        }
-        QRegExp rx ("controller=(\\d+);?");
-        /* Now process the hard disk images */
-        for (int a = 0; a < hdIndizies.size(); ++a)
-        {
-            int i = hdIndizies[a];
-            QString ecnf = extraConfigValues[i];
-            if (rx.indexIn (ecnf) != -1)
-            {
-                /* Get the controller */
-                HardwareItem *ci = controllerMap[rx.cap (1).toInt()];
-                if (ci)
-                {
-                    /* New hardware item as child of the controller */
-                    HardwareItem *hi = new HardwareItem (i, types[i], refs[i], origValues[i], configValues[i], extraConfigValues[i], ci);
-                    ci->appendChild (hi);
-                }
-            }
-        }
-    }
-}
-
-QModelIndex VirtualSystemModel::index (int aRow, int aColumn, const QModelIndex &aParent /* = QModelIndex() */) const
-{
-    if (!hasIndex (aRow, aColumn, aParent))
-        return QModelIndex();
-
-    ModelItem *parentItem;
-
-    if (!aParent.isValid())
-        parentItem = mRootItem;
-    else
-        parentItem = static_cast<ModelItem*> (aParent.internalPointer());
-
-    ModelItem *childItem = parentItem->child (aRow);
-    if (childItem)
-        return createIndex (aRow, aColumn, childItem);
-    else
-        return QModelIndex();
-}
-
-QModelIndex VirtualSystemModel::parent (const QModelIndex &aIndex) const
-{
-    if (!aIndex.isValid())
-        return QModelIndex();
-
-    ModelItem *childItem = static_cast<ModelItem*> (aIndex.internalPointer());
-    ModelItem *parentItem = childItem->parent();
-
-    if (parentItem == mRootItem)
-        return QModelIndex();
-
-    return createIndex (parentItem->row(), 0, parentItem);
-}
-
-int VirtualSystemModel::rowCount (const QModelIndex &aParent /* = QModelIndex() */) const
-{
-    ModelItem *parentItem;
-    if (aParent.column() > 0)
-        return 0;
-
-    if (!aParent.isValid())
-        parentItem = mRootItem;
-    else
-        parentItem = static_cast<ModelItem*> (aParent.internalPointer());
-
-    return parentItem->childCount();
-}
-
-int VirtualSystemModel::columnCount (const QModelIndex &aParent /* = QModelIndex() */) const
-{
-    if (aParent.isValid())
-        return static_cast<ModelItem*> (aParent.internalPointer())->columnCount();
-    else
-        return mRootItem->columnCount();
-}
-
-bool VirtualSystemModel::setData (const QModelIndex &aIndex, const QVariant &aValue, int aRole)
-{
-    if (!aIndex.isValid())
-        return false;
-
-    ModelItem *item = static_cast<ModelItem*> (aIndex.internalPointer());
-
-    return item->setData (aIndex.column(), aValue, aRole);
-}
-
-QVariant VirtualSystemModel::data (const QModelIndex &aIndex, int aRole /* = Qt::DisplayRole */) const
-{
-    if (!aIndex.isValid())
-        return QVariant();
-
-    ModelItem *item = static_cast<ModelItem*> (aIndex.internalPointer());
-
-    return item->data (aIndex.column(), aRole);
-}
-
-Qt::ItemFlags VirtualSystemModel::flags (const QModelIndex &aIndex) const
-{
-    if (!aIndex.isValid())
-        return 0;
-
-    ModelItem *item = static_cast<ModelItem*> (aIndex.internalPointer());
-
-    return Qt::ItemIsEnabled | Qt::ItemIsSelectable | item->itemFlags (aIndex.column());
-}
-
-QVariant VirtualSystemModel::headerData (int aSection, Qt::Orientation aOrientation, int aRole) const
-{
-    if (aRole != Qt::DisplayRole ||
-        aOrientation != Qt::Horizontal)
-        return QVariant();
-
-    QString title;
-    switch (aSection)
-    {
-        case DescriptionSection: title = VBoxImportApplianceDlg::tr ("Description"); break;
-        case ConfigValueSection: title = VBoxImportApplianceDlg::tr ("Configuration"); break;
-    }
-    return title;
-}
-
-void VirtualSystemModel::restoreDefaults (const QModelIndex& aParent /* = QModelIndex() */)
-{
-    ModelItem *parentItem;
-
-    if (!aParent.isValid())
-        parentItem = mRootItem;
-    else
-        parentItem = static_cast<ModelItem*> (aParent.internalPointer());
-
-    for (int i = 0; i < parentItem->childCount(); ++i)
-    {
-        parentItem->child (i)->restoreDefaults();
-        restoreDefaults (index (i, 0, aParent));
-    }
-    emit dataChanged (index (0, 0, aParent), index (parentItem->childCount()-1, 0, aParent));
-}
-
-void VirtualSystemModel::putBack()
-{
-    QVector<BOOL> v1;
-    QVector<QString> v2;
-    QVector<QString> v3;
-    mRootItem->putBack (v1, v2, v3);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// VBoxImportAppliance
-
-int VBoxImportAppliance::mMinGuestRAM = -1;
-int VBoxImportAppliance::mMaxGuestRAM = -1;
-int VBoxImportAppliance::mMinGuestCPUCount = -1;
-int VBoxImportAppliance::mMaxGuestCPUCount = -1;
-
-/* static */
-void VBoxImportAppliance::import (QWidget *aParent /* = NULL */)
-{
-    initSystemSettings();
-
-    /* We need a file to import; request one from the user */
-    QString file = VBoxGlobal::getOpenFileName ("",
-                                                VBoxGlobal::tr ("Open Virtualization Format (%1)").arg ("*.ovf"),
-                                                aParent,
-                                                VBoxGlobal::tr ("Select an appliance to import"));
-    if (!file.isEmpty())
-    {
-        CVirtualBox vbox = vboxGlobal().virtualBox();
-        /* Create a appliance object */
-        CAppliance appliance = vbox.CreateAppliance();
-        bool fResult = appliance.isOk();
-        if (fResult)
-        {
-            /* Read the appliance */
-            appliance.Read (file);
-            fResult = appliance.isOk();
-            if (fResult)
-            {
-                /* Now we have to interpret that stuff */
-                appliance.Interpret();
-                fResult = appliance.isOk();
-                if (fResult)
-                {
-                    /* Let the user do some tuning */
-                    VBoxImportApplianceDlg settingsDlg (&appliance, aParent);
-                    if (settingsDlg.exec() == QDialog::Accepted)
-                    {
-                        /* Start the import asynchronously */
-                        CProgress progress;
-                        progress = appliance.ImportMachines();
-                        fResult = appliance.isOk();
-                        if (fResult)
-                        {
-                            /* Show some progress, so the user know whats going on */
-                            vboxProblem().showModalProgressDialog (progress, VBoxImportApplianceDlg::tr ("Importing Appliance ..."), aParent);
-                            if (!progress.isOk() || progress.GetResultCode() != 0)
-                            {
-                                vboxProblem().cannotImportAppliance (progress, appliance);
-                                return;
-                            }
-                        }
-                    }
-                }
-            }
-        }
-        if (!fResult)
-            vboxProblem().cannotImportAppliance (appliance);
-    }
-}
-
-/* static */
-void VBoxImportAppliance::initSystemSettings()
-{
-    if (mMinGuestRAM == -1)
-    {
-        /* We need some global defaults from the current VirtualBox
-           installation */
-        CSystemProperties sp = vboxGlobal().virtualBox().GetSystemProperties();
-        mMinGuestRAM = sp.GetMinGuestRAM();
-        mMaxGuestRAM = sp.GetMaxGuestRAM();
-        mMinGuestCPUCount = sp.GetMinGuestCPUCount();
-        mMaxGuestCPUCount = sp.GetMaxGuestCPUCount();
-    }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// VBoxImportApplianceDlg
-
-VBoxImportApplianceDlg::VBoxImportApplianceDlg (CAppliance *aAppliance, QWidget *aParent)
-    : QIWithRetranslateUI<QIDialog> (aParent)
-    , mAppliance (aAppliance)
-{
-    AssertPtr (aAppliance);
-
-    /* Apply UI decorations */
-    Ui::VBoxImportApplianceDlg::setupUi (this);
-
-    QVector<CVirtualSystemDescription> vsds = aAppliance->GetVirtualSystemDescriptions();
-
-    mModel = new VirtualSystemModel (vsds, this);
-
-    VirtualSystemSortProxyModel *proxy = new VirtualSystemSortProxyModel (this);
-    proxy->setSourceModel (mModel);
-    proxy->sort (DescriptionSection, Qt::DescendingOrder);
-
-    VirtualSystemDelegate *delegate = new VirtualSystemDelegate (proxy, this);
-
-    /* Set our own model */
-    mTvSettings->setModel (proxy);
-    /* Set our own delegate */
-    mTvSettings->setItemDelegate (delegate);
-    /* For now we hide the original column. This data is displayed as tooltip
-       also. */
-    mTvSettings->setColumnHidden (OriginalValueSection, true);
-    /* Make the tree looking nicer */
-    mTvSettings->setRootIsDecorated (false);
-    mTvSettings->setAlternatingRowColors (true);
-    mTvSettings->expandAll();
-    mTvSettings->header()->setStretchLastSection (true);
-    mTvSettings->header()->setResizeMode (QHeaderView::ResizeToContents);
-
-    /* Check for warnings & if there are one display them. */
-    bool fWarningsEnabled = false;
-    for (int i = 0; i < vsds.size(); ++i)
-    {
-        QVector<QString> warnings = vsds[i].GetWarnings();
-        if (warnings.size() > 0)
-        {
-            mWarningTextEdit->append (tr("Virtual System %1:").arg (i+1));
-            foreach (const QString& text, warnings)
-                mWarningTextEdit->append ("- " + text);
-            fWarningsEnabled = true;
-        }
-    }
-    mWarningWidget->setShown (fWarningsEnabled);
-
-    connect (mButtonBox->button (QDialogButtonBox::RestoreDefaults), SIGNAL (clicked ()),
-             this, SLOT (restoreDefaults ()));
-
-    /* Applying language settings */
-    retranslateUi();
-}
-
-void VBoxImportApplianceDlg::accept()
-{
-    mModel->putBack();
-    QIDialog::accept();
-}
-
-void VBoxImportApplianceDlg::retranslateUi()
-{
-    /* Translate uic generated strings */
-    Ui::VBoxImportApplianceDlg::retranslateUi (this);
-
-    mButtonBox->button (QDialogButtonBox::Ok)->setText (tr ("&Import"));
-}
-
-void VBoxImportApplianceDlg::restoreDefaults()
-{
-    mModel->restoreDefaults();
-}
-
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxImportApplianceWgt.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxImportApplianceWgt.cpp	(revision 17049)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxImportApplianceWgt.cpp	(revision 17049)
@@ -0,0 +1,1089 @@
+/** @file
+ *
+ * VBox frontends: Qt4 GUI ("VirtualBox"):
+ * VBoxImportApplianceWgt class implementation
+ */
+
+/*
+ * Copyright (C) 2009 Sun Microsystems, Inc.
+ *
+ * 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.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
+ * Clara, CA 95054 USA or visit http://www.sun.com if you need
+ * additional information or have any questions.
+ */
+
+#include "VBoxImportApplianceWgt.h"
+#include "VBoxImportApplianceWzd.h"
+#include "VBoxGlobal.h"
+#include "VBoxProblemReporter.h"
+#include "VBoxFilePathSelectorWidget.h"
+#include "VBoxOSTypeSelectorButton.h"
+
+#include <QItemDelegate>
+#include <QSortFilterProxyModel>
+#include <QHeaderView>
+#include <QLineEdit>
+#include <QSpinBox>
+#include <QComboBox>
+
+class ModelItem;
+
+////////////////////////////////////////////////////////////////////////////////
+// Globals
+
+enum TreeViewSection { DescriptionSection = 0, OriginalValueSection, ConfigValueSection };
+
+////////////////////////////////////////////////////////////////////////////////
+// Private helper class declarations
+
+class VirtualSystemSortProxyModel: public QSortFilterProxyModel
+{
+public:
+    VirtualSystemSortProxyModel (QObject *aParent = NULL);
+
+protected:
+    bool lessThan (const QModelIndex &aLeft, const QModelIndex &aRight) const;
+
+    static KVirtualSystemDescriptionType mSortList[];
+};
+
+class VirtualSystemModel: public QAbstractItemModel
+{
+
+public:
+    VirtualSystemModel (QVector<CVirtualSystemDescription>& aVSDs, QObject *aParent = NULL);
+
+    inline QModelIndex index (int aRow, int aColumn, const QModelIndex &aParent = QModelIndex()) const;
+    inline QModelIndex parent (const QModelIndex &aIndex) const;
+    inline int rowCount (const QModelIndex &aParent = QModelIndex()) const;
+    inline int columnCount (const QModelIndex &aParent = QModelIndex()) const;
+    inline bool setData (const QModelIndex &aIndex, const QVariant &aValue, int aRole);
+    inline QVariant data (const QModelIndex &aIndex, int aRole = Qt::DisplayRole) const;
+    inline Qt::ItemFlags flags (const QModelIndex &aIndex) const;
+    inline QVariant headerData (int aSection, Qt::Orientation aOrientation, int aRole) const;
+
+    inline void restoreDefaults (const QModelIndex& aParent = QModelIndex());
+    inline void putBack();
+
+private:
+    /* Private member vars */
+    ModelItem *mRootItem;
+};
+
+////////////////////////////////////////////////////////////////////////////////
+// ModelItem
+
+enum ModelItemType { RootType, VirtualSystemType, HardwareType };
+
+/* This & the following derived classes represent the data items of a Virtual
+   System. All access/manipulation is done with the help of virtual functions
+   to keep the interface clean. ModelItem is able to handle tree structures
+   with a parent & several children's. */
+class ModelItem
+{
+public:
+    ModelItem (int aNumber, ModelItemType aType, ModelItem *aParent = NULL)
+      : mNumber (aNumber)
+      , mType (aType)
+      , mParentItem (aParent)
+    {}
+
+    ~ModelItem()
+    {
+        qDeleteAll (mChildItems);
+    }
+
+    ModelItem *parent() const { return mParentItem; }
+
+    void appendChild (ModelItem *aChild)
+    {
+        AssertPtr (aChild);
+        mChildItems << aChild;
+    }
+    ModelItem * child (int aRow) const { return mChildItems.value (aRow); }
+
+    int row() const
+    {
+        if (mParentItem)
+            return mParentItem->mChildItems.indexOf (const_cast<ModelItem*> (this));
+
+        return 0;
+    }
+
+    int childCount() const { return mChildItems.count(); }
+    int columnCount() const { return 3; }
+
+    virtual Qt::ItemFlags itemFlags (int aColumn) const { return 0; }
+    virtual bool setData (int aColumn, const QVariant &aValue, int aRole) { return false; }
+    virtual QVariant data (int aColumn, int aRole) const { return QVariant(); }
+    virtual QWidget * createEditor (QWidget *aParent, const QStyleOptionViewItem &aOption, const QModelIndex &aIndex) const { return NULL; }
+    virtual bool setEditorData (QWidget *aEditor, const QModelIndex &aIndex) const { return false; }
+    virtual bool setModelData (QWidget *aEditor, QAbstractItemModel *aModel, const QModelIndex &aIndex) { return false; }
+
+    virtual void restoreDefaults() {}
+    virtual void putBack (QVector<BOOL>& aFinalStates, QVector<QString>& aFinalValues, QVector<QString>& aFinalExtraValues)
+    {
+        for (int i = 0; i < childCount(); ++i)
+            child (i)->putBack (aFinalStates, aFinalValues, aFinalExtraValues);
+    }
+
+    ModelItemType type() const { return mType; }
+
+protected:
+    int mNumber;
+    ModelItemType mType;
+
+    ModelItem *mParentItem;
+    QList<ModelItem*> mChildItems;
+};
+
+/* This class represent a Virtual System with an index. */
+class VirtualSystemItem: public ModelItem
+{
+public:
+    VirtualSystemItem (int aNumber, CVirtualSystemDescription aDesc, ModelItem *aParent)
+      : ModelItem (aNumber, VirtualSystemType, aParent)
+      , mDesc (aDesc)
+    {}
+
+    virtual QVariant data (int aColumn, int aRole) const
+    {
+        QVariant v;
+        if (aColumn == DescriptionSection &&
+            aRole == Qt::DisplayRole)
+            v = VBoxImportApplianceWgt::tr ("Virtual System %1").arg (mNumber + 1);
+        return v;
+    }
+
+    virtual void putBack (QVector<BOOL>& aFinalStates, QVector<QString>& aFinalValues, QVector<QString>& aFinalExtraValues)
+    {
+        /* Resize the vectors */
+        unsigned long count = mDesc.GetCount();
+        aFinalStates.resize (count);
+        aFinalValues.resize (count);
+        aFinalExtraValues.resize (count);
+        /* Recursively fill the vectors */
+        ModelItem::putBack (aFinalStates, aFinalValues, aFinalExtraValues);
+        /* Set all final values at once */
+        mDesc.SetFinalValues (aFinalStates, aFinalValues, aFinalExtraValues);
+    }
+
+private:
+    CVirtualSystemDescription mDesc;
+};
+
+/* This class represent an hardware item of a Virtual System. All values of
+   KVirtualSystemDescriptionType are supported & handled differently. */
+class HardwareItem: public ModelItem
+{
+    friend class VirtualSystemSortProxyModel;
+public:
+
+    HardwareItem (int aNumber,
+                  KVirtualSystemDescriptionType aType,
+                  const QString &aRef,
+                  const QString &aOrigValue,
+                  const QString &aConfigValue,
+                  const QString &aExtraConfigValue,
+                  ModelItem *aParent)
+        : ModelItem (aNumber, HardwareType, aParent)
+        , mType (aType)
+        , mRef (aRef)
+        , mOrigValue (aOrigValue)
+        , mConfigValue (aConfigValue)
+        , mConfigDefaultValue (aConfigValue)
+        , mExtraConfigValue (aExtraConfigValue)
+        , mCheckState (Qt::Checked)
+    {}
+
+    virtual void putBack (QVector<BOOL>& aFinalStates, QVector<QString>& aFinalValues, QVector<QString>& aFinalExtraValues)
+    {
+        aFinalStates[mNumber] = mCheckState == Qt::Checked;
+        aFinalValues[mNumber] = mConfigValue;
+        aFinalExtraValues[mNumber] = mExtraConfigValue;
+        ModelItem::putBack (aFinalStates, aFinalValues, aFinalExtraValues);
+    }
+
+    bool setData (int aColumn, const QVariant &aValue, int aRole)
+    {
+        bool fDone = false;
+        switch (aRole)
+        {
+            case Qt::CheckStateRole:
+            {
+                if (aColumn == ConfigValueSection &&
+                    (mType == KVirtualSystemDescriptionType_Floppy ||
+                     mType == KVirtualSystemDescriptionType_CDROM ||
+                     mType == KVirtualSystemDescriptionType_USBController ||
+                     mType == KVirtualSystemDescriptionType_SoundCard ||
+                     mType == KVirtualSystemDescriptionType_NetworkAdapter))
+                {
+                    mCheckState = static_cast<Qt::CheckState> (aValue.toInt());
+                    fDone = true;
+                }
+                break;
+            }
+            default: break;
+        }
+        return fDone;
+    }
+
+    virtual QVariant data (int aColumn, int aRole) const
+    {
+        QVariant v;
+        switch (aRole)
+        {
+            case Qt::DisplayRole:
+            {
+                if (aColumn == DescriptionSection)
+                {
+                    switch (mType)
+                    {
+                        case KVirtualSystemDescriptionType_Name: v = VBoxImportApplianceWgt::tr ("Name"); break;
+                        case KVirtualSystemDescriptionType_OS: v = VBoxImportApplianceWgt::tr ("Guest OS Type"); break;
+                        case KVirtualSystemDescriptionType_CPU: v = VBoxImportApplianceWgt::tr ("CPU"); break;
+                        case KVirtualSystemDescriptionType_Memory: v = VBoxImportApplianceWgt::tr ("RAM"); break;
+                        case KVirtualSystemDescriptionType_HardDiskControllerIDE: v = VBoxImportApplianceWgt::tr ("Hard Disk Controller IDE"); break;
+                        case KVirtualSystemDescriptionType_HardDiskControllerSATA: v = VBoxImportApplianceWgt::tr ("Hard Disk Controller SATA"); break;
+                        case KVirtualSystemDescriptionType_HardDiskControllerSCSI: v = VBoxImportApplianceWgt::tr ("Hard Disk Controller SCSI"); break;
+                        case KVirtualSystemDescriptionType_CDROM: v = VBoxImportApplianceWgt::tr ("DVD"); break;
+                        case KVirtualSystemDescriptionType_Floppy: v = VBoxImportApplianceWgt::tr ("Floppy"); break;
+                        case KVirtualSystemDescriptionType_NetworkAdapter: v = VBoxImportApplianceWgt::tr ("Network Adapter"); break;
+                        case KVirtualSystemDescriptionType_USBController: v = VBoxImportApplianceWgt::tr ("USB Controller"); break;
+                        case KVirtualSystemDescriptionType_SoundCard: v = VBoxImportApplianceWgt::tr ("Sound Card"); break;
+                        case KVirtualSystemDescriptionType_HardDiskImage: v = VBoxImportApplianceWgt::tr ("Virtual Disk Image"); break;
+                        default: v = VBoxImportApplianceWgt::tr ("Unknown Hardware Item"); break;
+                    }
+                }
+                else if (aColumn == OriginalValueSection)
+                    v = mOrigValue;
+                else if (aColumn == ConfigValueSection)
+                {
+                    switch (mType)
+                    {
+                        case KVirtualSystemDescriptionType_OS: v = vboxGlobal().vmGuestOSTypeDescription (mConfigValue); break;
+                        case KVirtualSystemDescriptionType_Memory: v = mConfigValue + " " + VBoxImportApplianceWgt::tr ("MB"); break;
+                        case KVirtualSystemDescriptionType_SoundCard: v = vboxGlobal().toString (static_cast<KAudioControllerType> (mConfigValue.toInt())); break;
+                        case KVirtualSystemDescriptionType_NetworkAdapter: v = vboxGlobal().toString (static_cast<KNetworkAdapterType> (mConfigValue.toInt())); break;
+                        default: v = mConfigValue; break;
+                    }
+                }
+                break;
+            }
+            case Qt::ToolTipRole:
+            {
+                if (aColumn == ConfigValueSection)
+                {
+                    if (!mOrigValue.isEmpty())
+                        v = VBoxImportApplianceWgt::tr ("<b>Original Value:</b> %1").arg (mOrigValue);
+                }
+                break;
+            }
+            case Qt::DecorationRole:
+            {
+                if (aColumn == DescriptionSection)
+                {
+                    switch (mType)
+                    {
+                        case KVirtualSystemDescriptionType_Name: v = QIcon (":/name_16px.png"); break;
+                        case KVirtualSystemDescriptionType_OS: v = QIcon (":/os_type_16px.png"); break;
+                        case KVirtualSystemDescriptionType_CPU: v = QIcon (":/cpu_16px.png"); break;
+                        case KVirtualSystemDescriptionType_Memory: v = QIcon (":/ram_16px.png"); break;
+                        case KVirtualSystemDescriptionType_HardDiskControllerIDE: v = QIcon (":/ide_16px.png"); break;
+                        case KVirtualSystemDescriptionType_HardDiskControllerSATA: v = QIcon (":/sata_16px.png"); break;
+                        case KVirtualSystemDescriptionType_HardDiskControllerSCSI: v = QIcon (":/scsi_16px.png"); break;
+                        case KVirtualSystemDescriptionType_HardDiskImage: v = QIcon (":/hd_16px.png"); break;
+                        case KVirtualSystemDescriptionType_CDROM: v = QIcon (":/cd_16px.png"); break;
+                        case KVirtualSystemDescriptionType_Floppy: v = QIcon (":/fd_16px.png"); break;
+                        case KVirtualSystemDescriptionType_NetworkAdapter: v = QIcon (":/nw_16px.png"); break;
+                        case KVirtualSystemDescriptionType_USBController: v = QIcon (":/usb_16px.png"); break;
+                        case KVirtualSystemDescriptionType_SoundCard: v = QIcon (":/sound_16px.png"); break;
+                        default: break;
+                    }
+                }
+                else if (aColumn == ConfigValueSection &&
+                         mType == KVirtualSystemDescriptionType_OS)
+                {
+                    v = vboxGlobal().vmGuestOSTypeIcon (mConfigValue).scaledToHeight (16, Qt::SmoothTransformation);
+                }
+                break;
+            }
+            case Qt::FontRole:
+            {
+                /* If the item is unchecked mark it with italic text. */
+                if (aColumn == ConfigValueSection &&
+                    mCheckState == Qt::Unchecked)
+                {
+                    QFont font = qApp->font();
+                    font.setItalic (true);
+                    v = font;
+                }
+                break;
+            }
+            case Qt::ForegroundRole:
+            {
+                /* If the item is unchecked mark it with gray text. */
+                if (aColumn == ConfigValueSection &&
+                    mCheckState == Qt::Unchecked)
+                {
+                    QPalette pal = qApp->palette();
+                    v = pal.brush (QPalette::Disabled, QPalette::WindowText);
+                }
+                break;
+            }
+            case Qt::CheckStateRole:
+            {
+                if (aColumn == ConfigValueSection &&
+                    (mType == KVirtualSystemDescriptionType_Floppy ||
+                     mType == KVirtualSystemDescriptionType_CDROM ||
+                     mType == KVirtualSystemDescriptionType_USBController ||
+                     mType == KVirtualSystemDescriptionType_SoundCard ||
+                     mType == KVirtualSystemDescriptionType_NetworkAdapter))
+                    v = mCheckState;
+                break;
+            }
+        }
+        return v;
+    }
+
+    virtual Qt::ItemFlags itemFlags (int aColumn) const
+    {
+        Qt::ItemFlags flags = 0;
+        if (aColumn == ConfigValueSection)
+        {
+            /* Some items are checkable */
+            if (mType == KVirtualSystemDescriptionType_Floppy ||
+                mType == KVirtualSystemDescriptionType_CDROM ||
+                mType == KVirtualSystemDescriptionType_USBController ||
+                mType == KVirtualSystemDescriptionType_SoundCard ||
+                mType == KVirtualSystemDescriptionType_NetworkAdapter)
+                flags |= Qt::ItemIsUserCheckable;
+            /* Some items are editable */
+            if ((mType == KVirtualSystemDescriptionType_Name ||
+                 mType == KVirtualSystemDescriptionType_OS ||
+                 mType == KVirtualSystemDescriptionType_Memory ||
+                 mType == KVirtualSystemDescriptionType_SoundCard ||
+                 mType == KVirtualSystemDescriptionType_NetworkAdapter ||
+                 mType == KVirtualSystemDescriptionType_HardDiskControllerIDE ||
+                 mType == KVirtualSystemDescriptionType_HardDiskImage) &&
+                mCheckState == Qt::Checked) /* Item has to be enabled */
+                flags |= Qt::ItemIsEditable;
+        }
+        return flags;
+    }
+
+    virtual QWidget * createEditor (QWidget *aParent, const QStyleOptionViewItem &aOption, const QModelIndex &aIndex) const
+    {
+        QWidget *editor = NULL;
+        if (aIndex.column() == ConfigValueSection)
+        {
+            switch (mType)
+            {
+                case KVirtualSystemDescriptionType_OS:
+                {
+                    VBoxOSTypeSelectorButton *e = new VBoxOSTypeSelectorButton (aParent);
+                    /* Fill the background with the highlight color in the case
+                     * the button hasn't a rectangle shape. This prevents the
+                     * display of parts from the current text on the Mac. */
+                    e->setAutoFillBackground (true);
+                    e->setBackgroundRole (QPalette::Highlight);
+                    editor = e;
+                    break;
+                }
+                case KVirtualSystemDescriptionType_Name:
+                {
+                    QLineEdit *e = new QLineEdit (aParent);
+                    editor = e;
+                    break;
+                }
+                case KVirtualSystemDescriptionType_CPU:
+                {
+                    QSpinBox *e = new QSpinBox (aParent);
+                    e->setRange (VBoxImportAppliance::minGuestCPUCount(), VBoxImportAppliance::maxGuestCPUCount());
+                    editor = e;
+                    break;
+                }
+                case KVirtualSystemDescriptionType_Memory:
+                {
+                    QSpinBox *e = new QSpinBox (aParent);
+                    e->setRange (VBoxImportAppliance::minGuestRAM(), VBoxImportAppliance::maxGuestRAM());
+                    e->setSuffix (" " + VBoxImportApplianceWgt::tr ("MB"));
+                    editor = e;
+                    break;
+                }
+                case KVirtualSystemDescriptionType_SoundCard:
+                {
+                    QComboBox *e = new QComboBox (aParent);
+                    e->addItem (vboxGlobal().toString (KAudioControllerType_AC97), KAudioControllerType_AC97);
+                    e->addItem (vboxGlobal().toString (KAudioControllerType_SB16), KAudioControllerType_SB16);
+                    editor = e;
+                    break;
+                }
+                case KVirtualSystemDescriptionType_NetworkAdapter:
+                {
+                    QComboBox *e = new QComboBox (aParent);
+                    e->addItem (vboxGlobal().toString (KNetworkAdapterType_Am79C970A), KNetworkAdapterType_Am79C970A);
+                    e->addItem (vboxGlobal().toString (KNetworkAdapterType_Am79C973), KNetworkAdapterType_Am79C973);
+#ifdef VBOX_WITH_E1000
+                    e->addItem (vboxGlobal().toString (KNetworkAdapterType_I82540EM), KNetworkAdapterType_I82540EM);
+                    e->addItem (vboxGlobal().toString (KNetworkAdapterType_I82543GC), KNetworkAdapterType_I82543GC);
+#endif /* VBOX_WITH_E1000 */
+                    editor = e;
+                    break;
+                }
+                case KVirtualSystemDescriptionType_HardDiskControllerIDE:
+                {
+                    QComboBox *e = new QComboBox (aParent);
+                    e->addItem (vboxGlobal().toString (KIDEControllerType_PIIX3), "PIIX3");
+                    e->addItem (vboxGlobal().toString (KIDEControllerType_PIIX4), "PIIX4");
+                    editor = e;
+                    break;
+                }
+                case KVirtualSystemDescriptionType_HardDiskImage:
+                {
+                /* disabled for now
+                    VBoxFilePathSelectorWidget *e = new VBoxFilePathSelectorWidget (aParent);
+                    e->setMode (VBoxFilePathSelectorWidget::Mode_File);
+                    e->setResetEnabled (false);
+                */
+                    QLineEdit *e = new QLineEdit (aParent);
+                    editor = e;
+                    break;
+                }
+                default: break;
+            }
+        }
+        return editor;
+    }
+
+    virtual bool setEditorData (QWidget *aEditor, const QModelIndex &aIndex) const
+    {
+        bool fDone = false;
+        switch (mType)
+        {
+            case KVirtualSystemDescriptionType_OS:
+            {
+                if (VBoxOSTypeSelectorButton *e = qobject_cast<VBoxOSTypeSelectorButton*> (aEditor))
+                {
+                    e->setOSTypeId (mConfigValue);
+                    fDone = true;
+                }
+                break;
+            }
+            case KVirtualSystemDescriptionType_HardDiskControllerIDE:
+            {
+                if (QComboBox *e = qobject_cast<QComboBox*> (aEditor))
+                {
+                    int i = e->findData (mConfigValue);
+                    if (i != -1)
+                        e->setCurrentIndex (i);
+                    fDone = true;
+                }
+                break;
+            }
+            case KVirtualSystemDescriptionType_CPU:
+            case KVirtualSystemDescriptionType_Memory:
+            {
+                if (QSpinBox *e = qobject_cast<QSpinBox*> (aEditor))
+                {
+                    e->setValue (mConfigValue.toInt());
+                    fDone = true;
+                }
+                break;
+            }
+            case KVirtualSystemDescriptionType_Name:
+            {
+                if (QLineEdit *e = qobject_cast<QLineEdit*> (aEditor))
+                {
+                    e->setText (mConfigValue);
+                    fDone = true;
+                }
+                break;
+            }
+            case KVirtualSystemDescriptionType_SoundCard:
+            case KVirtualSystemDescriptionType_NetworkAdapter:
+            {
+                if (QComboBox *e = qobject_cast<QComboBox*> (aEditor))
+                {
+                    int i = e->findData (mConfigValue.toInt());
+                    if (i != -1)
+                        e->setCurrentIndex (i);
+                    fDone = true;
+                }
+                break;
+            }
+            case KVirtualSystemDescriptionType_HardDiskImage:
+            {
+                /* disabled for now
+                if (VBoxFilePathSelectorWidget *e = qobject_cast<VBoxFilePathSelectorWidget*> (aEditor))
+                {
+                    e->setPath (mConfigValue);
+                */
+                if (QLineEdit *e = qobject_cast<QLineEdit*> (aEditor))
+                {
+                    e->setText (mConfigValue);
+                    fDone = true;
+                }
+                break;
+            }
+            default: break;
+        }
+        return fDone;
+    }
+
+    virtual bool setModelData (QWidget *aEditor, QAbstractItemModel *aModel, const QModelIndex &aIndex)
+    {
+        bool fDone = false;
+        switch (mType)
+        {
+            case KVirtualSystemDescriptionType_OS:
+            {
+                if (VBoxOSTypeSelectorButton *e = qobject_cast<VBoxOSTypeSelectorButton*> (aEditor))
+                {
+                    mConfigValue = e->osTypeId();
+                    fDone = true;
+                }
+                break;
+            }
+            case KVirtualSystemDescriptionType_HardDiskControllerIDE:
+            {
+                if (QComboBox *e = qobject_cast<QComboBox*> (aEditor))
+                {
+                    mConfigValue = e->itemData (e->currentIndex()).toString();
+                    fDone = true;
+                }
+                break;
+            }
+            case KVirtualSystemDescriptionType_CPU:
+            case KVirtualSystemDescriptionType_Memory:
+            {
+                if (QSpinBox *e = qobject_cast<QSpinBox*> (aEditor))
+                {
+                    mConfigValue = QString::number (e->value());
+                    fDone = true;
+                }
+                break;
+            }
+            case KVirtualSystemDescriptionType_Name:
+            {
+                if (QLineEdit *e = qobject_cast<QLineEdit*> (aEditor))
+                {
+                    mConfigValue = e->text();
+                    fDone = true;
+                }
+                break;
+            }
+            case KVirtualSystemDescriptionType_SoundCard:
+            case KVirtualSystemDescriptionType_NetworkAdapter:
+            {
+                if (QComboBox *e = qobject_cast<QComboBox*> (aEditor))
+                {
+                    mConfigValue = e->itemData (e->currentIndex()).toString();
+                    fDone = true;
+                }
+                break;
+            }
+            case KVirtualSystemDescriptionType_HardDiskImage:
+            {
+                /* disabled for now
+                if (VBoxFilePathSelectorWidget *e = qobject_cast<VBoxFilePathSelectorWidget*> (aEditor))
+                {
+                    mConfigValue = e->path();
+                */
+                if (QLineEdit *e = qobject_cast<QLineEdit*> (aEditor))
+                {
+                    mConfigValue = e->text();
+                    fDone = true;
+                }
+                break;
+            }
+            default: break;
+        }
+        return fDone;
+    }
+
+    virtual void restoreDefaults()
+    {
+        mConfigValue = mConfigDefaultValue;
+        mCheckState = Qt::Checked;
+    }
+
+private:
+
+    /* Private member vars */
+    KVirtualSystemDescriptionType mType;
+    QString mRef;
+    QString mOrigValue;
+    QString mConfigValue;
+    QString mConfigDefaultValue;
+    QString mExtraConfigValue;
+    Qt::CheckState mCheckState;
+};
+
+////////////////////////////////////////////////////////////////////////////////
+// VirtualSystemDelegate
+
+/* The delegate is used for creating/handling the different editors for the
+   various types we support. This class forward the requests to the virtual
+   methods of our different ModelItems. If this is not possible the default
+   methods of QItemDelegate are used to get some standard behavior. Note: We
+   have to handle the proxy model ourself. I really don't understand why Qt is
+   not doing this for us. */
+class VirtualSystemDelegate: public QItemDelegate
+{
+public:
+    VirtualSystemDelegate (QAbstractProxyModel *aProxy, QObject *aParent = NULL)
+        : QItemDelegate (aParent)
+        , mProxy (aProxy)
+    {}
+
+    QWidget * createEditor (QWidget *aParent, const QStyleOptionViewItem &aOption, const QModelIndex &aIndex) const
+    {
+        if (!aIndex.isValid())
+            return QItemDelegate::createEditor (aParent, aOption, aIndex);
+
+        QModelIndex index (aIndex);
+        if (mProxy)
+            index = mProxy->mapToSource (aIndex);
+
+        ModelItem *item = static_cast<ModelItem*> (index.internalPointer());
+        QWidget *editor = item->createEditor (aParent, aOption, index);
+
+        if (editor == NULL)
+            return QItemDelegate::createEditor (aParent, aOption, index);
+        else
+            return editor;
+    }
+
+    void setEditorData (QWidget *aEditor, const QModelIndex &aIndex) const
+    {
+        if (!aIndex.isValid())
+            return QItemDelegate::setEditorData (aEditor, aIndex);
+
+        QModelIndex index (aIndex);
+        if (mProxy)
+            index = mProxy->mapToSource (aIndex);
+
+        ModelItem *item = static_cast<ModelItem*> (index.internalPointer());
+
+        if (!item->setEditorData (aEditor, index))
+            QItemDelegate::setEditorData (aEditor, index);
+    }
+
+    void setModelData (QWidget *aEditor, QAbstractItemModel *aModel, const QModelIndex &aIndex) const
+    {
+        if (!aIndex.isValid())
+            return QItemDelegate::setModelData (aEditor, aModel, aIndex);
+
+        QModelIndex index = aModel->index (aIndex.row(), aIndex.column());
+        if (mProxy)
+            index = mProxy->mapToSource (aIndex);
+
+        ModelItem *item = static_cast<ModelItem*> (index.internalPointer());
+        if (!item->setModelData (aEditor, aModel, index))
+            QItemDelegate::setModelData (aEditor, aModel, aIndex);
+    }
+
+    void updateEditorGeometry (QWidget *aEditor, const QStyleOptionViewItem &aOption, const QModelIndex & /* aIndex */) const
+    {
+        if (aEditor)
+            aEditor->setGeometry (aOption.rect);
+    }
+
+    QSize sizeHint (const QStyleOptionViewItem &aOption, const QModelIndex &aIndex) const
+    {
+        QSize size = QItemDelegate::sizeHint (aOption, aIndex);
+#ifdef Q_WS_MAC
+        int h = 28;
+#else /* Q_WS_MAC */
+        int h = 24;
+#endif /* Q_WS_MAC */
+        size.setHeight (RT_MAX (h, size.height()));
+        return size;
+    }
+private:
+    /* Private member vars */
+    QAbstractProxyModel *mProxy;
+};
+
+////////////////////////////////////////////////////////////////////////////////
+// VirtualSystemSortProxyModel
+
+/* How to sort the items in the tree view */
+KVirtualSystemDescriptionType VirtualSystemSortProxyModel::mSortList[] =
+{
+    KVirtualSystemDescriptionType_Name,
+    KVirtualSystemDescriptionType_OS,
+    KVirtualSystemDescriptionType_CPU,
+    KVirtualSystemDescriptionType_Memory,
+    KVirtualSystemDescriptionType_Floppy,
+    KVirtualSystemDescriptionType_CDROM,
+    KVirtualSystemDescriptionType_USBController,
+    KVirtualSystemDescriptionType_SoundCard,
+    KVirtualSystemDescriptionType_NetworkAdapter,
+    KVirtualSystemDescriptionType_HardDiskControllerIDE,
+    KVirtualSystemDescriptionType_HardDiskControllerSATA,
+    KVirtualSystemDescriptionType_HardDiskControllerSCSI
+};
+
+VirtualSystemSortProxyModel::VirtualSystemSortProxyModel (QObject *aParent)
+    : QSortFilterProxyModel (aParent)
+{}
+
+bool VirtualSystemSortProxyModel::lessThan (const QModelIndex &aLeft, const QModelIndex &aRight) const
+{
+    if (!aLeft.isValid() ||
+        !aRight.isValid())
+        return false;
+
+    ModelItem *leftItem = static_cast<ModelItem*> (aLeft.internalPointer());
+    ModelItem *rightItem = static_cast<ModelItem*> (aRight.internalPointer());
+
+    /* We sort hardware types only */
+    if (!(leftItem->type() == HardwareType &&
+          rightItem->type() == HardwareType))
+        return false;
+
+    HardwareItem *hwLeft = static_cast<HardwareItem*> (leftItem);
+    HardwareItem *hwRight = static_cast<HardwareItem*> (rightItem);
+
+    for (unsigned int i = 0; i < RT_ELEMENTS (mSortList); ++i)
+        if (hwLeft->mType == mSortList[i])
+        {
+            for (unsigned int a = 0; a <= i; ++a)
+                if (hwRight->mType == mSortList[a])
+                    return true;
+            return false;
+        }
+
+    return true;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// VirtualSystemModel
+
+/* This class is a wrapper model for our ModelItem. It could be used with any
+   TreeView & forward mostly all calls to the methods of ModelItem. The
+   ModelItems itself are stored as internal pointers in the QModelIndex class. */
+VirtualSystemModel::VirtualSystemModel (QVector<CVirtualSystemDescription>& aVSDs, QObject *aParent /* = NULL */)
+   : QAbstractItemModel (aParent)
+{
+    mRootItem = new ModelItem (0, RootType);
+    for (int a = 0; a < aVSDs.size(); ++a)
+    {
+        CVirtualSystemDescription vs = aVSDs[a];
+
+        VirtualSystemItem *vi = new VirtualSystemItem (a, vs, mRootItem);
+        mRootItem->appendChild (vi);
+
+        /* @todo: ask Dmitry about include/COMDefs.h:232 */
+        QVector<KVirtualSystemDescriptionType> types;
+        QVector<QString> refs;
+        QVector<QString> origValues;
+        QVector<QString> configValues;
+        QVector<QString> extraConfigValues;
+
+        QList<int> hdIndizies;
+        QMap<int, HardwareItem*> controllerMap;
+        vs.GetDescription (types, refs, origValues, configValues, extraConfigValues);
+        for (int i = 0; i < types.size(); ++i)
+        {
+            /* We add the hard disk images in an second step, so save a
+               reference to them. */
+            if (types[i] == KVirtualSystemDescriptionType_HardDiskImage)
+                hdIndizies << i;
+            else
+            {
+                HardwareItem *hi = new HardwareItem (i, types[i], refs[i], origValues[i], configValues[i], extraConfigValues[i], vi);
+                vi->appendChild (hi);
+                /* Save the hard disk controller types in an extra map */
+                if (types[i] == KVirtualSystemDescriptionType_HardDiskControllerIDE ||
+                    types[i] == KVirtualSystemDescriptionType_HardDiskControllerSATA ||
+                    types[i] == KVirtualSystemDescriptionType_HardDiskControllerSCSI)
+                    controllerMap[i] = hi;
+            }
+        }
+        QRegExp rx ("controller=(\\d+);?");
+        /* Now process the hard disk images */
+        for (int a = 0; a < hdIndizies.size(); ++a)
+        {
+            int i = hdIndizies[a];
+            QString ecnf = extraConfigValues[i];
+            if (rx.indexIn (ecnf) != -1)
+            {
+                /* Get the controller */
+                HardwareItem *ci = controllerMap[rx.cap (1).toInt()];
+                if (ci)
+                {
+                    /* New hardware item as child of the controller */
+                    HardwareItem *hi = new HardwareItem (i, types[i], refs[i], origValues[i], configValues[i], extraConfigValues[i], ci);
+                    ci->appendChild (hi);
+                }
+            }
+        }
+    }
+}
+
+QModelIndex VirtualSystemModel::index (int aRow, int aColumn, const QModelIndex &aParent /* = QModelIndex() */) const
+{
+    if (!hasIndex (aRow, aColumn, aParent))
+        return QModelIndex();
+
+    ModelItem *parentItem;
+
+    if (!aParent.isValid())
+        parentItem = mRootItem;
+    else
+        parentItem = static_cast<ModelItem*> (aParent.internalPointer());
+
+    ModelItem *childItem = parentItem->child (aRow);
+    if (childItem)
+        return createIndex (aRow, aColumn, childItem);
+    else
+        return QModelIndex();
+}
+
+QModelIndex VirtualSystemModel::parent (const QModelIndex &aIndex) const
+{
+    if (!aIndex.isValid())
+        return QModelIndex();
+
+    ModelItem *childItem = static_cast<ModelItem*> (aIndex.internalPointer());
+    ModelItem *parentItem = childItem->parent();
+
+    if (parentItem == mRootItem)
+        return QModelIndex();
+
+    return createIndex (parentItem->row(), 0, parentItem);
+}
+
+int VirtualSystemModel::rowCount (const QModelIndex &aParent /* = QModelIndex() */) const
+{
+    ModelItem *parentItem;
+    if (aParent.column() > 0)
+        return 0;
+
+    if (!aParent.isValid())
+        parentItem = mRootItem;
+    else
+        parentItem = static_cast<ModelItem*> (aParent.internalPointer());
+
+    return parentItem->childCount();
+}
+
+int VirtualSystemModel::columnCount (const QModelIndex &aParent /* = QModelIndex() */) const
+{
+    if (aParent.isValid())
+        return static_cast<ModelItem*> (aParent.internalPointer())->columnCount();
+    else
+        return mRootItem->columnCount();
+}
+
+bool VirtualSystemModel::setData (const QModelIndex &aIndex, const QVariant &aValue, int aRole)
+{
+    if (!aIndex.isValid())
+        return false;
+
+    ModelItem *item = static_cast<ModelItem*> (aIndex.internalPointer());
+
+    return item->setData (aIndex.column(), aValue, aRole);
+}
+
+QVariant VirtualSystemModel::data (const QModelIndex &aIndex, int aRole /* = Qt::DisplayRole */) const
+{
+    if (!aIndex.isValid())
+        return QVariant();
+
+    ModelItem *item = static_cast<ModelItem*> (aIndex.internalPointer());
+
+    return item->data (aIndex.column(), aRole);
+}
+
+Qt::ItemFlags VirtualSystemModel::flags (const QModelIndex &aIndex) const
+{
+    if (!aIndex.isValid())
+        return 0;
+
+    ModelItem *item = static_cast<ModelItem*> (aIndex.internalPointer());
+
+    return Qt::ItemIsEnabled | Qt::ItemIsSelectable | item->itemFlags (aIndex.column());
+}
+
+QVariant VirtualSystemModel::headerData (int aSection, Qt::Orientation aOrientation, int aRole) const
+{
+    if (aRole != Qt::DisplayRole ||
+        aOrientation != Qt::Horizontal)
+        return QVariant();
+
+    QString title;
+    switch (aSection)
+    {
+        case DescriptionSection: title = VBoxImportApplianceWgt::tr ("Description"); break;
+        case ConfigValueSection: title = VBoxImportApplianceWgt::tr ("Configuration"); break;
+    }
+    return title;
+}
+
+void VirtualSystemModel::restoreDefaults (const QModelIndex& aParent /* = QModelIndex() */)
+{
+    ModelItem *parentItem;
+
+    if (!aParent.isValid())
+        parentItem = mRootItem;
+    else
+        parentItem = static_cast<ModelItem*> (aParent.internalPointer());
+
+    for (int i = 0; i < parentItem->childCount(); ++i)
+    {
+        parentItem->child (i)->restoreDefaults();
+        restoreDefaults (index (i, 0, aParent));
+    }
+    emit dataChanged (index (0, 0, aParent), index (parentItem->childCount()-1, 0, aParent));
+}
+
+void VirtualSystemModel::putBack()
+{
+    QVector<BOOL> v1;
+    QVector<QString> v2;
+    QVector<QString> v3;
+    mRootItem->putBack (v1, v2, v3);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// VBoxImportApplianceWgt
+
+VBoxImportApplianceWgt::VBoxImportApplianceWgt (QWidget *aParent)
+    : QIWithRetranslateUI<QWidget> (aParent)
+    , mAppliance (NULL)
+    , mModel (NULL)
+{
+    /* Apply UI decorations */
+    Ui::VBoxImportApplianceWgt::setupUi (this);
+
+    /* Make the tree looking nicer */
+    mTvSettings->setRootIsDecorated (false);
+    mTvSettings->setAlternatingRowColors (true);
+    mTvSettings->header()->setStretchLastSection (true);
+    mTvSettings->header()->setResizeMode (QHeaderView::ResizeToContents);
+
+    /* Applying language settings */
+    retranslateUi();
+}
+
+bool VBoxImportApplianceWgt::setFile (const QString& aFile)
+{
+    bool fResult = false;
+    if (!aFile.isEmpty())
+    {
+        CVirtualBox vbox = vboxGlobal().virtualBox();
+        /* Create a appliance object */
+        mAppliance = new CAppliance(vbox.CreateAppliance());
+        fResult = mAppliance->isOk();
+        if (fResult)
+        {
+            /* Read the appliance */
+            mAppliance->Read (aFile);
+            fResult = mAppliance->isOk();
+            if (fResult)
+            {
+                /* Now we have to interpret that stuff */
+                mAppliance->Interpret();
+                fResult = mAppliance->isOk();
+                if (fResult)
+                {
+                    if (mModel)
+                        delete mModel;
+
+                    QVector<CVirtualSystemDescription> vsds = mAppliance->GetVirtualSystemDescriptions();
+
+                    mModel = new VirtualSystemModel (vsds, this);
+
+                    VirtualSystemSortProxyModel *proxy = new VirtualSystemSortProxyModel (this);
+                    proxy->setSourceModel (mModel);
+                    proxy->sort (DescriptionSection, Qt::DescendingOrder);
+
+                    VirtualSystemDelegate *delegate = new VirtualSystemDelegate (proxy, this);
+
+                    /* Set our own model */
+                    mTvSettings->setModel (proxy);
+                    /* Set our own delegate */
+                    mTvSettings->setItemDelegate (delegate);
+                    /* For now we hide the original column. This data is displayed as tooltip
+                       also. */
+                    mTvSettings->setColumnHidden (OriginalValueSection, true);
+                    mTvSettings->expandAll();
+
+                    /* Check for warnings & if there are one display them. */
+                    bool fWarningsEnabled = false;
+                    for (int i = 0; i < vsds.size(); ++i)
+                    {
+                        QVector<QString> warnings = vsds[i].GetWarnings();
+                        if (warnings.size() > 0)
+                        {
+                            mWarningTextEdit->append (tr("Virtual System %1:").arg (i+1));
+                            foreach (const QString& text, warnings)
+                                mWarningTextEdit->append ("- " + text);
+                            fWarningsEnabled = true;
+                        }
+                    }
+                    mWarningWidget->setShown (fWarningsEnabled);
+                }
+            }
+        }
+        if (!fResult)
+        {
+            vboxProblem().cannotImportAppliance (mAppliance, this);
+            /* Delete the appliance in a case of an error */
+            delete mAppliance;
+            mAppliance = NULL;
+        }
+    }
+    return fResult;
+}
+
+bool VBoxImportApplianceWgt::import()
+{
+    if (mAppliance)
+    {
+        mModel->putBack();
+        /* Start the import asynchronously */
+        CProgress progress;
+        progress = mAppliance->ImportMachines();
+        bool fResult = mAppliance->isOk();
+        if (fResult)
+        {
+            /* Show some progress, so the user know whats going on */
+            vboxProblem().showModalProgressDialog (progress, tr ("Importing Appliance ..."), this);
+            if (!progress.isOk() || progress.GetResultCode() != 0)
+            {
+                vboxProblem().cannotImportAppliance (progress, mAppliance, this);
+                return false;
+            }
+            else
+                return true;
+        }
+        if (!fResult)
+            vboxProblem().cannotImportAppliance (mAppliance, this);
+    }
+    return false;
+}
+
+void VBoxImportApplianceWgt::restoreDefaults()
+{
+    mModel->restoreDefaults();
+}
+
+void VBoxImportApplianceWgt::retranslateUi()
+{
+    /* Translate uic generated strings */
+    Ui::VBoxImportApplianceWgt::retranslateUi (this);
+}
+
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxImportApplianceWzd.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxImportApplianceWzd.cpp	(revision 17049)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxImportApplianceWzd.cpp	(revision 17049)
@@ -0,0 +1,223 @@
+/** @file
+ *
+ * VBox frontends: Qt4 GUI ("VirtualBox"):
+ * VBoxImportAppliance class implementation
+ */
+
+/*
+ * Copyright (C) 2009 Sun Microsystems, Inc.
+ *
+ * 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.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
+ * Clara, CA 95054 USA or visit http://www.sun.com if you need
+ * additional information or have any questions.
+ */
+
+#include "VBoxImportApplianceWzd.h"
+#include "VBoxGlobal.h"
+#include "QIWidgetValidator.h"
+#include "VBoxProblemReporter.h"
+
+#include <QFileInfo>
+
+////////////////////////////////////////////////////////////////////////////////
+// VBoxImportAppliance
+
+int VBoxImportAppliance::mMinGuestRAM = -1;
+int VBoxImportAppliance::mMaxGuestRAM = -1;
+int VBoxImportAppliance::mMinGuestCPUCount = -1;
+int VBoxImportAppliance::mMaxGuestCPUCount = -1;
+
+/* static */
+void VBoxImportAppliance::import (QWidget *aParent /* = NULL */)
+{
+    initSystemSettings();
+
+    VBoxImportApplianceWzd importWzd (aParent);
+    if (importWzd.exec() == QDialog::Accepted)
+    {
+    }
+    return;
+
+#if 0
+    /* We need a file to import; request one from the user */
+    QString file = VBoxGlobal::getOpenFileName ("",
+                                                VBoxGlobal::tr ("Open Virtualization Format (%1)").arg ("*.ovf"),
+                                                aParent,
+                                                VBoxGlobal::tr ("Select an appliance to import"));
+//    QString file = "/home/poetzsch/projects/innotek/plan9.ovf";
+//    QString file = "/Users/poetzsch/projects/innotek/plan9.ovf";
+    if (!file.isEmpty())
+    {
+        CVirtualBox vbox = vboxGlobal().virtualBox();
+        /* Create a appliance object */
+        CAppliance appliance = vbox.CreateAppliance();
+        bool fResult = appliance.isOk();
+        if (fResult)
+        {
+            /* Read the appliance */
+            appliance.Read (file);
+            fResult = appliance.isOk();
+            if (fResult)
+            {
+                /* Now we have to interpret that stuff */
+                appliance.Interpret();
+                fResult = appliance.isOk();
+                if (fResult)
+                {
+                    /* Let the user do some tuning */
+                    VBoxImportApplianceWgt settingsDlg (&appliance, aParent);
+                    if (settingsDlg.exec() == QDialog::Accepted)
+                    {
+                        /* Start the import asynchronously */
+                        CProgress progress;
+                        progress = appliance.ImportMachines();
+                        fResult = appliance.isOk();
+                        if (fResult)
+                        {
+                            /* Show some progress, so the user know whats going on */
+                            vboxProblem().showModalProgressDialog (progress, VBoxImportApplianceWgt::tr ("Importing Appliance ..."), aParent);
+                            if (!progress.isOk() || progress.GetResultCode() != 0)
+                            {
+                                vboxProblem().cannotImportAppliance (progress, appliance);
+                                return;
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        if (!fResult)
+            vboxProblem().cannotImportAppliance (appliance);
+    }
+#endif
+}
+
+/* static */
+void VBoxImportAppliance::initSystemSettings()
+{
+    if (mMinGuestRAM == -1)
+    {
+        /* We need some global defaults from the current VirtualBox
+           installation */
+        CSystemProperties sp = vboxGlobal().virtualBox().GetSystemProperties();
+        mMinGuestRAM = sp.GetMinGuestRAM();
+        mMaxGuestRAM = sp.GetMaxGuestRAM();
+        mMinGuestCPUCount = sp.GetMinGuestCPUCount();
+        mMaxGuestCPUCount = sp.GetMaxGuestCPUCount();
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// VBoxImportApplianceWzd
+
+VBoxImportApplianceWzd::VBoxImportApplianceWzd (QWidget *aParent /* = NULL */)
+    : QIWithRetranslateUI<QIAbstractWizard> (aParent)
+{
+    /* Apply UI decorations */
+    Ui::VBoxImportApplianceWzd::setupUi (this);
+
+    /* Initialize wizard hdr */
+    initializeWizardHdr();
+
+    /* Configure the file selector */
+    mFileSelector->setMode (VBoxFilePathSelectorWidget::Mode_File);
+    mFileSelector->setResetEnabled (false);
+    mFileSelector->setFileDialogTitle (tr ("Select an appliance to import"));
+    mFileSelector->setFileFilters (tr ("Open Virtualization Format (%1)").arg ("*.ovf"));
+//    mFileSelector->setPath ("/home/poetzsch/downloads/Appliances/Plan9.ovf");
+#ifdef Q_WS_MAC
+    /* Editable boxes are uncommon on the Mac */
+    mFileSelector->setEditable (false);
+#endif /* Q_WS_MAC */
+
+    /* Validator for the file selector page */
+    mWValFileSelector = new QIWidgetValidator (mFileSelectPage, this);
+    connect (mWValFileSelector, SIGNAL (validityChanged (const QIWidgetValidator *)),
+             this, SLOT (enableNext (const QIWidgetValidator *)));
+    connect (mWValFileSelector, SIGNAL (isValidRequested (QIWidgetValidator *)),
+             this, SLOT (revalidate (QIWidgetValidator *)));
+    connect (mFileSelector, SIGNAL (pathChanged (const QString &)),
+             mWValFileSelector, SLOT (revalidate()));
+
+    /* Connect the restore button with the settings widget */
+    connect (mBtnRestore, SIGNAL (clicked()),
+             mImportSettingsWgt, SLOT (restoreDefaults()));
+
+    mWValFileSelector->revalidate();
+
+    /* Initialize wizard ftr */
+    initializeWizardFtr();
+
+    retranslateUi();
+}
+
+void VBoxImportApplianceWzd::retranslateUi()
+{
+    /* Translate uic generated strings */
+    Ui::VBoxImportApplianceWzd::retranslateUi (this);
+}
+
+void VBoxImportApplianceWzd::revalidate (QIWidgetValidator *aWval)
+{
+    /* Do individual validations for pages */
+    bool valid = aWval->isOtherValid();
+
+    if (aWval == mWValFileSelector)
+        valid = mFileSelector->path().endsWith (".ovf") &&
+                QFileInfo (mFileSelector->path()).exists();
+
+    aWval->setOtherValid (valid);
+}
+
+void VBoxImportApplianceWzd::enableNext (const QIWidgetValidator *aWval)
+{
+    nextButton (aWval->widget())->setEnabled (aWval->isValid());
+}
+
+void VBoxImportApplianceWzd::accept()
+{
+    if (mImportSettingsWgt->import())
+        QIAbstractWizard::accept();
+}
+
+void VBoxImportApplianceWzd::showNextPage()
+{
+    if (sender() == mBtnNext1)
+    {
+        if (mFileSelector->isModified())
+        {
+            /* Set the file path only if something has changed */
+            mImportSettingsWgt->setFile (mFileSelector->path());
+            /* Reset the modified bit afterwards */
+            mFileSelector->resetModified();
+        }
+
+        /* If we have a valid ovf proceed to the appliance settings page */
+        if (mImportSettingsWgt->isValid())
+            QIAbstractWizard::showNextPage();
+    }
+    else
+        QIAbstractWizard::showNextPage();
+}
+
+void VBoxImportApplianceWzd::onPageShow()
+{
+    /* Make sure all is properly translated & composed */
+    retranslateUi();
+
+    QWidget *page = mPageStack->currentWidget();
+
+    if (page == mSettingsPage)
+        finishButton()->setDefault (true);
+    else
+        nextButton (page)->setDefault (true);
+}
+
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp	(revision 17047)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp	(revision 17049)
@@ -2088,9 +2088,9 @@
 }
 
-void VBoxProblemReporter::cannotImportAppliance (const CAppliance &aAppliance)
-{
-    if (aAppliance.isNull())
-    {
-        message (mainWindowShown(),
+void VBoxProblemReporter::cannotImportAppliance (CAppliance *aAppliance, QWidget *aParent /* = NULL */)
+{
+    if (aAppliance->isNull())
+    {
+        message (aParent ? aParent : mainWindowShown(),
                  Error,
                  tr ("Failed to open appliance."));
@@ -2098,20 +2098,20 @@
     {
         /* Preserve the current error info before calling the object again */
-        COMResult res (aAppliance);
-
-        message (mainWindowShown(),
+        COMResult res (*aAppliance);
+
+        message (aParent ? aParent : mainWindowShown(),
                  Error,
-                 tr ("Failed to open/interpret appliance <b>%1</b>.").arg (aAppliance.GetPath()),
+                 tr ("Failed to open/interpret appliance <b>%1</b>.").arg (aAppliance->GetPath()),
                  formatErrorInfo (res));
     }
 }
 
-void VBoxProblemReporter::cannotImportAppliance (const CProgress &aProgress, const CAppliance& aAppliance)
+void VBoxProblemReporter::cannotImportAppliance (const CProgress &aProgress, CAppliance* aAppliance, QWidget *aParent /* = NULL */)
 {
     AssertWrapperOk (aProgress);
 
-    message (mainWindowShown(),
+    message (aParent ? aParent : mainWindowShown(),
              Error,
-             tr ("Failed to import appliance <b>%1</b>.").arg (aAppliance.GetPath()),
+             tr ("Failed to import appliance <b>%1</b>.").arg (aAppliance->GetPath()),
              formatErrorInfo (aProgress.GetErrorInfo()));
 }
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp	(revision 17047)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp	(revision 17049)
@@ -30,9 +30,10 @@
 #include "VBoxNewVMWzd.h"
 #include "VBoxMediaManagerDlg.h"
-#include "VBoxImportAppliance.h"
+#include "VBoxImportApplianceWzd.h"
 #include "VBoxSettingsDialogSpecific.h"
 #include "VBoxVMLogViewer.h"
 #include "VBoxGlobal.h"
 #include "VBoxUtils.h"
+#include "VBoxChangeLogWgt.h"
 
 #ifdef Q_WS_X11
@@ -48,4 +49,5 @@
 #include <QDesktopWidget>
 #include <QToolButton>
+#include <QFile>
 
 // VBoxVMDetailsView class
@@ -699,4 +701,15 @@
     /* bring the VM list to the focus */
     mVMListView->setFocus();
+
+//    VBoxChangeLogWgt *cl = new VBoxChangeLogWgt (this);
+//    cl->exec();
+
+//    QIMessageBox *mb = new QIMessageBox ("Changlog", "sdfsds", QIMessageBox::Information, 1, 0, 0);
+//    QFile file ("/mnt/data/projects/innotek/vbox/out/linux.amd64/debug/bin/ChangeLog.html");
+//    file.open(QIODevice::ReadOnly);
+//    QString bla (file.readAll());
+//    mb->setDetailsText (bla);
+//    mb->setDetailsShown (true);
+//    mb->exec();
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/ui/VBoxImportApplianceDlg.ui
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/ui/VBoxImportApplianceDlg.ui	(revision 17047)
+++ 	(revision )
@@ -1,146 +1,0 @@
-<ui version="4.0" >
- <class>VBoxImportApplianceDlg</class>
- <widget class="QIDialog" name="VBoxImportApplianceDlg" >
-  <property name="geometry" >
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>573</width>
-    <height>476</height>
-   </rect>
-  </property>
-  <property name="windowTitle" >
-   <string>Appliance Import Settings</string>
-  </property>
-  <property name="sizeGripEnabled" >
-   <bool>true</bool>
-  </property>
-  <property name="modal" >
-   <bool>true</bool>
-  </property>
-  <layout class="QGridLayout" name="gridLayout" >
-   <item row="0" column="0" >
-    <widget class="QLabel" name="mInfoText" >
-     <property name="text" >
-      <string>These are the Virtual Machines as described in the Appliance. VirtualBox has done some initial mapping of the various values. You can change most of the shown properties by double clicking on the items. To disable some of them use the check box near the values.</string>
-     </property>
-     <property name="alignment" >
-      <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-     </property>
-     <property name="wordWrap" >
-      <bool>true</bool>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="0" >
-    <widget class="QTreeView" name="mTvSettings" >
-     <property name="sizePolicy" >
-      <sizepolicy vsizetype="MinimumExpanding" hsizetype="Expanding" >
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-    </widget>
-   </item>
-   <item row="2" column="0" >
-    <widget class="QWidget" native="1" name="mWarningWidget" >
-     <property name="sizePolicy" >
-      <sizepolicy vsizetype="Maximum" hsizetype="Preferred" >
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <layout class="QVBoxLayout" name="verticalLayout" >
-      <property name="sizeConstraint" >
-       <enum>QLayout::SetDefaultConstraint</enum>
-      </property>
-      <property name="margin" >
-       <number>0</number>
-      </property>
-      <item>
-       <widget class="QLabel" name="label" >
-        <property name="text" >
-         <string>Warnings:</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QTextEdit" name="mWarningTextEdit" >
-        <property name="maximumSize" >
-         <size>
-          <width>16777215</width>
-          <height>107</height>
-         </size>
-        </property>
-        <property name="autoFormatting" >
-         <set>QTextEdit::AutoBulletList</set>
-        </property>
-        <property name="readOnly" >
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item row="3" column="0" >
-    <widget class="QIDialogButtonBox" name="mButtonBox" >
-     <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="standardButtons" >
-      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::RestoreDefaults</set>
-     </property>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <customwidgets>
-  <customwidget>
-   <class>QIDialog</class>
-   <extends>QDialog</extends>
-   <header>QIDialog.h</header>
-   <container>1</container>
-  </customwidget>
-  <customwidget>
-   <class>QIDialogButtonBox</class>
-   <extends>QDialogButtonBox</extends>
-   <header>QIDialogButtonBox.h</header>
-  </customwidget>
- </customwidgets>
- <resources/>
- <connections>
-  <connection>
-   <sender>mButtonBox</sender>
-   <signal>accepted()</signal>
-   <receiver>VBoxImportApplianceDlg</receiver>
-   <slot>accept()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>248</x>
-     <y>254</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>157</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>mButtonBox</sender>
-   <signal>rejected()</signal>
-   <receiver>VBoxImportApplianceDlg</receiver>
-   <slot>reject()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>316</x>
-     <y>260</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>286</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
-</ui>
Index: trunk/src/VBox/Frontends/VirtualBox/ui/VBoxImportApplianceWgt.ui
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/ui/VBoxImportApplianceWgt.ui	(revision 17049)
+++ trunk/src/VBox/Frontends/VirtualBox/ui/VBoxImportApplianceWgt.ui	(revision 17049)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>VBoxImportApplianceWgt</class>
+ <widget class="QWidget" name="VBoxImportApplianceWgt">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>459</width>
+    <height>305</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_2">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <item>
+    <widget class="QTreeView" name="mTvSettings">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QWidget" name="mWarningWidget" native="true">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout">
+      <property name="sizeConstraint">
+       <enum>QLayout::SetDefaultConstraint</enum>
+      </property>
+      <property name="margin">
+       <number>0</number>
+      </property>
+      <item>
+       <widget class="QLabel" name="label">
+        <property name="text">
+         <string>Warnings:</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QTextEdit" name="mWarningTextEdit">
+        <property name="maximumSize">
+         <size>
+          <width>16777215</width>
+          <height>107</height>
+         </size>
+        </property>
+        <property name="autoFormatting">
+         <set>QTextEdit::AutoBulletList</set>
+        </property>
+        <property name="readOnly">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
Index: trunk/src/VBox/Frontends/VirtualBox/ui/VBoxImportApplianceWzd.ui
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/ui/VBoxImportApplianceWzd.ui	(revision 17049)
+++ trunk/src/VBox/Frontends/VirtualBox/ui/VBoxImportApplianceWzd.ui	(revision 17049)
@@ -0,0 +1,379 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>VBoxImportApplianceWzd</class>
+ <widget class="QDialog" name="VBoxImportApplianceWzd">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>550</width>
+    <height>380</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Appliance Import Wizard</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <item>
+    <widget class="QStackedWidget" name="mPageStack">
+     <property name="currentIndex">
+      <number>0</number>
+     </property>
+     <widget class="QWidget" name="mFileSelectPage">
+      <layout class="QVBoxLayout" name="verticalLayout_2">
+       <item>
+        <widget class="QLabel" name="mPageWelcomeHdr">
+         <property name="font">
+          <font>
+           <family>Arial</family>
+           <pointsize>12</pointsize>
+           <weight>75</weight>
+           <bold>true</bold>
+          </font>
+         </property>
+         <property name="text">
+          <string>Welcome to the Appliance Import Wizard!</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="Line" name="line11">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QGridLayout" name="gridLayout">
+         <item row="0" column="0" rowspan="3">
+          <widget class="QLabel" name="mLogoWelcome">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Maximum" vsizetype="Minimum">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="autoFillBackground">
+            <bool>true</bool>
+           </property>
+           <property name="text">
+            <string/>
+           </property>
+           <property name="pixmap">
+            <pixmap resource="../VirtualBox.qrc">:/vmw_new_welcome.png</pixmap>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QILabel" name="mTextWelcome">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="minimumSize">
+            <size>
+             <width>300</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="text">
+            <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body&gt;
+&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;This wizard will you guide to the process of importing an Appliance. &lt;/p&gt;
+&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Use the &lt;span style=&quot; font-weight:600;&quot;&gt;Next&lt;/span&gt; button to go the next page of the wizard and the &lt;span style=&quot; font-weight:600;&quot;&gt;Back&lt;/span&gt; button to return to the previous page.&lt;/p&gt;
+&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;In order to import an Appliance you have to select a file describing the Appliance first. Currently VirtualBox supports the Open Virtualization Format (OVF). To continue select the file to import below:&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+           </property>
+           <property name="wordWrap">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1">
+          <spacer name="spacer">
+           <property name="orientation">
+            <enum>Qt::Vertical</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>408</width>
+             <height>258</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item row="1" column="1">
+          <widget class="VBoxFilePathSelectorWidget" name="mFileSelector"/>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <widget class="Line" name="line12">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QHBoxLayout">
+         <item>
+          <spacer>
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>0</width>
+             <height>0</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item>
+          <widget class="QPushButton" name="mBtnBack1">
+           <property name="enabled">
+            <bool>false</bool>
+           </property>
+           <property name="text">
+            <string>&lt; &amp;Back</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="mBtnNext1">
+           <property name="text">
+            <string>&amp;Next &gt;</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer>
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeType">
+            <enum>QSizePolicy::Fixed</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>5</width>
+             <height>0</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item>
+          <widget class="QPushButton" name="mBtnCancel1">
+           <property name="text">
+            <string>Cancel</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="mSettingsPage">
+      <layout class="QVBoxLayout" name="verticalLayout_3">
+       <item>
+        <widget class="QLabel" name="mPageSettingsHdr">
+         <property name="font">
+          <font>
+           <family>Arial</family>
+           <pointsize>12</pointsize>
+           <weight>75</weight>
+           <bold>true</bold>
+          </font>
+         </property>
+         <property name="text">
+          <string>Appliance Import Settings</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="Line" name="line21">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QGridLayout" name="gridLayout_2">
+         <item row="0" column="0" rowspan="2">
+          <widget class="QLabel" name="mLogoSettings">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Maximum" vsizetype="Minimum">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="autoFillBackground">
+            <bool>true</bool>
+           </property>
+           <property name="text">
+            <string/>
+           </property>
+           <property name="pixmap">
+            <pixmap resource="../VirtualBox.qrc">:/vmw_new_welcome.png</pixmap>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QILabel" name="mTextSettings">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="minimumSize">
+            <size>
+             <width>300</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="text">
+            <string>These are the Virtual Machines as described in the Appliance. VirtualBox has done some initial mapping of the various values. You can change most of the shown properties by double clicking on the items. To disable some of them use the check box near the values.</string>
+           </property>
+           <property name="wordWrap">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="VBoxImportApplianceWgt" name="mImportSettingsWgt" native="true">
+           <property name="enabled">
+            <bool>true</bool>
+           </property>
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="minimumSize">
+            <size>
+             <width>0</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="baseSize">
+            <size>
+             <width>0</width>
+             <height>0</height>
+            </size>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <widget class="Line" name="line22">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QHBoxLayout" name="_3">
+         <item>
+          <widget class="QPushButton" name="mBtnRestore">
+           <property name="text">
+            <string>Restore Defaults</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer>
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>0</width>
+             <height>0</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item>
+          <widget class="QPushButton" name="mBtnBack2">
+           <property name="text">
+            <string>&lt; &amp;Back</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="mBtnFinish">
+           <property name="text">
+            <string>&amp;Import &gt;</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer>
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeType">
+            <enum>QSizePolicy::Fixed</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>5</width>
+             <height>0</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item>
+          <widget class="QPushButton" name="mBtnCancel2">
+           <property name="text">
+            <string>Cancel</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+      </layout>
+     </widget>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>QILabel</class>
+   <extends>QLabel</extends>
+   <header>QILabel.h</header>
+  </customwidget>
+  <customwidget>
+   <class>VBoxImportApplianceWgt</class>
+   <extends>QWidget</extends>
+   <header>VBoxImportApplianceWgt.h</header>
+   <container>1</container>
+  </customwidget>
+  <customwidget>
+   <class>VBoxFilePathSelectorWidget</class>
+   <extends>QComboBox</extends>
+   <header>VBoxFilePathSelectorWidget.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources>
+  <include location="../VirtualBox.qrc"/>
+  <include location="../../VirtualBox.qrc"/>
+ </resources>
+ <connections/>
+</ui>
