Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsPortForwardingDlg.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsPortForwardingDlg.cpp	(revision 64802)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsPortForwardingDlg.cpp	(revision 64803)
@@ -74,10 +74,10 @@
 }
 
-const UIPortForwardingDataList& UIGlobalSettingsPortForwardingDlg::ipv4rules() const
+const UIPortForwardingDataList UIGlobalSettingsPortForwardingDlg::ipv4rules() const
 {
     return m_pIPv4Table->rules();
 }
 
-const UIPortForwardingDataList& UIGlobalSettingsPortForwardingDlg::ipv6rules() const
+const UIPortForwardingDataList UIGlobalSettingsPortForwardingDlg::ipv6rules() const
 {
     return m_pIPv6Table->rules();
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsPortForwardingDlg.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsPortForwardingDlg.h	(revision 64802)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsPortForwardingDlg.h	(revision 64803)
@@ -41,6 +41,6 @@
 
     /* API: Rules stuff: */
-    const UIPortForwardingDataList& ipv4rules() const;
-    const UIPortForwardingDataList& ipv6rules() const;
+    const UIPortForwardingDataList ipv4rules() const;
+    const UIPortForwardingDataList ipv6rules() const;
 
 private slots:
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsPortForwardingDlg.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsPortForwardingDlg.cpp	(revision 64802)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsPortForwardingDlg.cpp	(revision 64803)
@@ -63,5 +63,5 @@
 }
 
