Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIFormEditorWidget.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIFormEditorWidget.cpp	(revision 78130)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIFormEditorWidget.cpp	(revision 78131)
@@ -48,4 +48,36 @@
 
 
+/** QComboBox extension used as Port editor. */
+class ChoiceEditor : public QComboBox
+{
+    Q_OBJECT;
+    Q_PROPERTY(ChoiceData choice READ choice WRITE setChoice USER true);
+
+public:
+
+    /** Constructs Port-editor passing @a pParent to the base-class. */
+    ChoiceEditor(QWidget *pParent = 0)
+        : QComboBox(pParent) {}
+
+private:
+
+    /** Defines the @a choice. */
+    void setChoice(ChoiceData choice)
+    {
+        addItems(choice.choices().toList());
+        setCurrentIndex(choice.selectedChoice());
+    }
+
+    /** Returns the choice. */
+    ChoiceData choice() const
+    {
+        QVector<QString> choices(count());
+        for (int i = 0; i < count(); ++i)
+            choices[i] = itemText(i);
+        return ChoiceData(choices, currentIndex());
+    }
+};
+
+
 /** QITableViewCell extension used as Form Editor table-view cell. */
 class UIFormEditorCell : public QITableViewCell
@@ -87,4 +119,13 @@
     /** Returns the row value as string. */
     QString valueToString() const;
+
+    /** Returns value cast to bool. */
+    bool toBool() const;
+
+    /** Returns value cast to string. */
+    QString toString() const;
+
+    /** Returns value cast to choice. */
+    ChoiceData toChoice() const;
 
 protected:
@@ -215,4 +256,25 @@
 {
     return m_cells.at(UIFormEditorDataType_Value)->text();
+}
+
+bool UIFormEditorRow::toBool() const
+{
+    AssertReturn(valueType() == KFormValueType_Boolean, false);
+    CBooleanFormValue comValue(m_comValue);
+    return comValue.GetSelected();
+}
+
+QString UIFormEditorRow::toString() const
+{
+    AssertReturn(valueType() == KFormValueType_String, QString());
+    CStringFormValue comValue(m_comValue);
+    return comValue.GetString();
+}
+
+ChoiceData UIFormEditorRow::toChoice() const
+{
+    AssertReturn(valueType() == KFormValueType_Choice, ChoiceData());
+    CChoiceFormValue comValue(m_comValue);
+    return ChoiceData(comValue.GetValues(), comValue.GetSelectedIndex());
 }
 
@@ -380,4 +442,20 @@
     switch (iRole)
     {
+        /* Checkstate role: */
+        case Qt::CheckStateRole:
+        {
+            /* Switch for different columns: */
+            switch (index.column())
+            {
+                case UIFormEditorDataType_Value:
+                    return   m_dataList[index.row()]->valueType() == KFormValueType_Boolean
+                           ? m_dataList[index.row()]->toBool()
+                           ? Qt::Checked
+                           : Qt::Unchecked
+                           : QVariant();
+                default:
+                    return QVariant();
+            }
+        }
         /* Display role: */
         case Qt::DisplayRole:
@@ -396,4 +474,26 @@
             }
         }
+        /* Edit role: */
+        case Qt::EditRole:
+        {
+            /* Switch for different columns: */
+            switch (index.column())
+            {
+                case UIFormEditorDataType_Value:
+                {
+                    switch (m_dataList[index.row()]->valueType())
+                    {
+                        case KFormValueType_String:
+                            return QVariant::fromValue(m_dataList[index.row()]->toString());
+                        case KFormValueType_Choice:
+                            return QVariant::fromValue(m_dataList[index.row()]->toChoice());
+                        default:
+                            return QVariant();
+                    }
+                }
+                default:
+                    return QVariant();
+            }
+        }
         /* Alignment role: */
         case Qt::TextAlignmentRole:
@@ -485,4 +585,27 @@
                 m_pTableView->setModel(m_pTableModel);
 
+            /* We certainly have abstract item delegate: */
+            QAbstractItemDelegate *pAbstractItemDelegate = m_pTableView->itemDelegate();
+            if (pAbstractItemDelegate)
+            {
+                /* But is this also styled item delegate? */
+                QStyledItemDelegate *pStyledItemDelegate = qobject_cast<QStyledItemDelegate*>(pAbstractItemDelegate);
+                if (pStyledItemDelegate)
+                {
+                    /* Create new item editor factory: */
+                    QItemEditorFactory *pNewItemEditorFactory = new QItemEditorFactory;
+                    if (pNewItemEditorFactory)
+                    {
+                        /* Register ChoiceEditor as the ChoiceData editor: */
+                        int iChoiceId = qRegisterMetaType<ChoiceData>();
+                        QStandardItemEditorCreator<ChoiceEditor> *pChoiceEditorItemCreator = new QStandardItemEditorCreator<ChoiceEditor>();
+                        pNewItemEditorFactory->registerEditor((QVariant::Type)iChoiceId, pChoiceEditorItemCreator);
+
+                        /* Set newly created item editor factory for table delegate: */
+                        pStyledItemDelegate->setItemEditorFactory(pNewItemEditorFactory);
+                    }
+                }
+            }
+
             /* Add into layout: */
             pLayout->addWidget(m_pTableView);
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIFormEditorWidget.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIFormEditorWidget.h	(revision 78130)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIFormEditorWidget.h	(revision 78131)
@@ -31,4 +31,30 @@
 
 
+/** Class used to hold choice data. */
+class ChoiceData
+{
+public:
+
+    /** Constructs null choice data. */
+    ChoiceData() {}
+    /** Constructs choice data on the basis of passed @a choices and @a iSelectedChoice. */
+    ChoiceData(const QVector<QString> &choices, int iSelectedChoice)
+        : m_choices(choices), m_iSelectedChoice(iSelectedChoice) {}
+
+    /** Returns choice list. */
+    QVector<QString> choices() const { return m_choices; }
+    /** Returns current selected choice. */
+    int selectedChoice() const { return m_iSelectedChoice; }
+
+private:
+
+    /** Holds choice list. */
+    QVector<QString>  m_choices;
+    /** Holds current selected choice. */
+    int               m_iSelectedChoice;
+};
+Q_DECLARE_METATYPE(ChoiceData);
+
+
 /** QWidget subclass representing model/view Form Editor widget. */
 class UIFormEditorWidget : public QWidget
