Index: /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.cpp	(revision 64685)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.cpp	(revision 64686)
@@ -48,6 +48,120 @@
 
 
-////////////////////////////////////////////////////////////////////////////////
-// ModelItem
+/* 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 number, ApplianceModelItemType type, ModelItem *pParent = NULL);
+
+    virtual ~ModelItem();
+
+    ModelItem *parent() const { return m_pParentItem; }
+
+    void appendChild(ModelItem *pChild);
+    ModelItem *child(int row) const;
+
+    int row() const;
+
+    int childCount() const;
+    int columnCount() const { return 3; }
+
+    virtual Qt::ItemFlags itemFlags(int /* column */) const { return 0; }
+    virtual bool setData(int /* column */, const QVariant & /* value */, int /* role */) { return false; }
+    virtual QVariant data(int /* column */, int /* role */) const { return QVariant(); }
+    virtual QWidget *createEditor(QWidget * /* pParent */, const QStyleOptionViewItem & /* styleOption */, const QModelIndex & /* idx */) const { return NULL; }
+    virtual bool setEditorData(QWidget * /* pEditor */, const QModelIndex & /* idx */) const { return false; }
+    virtual bool setModelData(QWidget * /* pEditor */, QAbstractItemModel * /* pModel */, const QModelIndex & /* idx */) { return false; }
+
+    virtual void restoreDefaults() {}
+    virtual void putBack(QVector<BOOL>& finalStates, QVector<QString>& finalValues, QVector<QString>& finalExtraValues);
+
+    ApplianceModelItemType type() const { return m_type; }
+
+protected:
+
+    /* Protected member vars */
+    int                     m_number;
+    ApplianceModelItemType  m_type;
+
+    ModelItem              *m_pParentItem;
+    QList<ModelItem*>       m_childItems;
+};
+
+
+/* This class represent a Virtual System with an index. */
+class VirtualSystemItem: public ModelItem
+{
+public:
+    VirtualSystemItem(int number, CVirtualSystemDescription aDesc, ModelItem *pParent);
+
+    virtual QVariant data(int column, int role) const;
+
+    virtual void putBack(QVector<BOOL>& finalStates, QVector<QString>& finalValues, QVector<QString>& finalExtraValues);
+
+private:
+    CVirtualSystemDescription m_desc;
+};
+
+
+/* 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:
+
+    enum
+    {
+        TypeRole = Qt::UserRole,
+        ModifiedRole
+    };
+
+    HardwareItem(int number,
+                 KVirtualSystemDescriptionType type,
+                 const QString &strRef,
+                 const QString &strOrigValue,
+                 const QString &strConfigValue,
+                 const QString &strExtraConfigValue,
+                 ModelItem *pParent);
+
+    virtual void putBack(QVector<BOOL>& finalStates, QVector<QString>& finalValues, QVector<QString>& finalExtraValues);
+
+    virtual bool setData(int column, const QVariant &value, int role);
+    virtual QVariant data(int column, int role) const;
+
+    virtual Qt::ItemFlags itemFlags(int column) const;
+
+    virtual QWidget *createEditor(QWidget *pParent, const QStyleOptionViewItem &styleOption, const QModelIndex &idx) const;
+    virtual bool setEditorData(QWidget *pEditor, const QModelIndex &idx) const;
+
+    virtual bool setModelData(QWidget *pEditor, QAbstractItemModel *pModel, const QModelIndex &idx);
+
+    virtual void restoreDefaults()
+    {
+        m_strConfigValue = m_strConfigDefaultValue;
+        m_checkState = Qt::Checked;
+    }
+
+private:
+
+    /* Private member vars */
+    KVirtualSystemDescriptionType m_type;
+    QString                       m_strRef;
+    QString                       m_strOrigValue;
+    QString                       m_strConfigValue;
+    QString                       m_strConfigDefaultValue;
+    QString                       m_strExtraConfigValue;
+    Qt::CheckState                m_checkState;
+    bool                          m_fModified;
+};
+
+
+/*********************************************************************************************************************************
+*   Class ModelItem implementation.                                                                                              *
+*********************************************************************************************************************************/
 
 /* This & the following derived classes represent the data items of a Virtual
@@ -96,6 +210,8 @@
 }
 
-////////////////////////////////////////////////////////////////////////////////
-// VirtualSystemItem
+
+/*********************************************************************************************************************************
+*   Class VirtualSystemItem implementation.                                                                                      *
+*********************************************************************************************************************************/
 
 VirtualSystemItem::VirtualSystemItem(int number, CVirtualSystemDescription aDesc, ModelItem *pParent)