-const UIPortForwardingDataList& UIMachineSettingsPortForwardingDlg::rules() const
+const UIPortForwardingDataList UIMachineSettingsPortForwardingDlg::rules() const
 {
     return m_pTable->rules();
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsPortForwardingDlg.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsPortForwardingDlg.h	(revision 64802)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsPortForwardingDlg.h	(revision 64803)
@@ -38,5 +38,5 @@
 
     /* API: Rules stuff: */
-    const UIPortForwardingDataList& rules() const;
+    const UIPortForwardingDataList rules() const;
 
 private slots:
Index: trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPortForwardingTable.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPortForwardingTable.cpp	(revision 64802)
+++ trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPortForwardingTable.cpp	(revision 64803)
@@ -285,4 +285,202 @@
 
 
+/** QITableViewCell extension used as Port Forwarding table-view cell. */
+class UIPortForwardingCell : public QITableViewCell
+{
+    Q_OBJECT;
+
+public:
+
+    /** Constructs table cell passing @a pParent to the base-class.
+      * @param  strName  Brings the name. */
+    UIPortForwardingCell(QITableViewRow *pParent, const NameData &strName)
+        : QITableViewCell(pParent)
+        , m_strText(strName)
+    {}
+
+    /** Constructs table cell passing @a pParent to the base-class.
+      * @param  enmProtocol  Brings the protocol type. */
+    UIPortForwardingCell(QITableViewRow *pParent, KNATProtocol enmProtocol)
+        : QITableViewCell(pParent)
+        , m_strText(gpConverter->toString(enmProtocol))
+    {}
+
+    /** Constructs table cell passing @a pParent to the base-class.
+      * @param  strIp  Brings the IP address. */
+    UIPortForwardingCell(QITableViewRow *pParent, const IpData &strIP)
+        : QITableViewCell(pParent)
+        , m_strText(strIP)
+    {}
+
+    /** Constructs table cell passing @a pParent to the base-class.
+      * @param  uHostPort  Brings the port. */
+    UIPortForwardingCell(QITableViewRow *pParent, PortData uPort)
+        : QITableViewCell(pParent)
+        , m_strText(QString::number(uPort.value()))
+    {}
+
+    /** Returns the cell text. */
+    virtual QString text() const /* override */ { return m_strText; }
+
+private:
+
+    /** Holds the cell text. */
+    QString m_strText;
+};
+
+
+/** QITableViewRow extension used as Port Forwarding table-view row. */
+class UIPortForwardingRow : public QITableViewRow
+{
+    Q_OBJECT;
+
+public:
+
+    /** Constructs table row passing @a pParent to the base-class.
+      * @param  strName      Brings the unique rule name.
+      * @param  enmProtocol  Brings the rule protocol type.
+      * @param  strHostIp    Brings the rule host IP address.
+      * @param  uHostPort    Brings the rule host port.
+      * @param  strGuestIp   Brings the rule guest IP address.
+      * @param  uGuestPort   Brings the rule guest port. */
+    UIPortForwardingRow(QITableView *pParent,
+                        const NameData &strName, KNATProtocol enmProtocol,
+                        const IpData &strHostIp, PortData uHostPort,
+                        const IpData &strGuestIp, PortData uGuestPort)
+        : QITableViewRow(pParent)
+        , m_strName(strName), m_enmProtocol(enmProtocol)
+        , m_strHostIp(strHostIp), m_uHostPort(uHostPort)
+        , m_strGuestIp(strGuestIp), m_uGuestPort(uGuestPort)
+    {
+        /* Create cells: */
+        createCells();
+    }
+
+    /** Destructs table row. */
+    ~UIPortForwardingRow()
+    {
+        /* Destroy cells: */
+        destroyCells();
+    }
+
+    /** Returns the unique rule name. */
+    NameData name() const { return m_strName; }
+    /** Defines the unique rule name. */
+    void setName(const NameData &strName)
+    {
+        m_strName = strName;
+        delete m_cells[UIPortForwardingDataType_Name];
+        m_cells[UIPortForwardingDataType_Name] = new UIPortForwardingCell(this, m_strName);
+    }
+
+    /** Returns the rule protocol type. */
+    KNATProtocol protocol() const { return m_enmProtocol; }
+    /** Defines the rule protocol type. */
+    void setProtocol(KNATProtocol enmProtocol)
+    {
+        m_enmProtocol = enmProtocol;
+        delete m_cells[UIPortForwardingDataType_Protocol];
+        m_cells[UIPortForwardingDataType_Protocol] = new UIPortForwardingCell(this, m_enmProtocol);
+    }
+
+    /** Returns the rule host IP address. */
+    IpData hostIp() const { return m_strHostIp; }
+    /** Defines the rule host IP address. */
+    void setHostIp(const IpData &strHostIp)
+    {
+        m_strHostIp = strHostIp;
+        delete m_cells[UIPortForwardingDataType_HostIp];
+        m_cells[UIPortForwardingDataType_HostIp] = new UIPortForwardingCell(this, m_strHostIp);
+    }
+
+    /** Returns the rule host port. */
+    PortData hostPort() const { return m_uHostPort; }
+    /** Defines the rule host port. */
+    void setHostPort(PortData uHostPort)
+    {
+        m_uHostPort = uHostPort;
+        delete m_cells[UIPortForwardingDataType_HostPort];
+        m_cells[UIPortForwardingDataType_HostPort] = new UIPortForwardingCell(this, m_uHostPort);
+    }
+
+    /** Returns the rule guest IP address. */
+    IpData guestIp() const { return m_strGuestIp; }
+    /** Defines the rule guest IP address. */
+    void setGuestIp(const IpData &strGuestIp)
+    {
+        m_strGuestIp = strGuestIp;
+        delete m_cells[UIPortForwardingDataType_GuestIp];
+        m_cells[UIPortForwardingDataType_GuestIp] = new UIPortForwardingCell(this, m_strGuestIp);
+    }
+
+    /** Returns the rule guest port. */
+    PortData guestPort() const { return m_uGuestPort; }
+    /** Defines the rule guest port. */
+    void setGuestPort(PortData uGuestPort)
+    {
+        m_uGuestPort = uGuestPort;
+        delete m_cells[UIPortForwardingDataType_GuestPort];
+        m_cells[UIPortForwardingDataType_GuestPort] = new UIPortForwardingCell(this, m_uGuestPort);
+    }
+
+protected:
+
+    /** Returns the number of children. */
+    virtual int childCount() const /* override */
+    {
+        /* Return cell count: */
+        return UIPortForwardingDataType_Max;
+    }
+
+    /** Returns the child item with @a iIndex. */
+    virtual QITableViewCell *childItem(int iIndex) const /* override */
+    {
+        /* Make sure index within the bounds: */
+        AssertReturn(iIndex >= 0 && iIndex < m_cells.size(), 0);
+        /* Return corresponding cell: */
+        return m_cells[iIndex];
+    }
+
+private:
+
+    /** Creates cells. */
+    void createCells()
+    {
+        /* Create cells on the basis of variables we have: */
+        m_cells.resize(UIPortForwardingDataType_Max);
+        m_cells[UIPortForwardingDataType_Name] = new UIPortForwardingCell(this, m_strName);
+        m_cells[UIPortForwardingDataType_Protocol] = new UIPortForwardingCell(this, m_enmProtocol);
+        m_cells[UIPortForwardingDataType_HostIp] = new UIPortForwardingCell(this, m_strHostIp);
+        m_cells[UIPortForwardingDataType_HostPort] = new UIPortForwardingCell(this, m_uHostPort);
+        m_cells[UIPortForwardingDataType_GuestIp] = new UIPortForwardingCell(this, m_strGuestIp);
+        m_cells[UIPortForwardingDataType_GuestPort] = new UIPortForwardingCell(this, m_uGuestPort);
+    }
+
+    /** Destroys cells. */
+    void destroyCells()
+    {
+        /* Destroy cells: */
+        qDeleteAll(m_cells);
+        m_cells.clear();
+    }
+
+    /** Holds the unique rule name. */
+    NameData m_strName;
+    /** Holds the rule protocol type. */
+    KNATProtocol m_enmProtocol;
+    /** Holds the rule host IP address. */
+    IpData m_strHostIp;
+    /** Holds the rule host port. */
+    PortData m_uHostPort;
+    /** Holds the rule guest IP address. */
+    IpData m_strGuestIp;
+    /** Holds the rule guest port. */
+    PortData m_uGuestPort;
+
+    /** Holds the cell instances. */
+    QVector<UIPortForwardingCell*> m_cells;
+};
+
+
 /* Port forwarding data model: */
 class UIPortForwardingModel : public QAbstractTableModel
@@ -294,10 +492,10 @@
     /** Constructs Port Forwarding model passing @a pParent to the base-class.
       * @param  rules  Brings the list of port forwarding rules to load initially. */
-    UIPortForwardingModel(QITableView *pParent, const UIPortForwardingDataList &rules = UIPortForwardingDataList())
-        : QAbstractTableModel(pParent)
-        , m_dataList(rules) {}
+    UIPortForwardingModel(QITableView *pParent, const UIPortForwardingDataList &rules = UIPortForwardingDataList());
+    /** Destructs Port Forwarding model. */
+    ~UIPortForwardingModel();
 
     /* API: Rule stuff: */
-    const UIPortForwardingDataList& rules() const { return m_dataList; }
+    const UIPortForwardingDataList rules() const;
     void addRule(const QModelIndex &index);
     void delRule(const QModelIndex &index);
@@ -325,5 +523,5 @@
 
     /* Variable: Data stuff: */
-    UIPortForwardingDataList m_dataList;
+    QList<UIPortForwardingRow*> m_dataList;
 };
 
@@ -332,4 +530,33 @@
 *   Class UIPortForwardingModel implementation.                                                                                  *
 *********************************************************************************************************************************/
+
+UIPortForwardingModel::UIPortForwardingModel(QITableView *pParent, const UIPortForwardingDataList &rules /* = UIPortForwardingDataList() */)
+    : QAbstractTableModel(pParent)
+{
+    /* Fetch the incoming data: */
+    foreach (const UIPortForwardingData &rule, rules)
+        m_dataList << new UIPortForwardingRow(pParent,
+                                              rule.name, rule.protocol,
+                                              rule.hostIp, rule.hostPort,
+                                              rule.guestIp, rule.guestPort);
+}
+
+UIPortForwardingModel::~UIPortForwardingModel()
+{
+    /* Delete the cached data: */
+    qDeleteAll(m_dataList);
+    m_dataList.clear();
+}
+
+const UIPortForwardingDataList UIPortForwardingModel::rules() const
+{
+    /* Return the cached data: */
+    UIPortForwardingDataList data;
+    foreach (const UIPortForwardingRow *pRow, m_dataList)
+        data << UIPortForwardingData(pRow->name(), pRow->protocol(),
+                                     pRow->hostIp(), pRow->hostPort(),
+                                     pRow->guestIp(), pRow->guestPort());
+    return data;
+}
 
 void UIPortForwardingModel::addRule(const QModelIndex &index)