@@ -126,6 +242,8 @@
 }
 
-////////////////////////////////////////////////////////////////////////////////
-// HardwareItem
+
+/*********************************************************************************************************************************
+*   Class HardwareItem implementation.                                                                                           *
+*********************************************************************************************************************************/
 
 HardwareItem::HardwareItem(int number,
@@ -723,6 +841,8 @@
 }
 
-////////////////////////////////////////////////////////////////////////////////
-// VirtualSystemModel
+
+/*********************************************************************************************************************************
+*   Class VirtualSystemModel implementation.                                                                                     *
+*********************************************************************************************************************************/
 
 /* This class is a wrapper model for our ModelItem. It could be used with any
@@ -931,6 +1051,8 @@
 }
 
-////////////////////////////////////////////////////////////////////////////////
-// VirtualSystemDelegate
+
+/*********************************************************************************************************************************
+*   Class VirtualSystemDelegate implementation.                                                                                  *
+*********************************************************************************************************************************/
 
 /* The delegate is used for creating/handling the different editors for the
@@ -1023,6 +1145,8 @@
 #endif /* VBOX_WS_MAC */
 
-////////////////////////////////////////////////////////////////////////////////
-// VirtualSystemSortProxyModel
+
+/*********************************************************************************************************************************
+*   Class VirtualSystemSortProxyModel implementation.                                                                            *
+*********************************************************************************************************************************/
 
 /* How to sort the items in the tree view */
@@ -1106,6 +1230,8 @@
 }
 
-////////////////////////////////////////////////////////////////////////////////
-// UIApplianceEditorWidget
+
+/*********************************************************************************************************************************
+*   Class UIApplianceEditorWidget implementation.                                                                                *
+*********************************************************************************************************************************/
 
 int UIApplianceEditorWidget::m_minGuestRAM      = -1;
Index: /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.h	(revision 64685)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.h	(revision 64686)
@@ -16,6 +16,6 @@
  */
 
-#ifndef __UIApplianceEditorWidget_h__
-#define __UIApplianceEditorWidget_h__
+#ifndef ___UIApplianceEditorWidget_h___
+#define ___UIApplianceEditorWidget_h___
 
 /* Qt includes: */
@@ -47,4 +47,5 @@
 };
 
+
 /** Appliance model item types. */
 enum ApplianceModelItemType