@@ -341,15 +568,17 @@
     QRegExp regExp(strTemplate.arg("(\\d+)"));
     for (int i = 0; i < m_dataList.size(); ++i)
-        if (regExp.indexIn(m_dataList[i].name) > -1)
+        if (regExp.indexIn(m_dataList[i]->name()) > -1)
             uMaxIndex = regExp.cap(1).toUInt() > uMaxIndex ? regExp.cap(1).toUInt() : uMaxIndex;
     /* If index is valid => copy data: */
     if (index.isValid())
-        m_dataList << UIPortForwardingData(strTemplate.arg(++uMaxIndex), m_dataList[index.row()].protocol,
-                                           m_dataList[index.row()].hostIp, m_dataList[index.row()].hostPort,
-                                           m_dataList[index.row()].guestIp, m_dataList[index.row()].guestPort);
+        m_dataList << new UIPortForwardingRow(parentTable(),
+                                              strTemplate.arg(++uMaxIndex), m_dataList[index.row()]->protocol(),
+                                              m_dataList[index.row()]->hostIp(), m_dataList[index.row()]->hostPort(),
+                                              m_dataList[index.row()]->guestIp(), m_dataList[index.row()]->guestPort());
     /* If index is NOT valid => use default values: */
     else
-        m_dataList << UIPortForwardingData(strTemplate.arg(++uMaxIndex), KNATProtocol_TCP,
-                                           QString(""), 0, QString(""), 0);
+        m_dataList << new UIPortForwardingRow(parentTable(),
+                                              strTemplate.arg(++uMaxIndex), KNATProtocol_TCP,
+                                              QString(""), 0, QString(""), 0);
     endInsertRows();
 }
@@ -360,4 +589,5 @@
         return;
     beginRemoveRows(QModelIndex(), index.row(), index.row());
+    delete m_dataList.at(index.row());
     m_dataList.removeAt(index.row());
     endRemoveRows();
@@ -418,10 +648,10 @@
             switch (index.column())
             {
-                case UIPortForwardingDataType_Name: return m_dataList[index.row()].name;
-                case UIPortForwardingDataType_Protocol: return gpConverter->toString(m_dataList[index.row()].protocol);
-                case UIPortForwardingDataType_HostIp: return m_dataList[index.row()].hostIp;
-                case UIPortForwardingDataType_HostPort: return m_dataList[index.row()].hostPort.value();
-                case UIPortForwardingDataType_GuestIp: return m_dataList[index.row()].guestIp;
-                case UIPortForwardingDataType_GuestPort: return m_dataList[index.row()].guestPort.value();
+                case UIPortForwardingDataType_Name: return m_dataList[index.row()]->name();
+                case UIPortForwardingDataType_Protocol: return gpConverter->toString(m_dataList[index.row()]->protocol());
+                case UIPortForwardingDataType_HostIp: return m_dataList[index.row()]->hostIp();
+                case UIPortForwardingDataType_HostPort: return m_dataList[index.row()]->hostPort().value();
+                case UIPortForwardingDataType_GuestIp: return m_dataList[index.row()]->guestIp();
+                case UIPortForwardingDataType_GuestPort: return m_dataList[index.row()]->guestPort().value();
                 default: return QVariant();
             }