@@ -56,125 +57,8 @@
 
 
-/* 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 number, ApplianceModelItemType type, ModelItem *pParent = NULL);
-
-    virtual ~ModelItem();
-
-    ModelItem *parent() const { return m_pParentItem; }
-
-    void appendChild(ModelItem *pChild);
-    ModelItem *child(int row) const;
-
-    int row() const;
-
-    int childCount() const;
-    int columnCount() const { return 3; }
-
-    virtual Qt::ItemFlags itemFlags(int /* column */) const { return 0; }
-    virtual bool setData(int /* column */, const QVariant & /* value */, int /* role */) { return false; }
-    virtual QVariant data(int /* column */, int /* role */) const { return QVariant(); }
-    virtual QWidget *createEditor(QWidget * /* pParent */, const QStyleOptionViewItem & /* styleOption */, const QModelIndex & /* idx */) const { return NULL; }
-    virtual bool setEditorData(QWidget * /* pEditor */, const QModelIndex & /* idx */) const { return false; }
-    virtual bool setModelData(QWidget * /* pEditor */, QAbstractItemModel * /* pModel */, const QModelIndex & /* idx */) { return false; }
-
-    virtual void restoreDefaults() {}
-    virtual void putBack(QVector<BOOL>& finalStates, QVector<QString>& finalValues, QVector<QString>& finalExtraValues);
-
-    ApplianceModelItemType type() const { return m_type; }
-
-protected:
-    /* Protected member vars */
-    int                     m_number;
-    ApplianceModelItemType  m_type;
-
-    ModelItem              *m_pParentItem;
-    QList<ModelItem*>       m_childItems;
-};
-
-////////////////////////////////////////////////////////////////////////////////
-// VirtualSystemItem
-
-/* This class represent a Virtual System with an index. */
-class VirtualSystemItem: public ModelItem
-{
-public:
-    VirtualSystemItem(int number, CVirtualSystemDescription aDesc, ModelItem *pParent);
-
-    virtual QVariant data(int column, int role) const;
-
-    virtual void putBack(QVector<BOOL>& finalStates, QVector<QString>& finalValues, QVector<QString>& finalExtraValues);
-
-private:
-    CVirtualSystemDescription m_desc;
-};
-
-////////////////////////////////////////////////////////////////////////////////
-// HardwareItem
-
-/* 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:
-
-    enum
-    {
-        TypeRole = Qt::UserRole,
-        ModifiedRole
-    };
-
-    HardwareItem(int number,
-                 KVirtualSystemDescriptionType type,
-                 const QString &strRef,
-                 const QString &strOrigValue,
-                 const QString &strConfigValue,
-                 const QString &strExtraConfigValue,
-                 ModelItem *pParent);
-
-    virtual void putBack(QVector<BOOL>& finalStates, QVector<QString>& finalValues, QVector<QString>& finalExtraValues);
-
-    virtual bool setData(int column, const QVariant &value, int role);
-    virtual QVariant data(int column, int role) const;
-
-    virtual Qt::ItemFlags itemFlags(int column) const;
-
-    virtual QWidget *createEditor(QWidget *pParent, const QStyleOptionViewItem &styleOption, const QModelIndex &idx) const;
-    virtual bool setEditorData(QWidget *pEditor, const QModelIndex &idx) const;
-
-    virtual bool setModelData(QWidget *pEditor, QAbstractItemModel *pModel, const QModelIndex &idx);
-
-    virtual void restoreDefaults()
-    {
-        m_strConfigValue = m_strConfigDefaultValue;
-        m_checkState = Qt::Checked;
-    }
-
-private:
-
-    /* Private member vars */
-    KVirtualSystemDescriptionType m_type;
-    QString                       m_strRef;
-    QString                       m_strOrigValue;
-    QString                       m_strConfigValue;
-    QString                       m_strConfigDefaultValue;
-    QString                       m_strExtraConfigValue;
-    Qt::CheckState                m_checkState;
-    bool                          m_fModified;
-};
-
-////////////////////////////////////////////////////////////////////////////////
-// VirtualSystemModel
-
-class VirtualSystemModel: public QAbstractItemModel
-{
-
-public:
+class VirtualSystemModel : public QAbstractItemModel
+{
+public:
+
     VirtualSystemModel(QVector<CVirtualSystemDescription>& aVSDs, QObject *pParent = NULL);
     ~VirtualSystemModel();
@@ -195,10 +79,9 @@
 
 private:
+
     /* Private member vars */
     ModelItem *m_pRootItem;
 };
 
-////////////////////////////////////////////////////////////////////////////////
-// VirtualSystemDelegate
 
 /* The delegate is used for creating/handling the different editors for the
@@ -208,5 +91,5 @@
    have to handle the proxy model ourself. I really don't understand why Qt is
    not doing this for us. */
-class VirtualSystemDelegate: public QItemDelegate
+class VirtualSystemDelegate : public QItemDelegate
 {
 public:
@@ -243,13 +126,13 @@
 };
 
-////////////////////////////////////////////////////////////////////////////////
-// VirtualSystemSortProxyModel
-
-class VirtualSystemSortProxyModel: public QSortFilterProxyModel
-{
-public:
+
+class VirtualSystemSortProxyModel : public QSortFilterProxyModel
+{
+public:
+
     VirtualSystemSortProxyModel(QObject *pParent = NULL);
 
 protected:
+
     bool filterAcceptsRow(int srcRow, const QModelIndex & srcParenIdx) const;
     bool lessThan(const QModelIndex &leftIdx, const QModelIndex &rightIdx) const;
@@ -260,12 +143,11 @@
 };
 
-////////////////////////////////////////////////////////////////////////////////
-// UIApplianceEditorWidget
-
-class UIApplianceEditorWidget: public QIWithRetranslateUI<QWidget>
+
+class UIApplianceEditorWidget : public QIWithRetranslateUI<QWidget>
 {
     Q_OBJECT;
 
 public:
+
     UIApplianceEditorWidget(QWidget *pParent = NULL);
 
@@ -279,7 +161,9 @@
 
 public slots:
+
     void restoreDefaults();
 
 protected:
+
     virtual void retranslateUi();
 
@@ -303,4 +187,5 @@
 
 private:
+
     static void initSystemSettings();
 
@@ -312,4 +197,4 @@
 };
 
-#endif /* __UIApplianceEditorWidget_h__ */
-
+#endif /* !___UIApplianceEditorWidget_h___ */
+