@@ -433,10 +663,10 @@
             switch (index.column())
             {
-                case UIPortForwardingDataType_Name: return QVariant::fromValue(m_dataList[index.row()].name);
-                case UIPortForwardingDataType_Protocol: return QVariant::fromValue(m_dataList[index.row()].protocol);
-                case UIPortForwardingDataType_HostIp: return QVariant::fromValue(m_dataList[index.row()].hostIp);
-                case UIPortForwardingDataType_HostPort: return QVariant::fromValue(m_dataList[index.row()].hostPort);
-                case UIPortForwardingDataType_GuestIp: return QVariant::fromValue(m_dataList[index.row()].guestIp);
-                case UIPortForwardingDataType_GuestPort: return QVariant::fromValue(m_dataList[index.row()].guestPort);
+                case UIPortForwardingDataType_Name: return QVariant::fromValue(m_dataList[index.row()]->name());
+                case UIPortForwardingDataType_Protocol: return QVariant::fromValue(m_dataList[index.row()]->protocol());
+                case UIPortForwardingDataType_HostIp: return QVariant::fromValue(m_dataList[index.row()]->hostIp());
+                case UIPortForwardingDataType_HostPort: return QVariant::fromValue(m_dataList[index.row()]->hostPort());
+                case UIPortForwardingDataType_GuestIp: return QVariant::fromValue(m_dataList[index.row()]->guestIp());
+                case UIPortForwardingDataType_GuestPort: return QVariant::fromValue(m_dataList[index.row()]->guestPort());
                 default: return QVariant();
             }
@@ -485,25 +715,25 @@
     {
         case UIPortForwardingDataType_Name:
-            m_dataList[index.row()].name = value.value<NameData>();
+            m_dataList[index.row()]->setName(value.value<NameData>());
             emit dataChanged(index, index);
             return true;
         case UIPortForwardingDataType_Protocol:
-            m_dataList[index.row()].protocol = value.value<KNATProtocol>();
+            m_dataList[index.row()]->setProtocol(value.value<KNATProtocol>());
             emit dataChanged(index, index);
             return true;
         case UIPortForwardingDataType_HostIp:
-            m_dataList[index.row()].hostIp = value.value<IpData>();
+            m_dataList[index.row()]->setHostIp(value.value<IpData>());
             emit dataChanged(index, index);
             return true;
         case UIPortForwardingDataType_HostPort:
-            m_dataList[index.row()].hostPort = value.value<PortData>();
+            m_dataList[index.row()]->setHostPort(value.value<PortData>());
             emit dataChanged(index, index);
             return true;
         case UIPortForwardingDataType_GuestIp:
-            m_dataList[index.row()].guestIp = value.value<IpData>();
+            m_dataList[index.row()]->setGuestIp(value.value<IpData>());
             emit dataChanged(index, index);
             return true;
         case UIPortForwardingDataType_GuestPort:
-            m_dataList[index.row()].guestPort = value.value<PortData>();
+            m_dataList[index.row()]->setGuestPort(value.value<PortData>());
             emit dataChanged(index, index);
             return true;
@@ -658,5 +888,5 @@
 }
 
-const UIPortForwardingDataList& UIPortForwardingTable::rules() const
+const UIPortForwardingDataList UIPortForwardingTable::rules() const
 {
     return m_pModel->rules();
Index: trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPortForwardingTable.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPortForwardingTable.h	(revision 64802)
+++ trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPortForwardingTable.h	(revision 64803)
@@ -133,5 +133,5 @@
 
     /* API: Rules stuff: */
-    const UIPortForwardingDataList& rules() const;
+    const UIPortForwardingDataList rules() const;
     bool validate() const;
 
