Index: /trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 63850)
+++ /trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 63851)
@@ -565,4 +565,5 @@
 	src/selector/UIVirtualBoxEventHandler.cpp \
 	src/selector/UIVMDesktop.cpp \
+	src/selector/UISnapshotPane.cpp \
 	src/settings/machine/UIMachineSettingsStorage.cpp \
 	src/settings/machine/UIMachineSettingsUSB.cpp \
Index: /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISnapshotPane.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISnapshotPane.cpp	(revision 63850)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISnapshotPane.cpp	(revision 63851)
@@ -148,4 +148,16 @@
     /** Holds the cached machine state. */
     KMachineState            m_enmMachineState;
+};
+
+
+/** QTreeWidget subclass for snapshots items. */
+class UISnapshotTree : public QTreeWidget
+{
+    Q_OBJECT;
+
+public:
+
+    /** Constructs snapshot tree passing @a pParent to the base-class. */
+    UISnapshotTree(QWidget *pParent);
 };
 
@@ -455,4 +467,36 @@
 
 /*********************************************************************************************************************************
+*   Class UISnapshotTree implementation.                                                                                         *
+*********************************************************************************************************************************/
+
+UISnapshotTree::UISnapshotTree(QWidget *pParent)
+    : QTreeWidget(pParent)
+{
+    /* No header: */
+    header()->hide();
+    /* All columns as one: */
+    setAllColumnsShowFocus(true);
+    /* Our own context menu: */
+    setContextMenuPolicy(Qt::CustomContextMenu);
+
+#if QT_VERSION < 0x050000
+    // WORKAROUND:
+    // The snapshots widget is not very useful if there are a lot
+    // of snapshots in a tree and the current Qt style decides not
+    // to draw lines (branches) between the snapshot nodes; it is
+    // then often unclear which snapshot is a child of another.
+    // So on platforms whose styles do not normally draw branches,
+    // we use QWindowsStyle which is present on every platform and
+    // draws required thing like we want. */
+// #if defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS)
+    QWindowsStyle *pTreeWidgetStyle = new QWindowsStyle;
+    setStyle(pTreeWidgetStyle);
+    connect(this, SIGNAL(destroyed(QObject *)), pTreeWidgetStyle, SLOT(deleteLater()));
+// #endif
+#endif /* QT_VERSION < 0x050000 */
+}
+
+
+/*********************************************************************************************************************************
 *   Class UISnapshotPane implementation.                                                                                         *
 *********************************************************************************************************************************/
@@ -469,5 +513,5 @@
     , m_pActionCloneSnapshot(new QAction(m_pCurrentStateItemActionGroup))
     , m_fShapshotOperationsAllowed(false)
-    , m_pTreeWidget(0)
+    , m_pSnapshotTree(0)
 {
     /* Cache pixmaps: */
@@ -521,39 +565,20 @@
     m_pActionCloneSnapshot->setShortcut(QString("Ctrl+Shift+C"));
 
-    /* Create tree-widget: */
-    m_pTreeWidget = new QTreeWidget(this);
-    m_pTreeWidget->header()->hide();
-    m_pTreeWidget->setContextMenuPolicy(Qt::CustomContextMenu);
-    m_pTreeWidget->setAllColumnsShowFocus(true);
-    /* Add tree-widget into layout: */
-    pLayout->addWidget(m_pTreeWidget);
-
-#if QT_VERSION < 0x050000
-    // WORKAROUND:
-    // The snapshots widget is not very useful if there are a lot
-    // of snapshots in a tree and the current Qt style decides not
-    // to draw lines (branches) between the snapshot nodes; it is
-    // then often unclear which snapshot is a child of another.
-    // So on platforms whose styles do not normally draw branches,
-    // we use QWindowsStyle which is present on every platform and
-    // draws required thing like we want. */
-// #if defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS)
-    QWindowsStyle *pTreeWidgetStyle = new QWindowsStyle;
-    m_pTreeWidget->setStyle(pTreeWidgetStyle);
-    connect(m_pTreeWidget, SIGNAL(destroyed(QObject *)), pTreeWidgetStyle, SLOT(deleteLater()));
-// #endif
-#endif /* QT_VERSION < 0x050000 */
+    /* Create snapshot tree: */
+    m_pSnapshotTree = new UISnapshotTree(this);
+    /* Add snapshot tree into layout: */
+    pLayout->addWidget(m_pSnapshotTree);
 
     /* Setup timer: */
     m_ageUpdateTimer.setSingleShot(true);
 
-    /* Setup tree-widget connections: */
-    connect(m_pTreeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)),
+    /* Setup snapshot tree connections: */
+    connect(m_pSnapshotTree, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)),
             this, SLOT(sltCurrentItemChanged(QTreeWidgetItem *)));
-    connect(m_pTreeWidget, SIGNAL(customContextMenuRequested(const QPoint &)),
+    connect(m_pSnapshotTree, SIGNAL(customContextMenuRequested(const QPoint &)),
             this, SLOT(sltContextMenuRequested(const QPoint &)));
-    connect(m_pTreeWidget, SIGNAL(itemChanged(QTreeWidgetItem *, int)),
+    connect(m_pSnapshotTree, SIGNAL(itemChanged(QTreeWidgetItem *, int)),
             this, SLOT(sltItemChanged(QTreeWidgetItem *)));
-    connect(m_pTreeWidget, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)),
+    connect(m_pSnapshotTree, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)),
             this, SLOT(sltItemDoubleClicked(QTreeWidgetItem *)));
     /* Setup snapshot operation connections: */
@@ -624,7 +649,7 @@
     if (pSnapshotItem)
     {
-        m_pTreeWidget->horizontalScrollBar()->setValue(0);
-        m_pTreeWidget->scrollToItem(pSnapshotItem);
-        m_pTreeWidget->horizontalScrollBar()->setValue(m_pTreeWidget->indentation() * pSnapshotItem->level());
+        m_pSnapshotTree->horizontalScrollBar()->setValue(0);
+        m_pSnapshotTree->scrollToItem(pSnapshotItem);
+        m_pSnapshotTree->horizontalScrollBar()->setValue(m_pSnapshotTree->indentation() * pSnapshotItem->level());
     }
 
@@ -682,5 +707,5 @@
 {
     /* Search for corresponding item: */
-    const QTreeWidgetItem *pItem = m_pTreeWidget->itemAt(point);
+    const QTreeWidgetItem *pItem = m_pSnapshotTree->itemAt(point);
     if (!pItem)
         return;
@@ -710,5 +735,5 @@
 
     /* Show menu: */
-    menu.exec(m_pTreeWidget->viewport()->mapToGlobal(point));
+    menu.exec(m_pSnapshotTree->viewport()->mapToGlobal(point));
 }
 
@@ -784,5 +809,5 @@
     /* Recache new session state: */
     m_enmSessionState = enmState;
-    sltCurrentItemChanged(m_pTreeWidget->currentItem());
+    sltCurrentItemChanged(m_pSnapshotTree->currentItem());
 }
 
@@ -794,5 +819,5 @@
 
     /* Search for smallest snapshot age to optimize timer timeout: */
-    const SnapshotAgeFormat age = traverseSnapshotAge(m_pTreeWidget->invisibleRootItem());
+    const SnapshotAgeFormat age = traverseSnapshotAge(m_pSnapshotTree->invisibleRootItem());
     switch (age)
     {
@@ -842,5 +867,5 @@
             QString strSnapshotName = tr("Snapshot %1");
             QRegExp regExp(QString("^") + strSnapshotName.arg("([0-9]+)") + QString("$"));
-            QTreeWidgetItemIterator iterator(m_pTreeWidget);
+            QTreeWidgetItemIterator iterator(m_pSnapshotTree);
             while (*iterator)
             {
@@ -908,5 +933,5 @@
     {
         /* Acquire currently chosen snapshot item: */
-        const SnapshotWgtItem *pSnapshotItem = toSnapshotItem(m_pTreeWidget->currentItem());
+        const SnapshotWgtItem *pSnapshotItem = toSnapshotItem(m_pSnapshotTree->currentItem());
         AssertPtr(pSnapshotItem);
         if (!pSnapshotItem)
@@ -931,5 +956,5 @@
             {
                 /* Take snapshot of changed current state: */
-                m_pTreeWidget->setCurrentItem(currentStateItem());
+                m_pSnapshotTree->setCurrentItem(currentStateItem());
                 if (!takeSnapshot())
                     break;
@@ -983,5 +1008,5 @@
     {
         /* Acquire currently chosen snapshot item: */
-        const SnapshotWgtItem *pSnapshotItem = toSnapshotItem(m_pTreeWidget->currentItem());
+        const SnapshotWgtItem *pSnapshotItem = toSnapshotItem(m_pSnapshotTree->currentItem());
         AssertPtr(pSnapshotItem);
         if (!pSnapshotItem)
@@ -1053,5 +1078,5 @@
 {
     /* Acquire currently chosen snapshot item: */
-    const SnapshotWgtItem *pSnapshotItem = toSnapshotItem(m_pTreeWidget->currentItem());
+    const SnapshotWgtItem *pSnapshotItem = toSnapshotItem(m_pSnapshotTree->currentItem());
     AssertReturnVoid(pSnapshotItem);
 
@@ -1072,5 +1097,5 @@
 {
     /* Acquire currently chosen snapshot item: */
-    const SnapshotWgtItem *pSnapshotItem = toSnapshotItem(m_pTreeWidget->currentItem());
+    const SnapshotWgtItem *pSnapshotItem = toSnapshotItem(m_pSnapshotTree->currentItem());
     AssertReturnVoid(pSnapshotItem);
 
@@ -1110,5 +1135,5 @@
     /* Remember the selected item and it's first child: */
     QString strSelectedItem, strFirstChildOfSelectedItem;
-    const SnapshotWgtItem *pSnapshotItem = toSnapshotItem(m_pTreeWidget->currentItem());
+    const SnapshotWgtItem *pSnapshotItem = toSnapshotItem(m_pSnapshotTree->currentItem());
     if (pSnapshotItem)
     {
@@ -1119,5 +1144,5 @@
 
     /* Clear the tree: */
-    m_pTreeWidget->clear();
+    m_pSnapshotTree->clear();
 
     /* If machine has snapshots: */
@@ -1145,6 +1170,6 @@
 
         /* Choose current item: */
-        m_pTreeWidget->scrollToItem(pCurrentItem);
-        m_pTreeWidget->setCurrentItem(pCurrentItem);
+        m_pSnapshotTree->scrollToItem(pCurrentItem);
+        m_pSnapshotTree->setCurrentItem(pCurrentItem);
         sltCurrentItemChanged(pCurrentItem);
     }
@@ -1155,11 +1180,11 @@
         m_pCurrentSnapshotItem = 0;
 
-        /* Add the "current state" item as a child of tree-widget: */
-        SnapshotWgtItem *pCsi = new SnapshotWgtItem(this, m_pTreeWidget, m_comMachine);
+        /* Add the "current state" item as a child of snapshot tree: */
+        SnapshotWgtItem *pCsi = new SnapshotWgtItem(this, m_pSnapshotTree, m_comMachine);
         pCsi->setBold(true);
         pCsi->recache();
 
         /* Choose current item: */
-        m_pTreeWidget->setCurrentItem(pCsi);
+        m_pSnapshotTree->setCurrentItem(pCsi);
         sltCurrentItemChanged(pCsi);
     }
@@ -1168,6 +1193,6 @@
     sltUpdateSnapshotsAge();
 
-    /* Adjust tree-widget: */
-    m_pTreeWidget->resizeColumnToContents(0);
+    /* Adjust snapshot tree: */
+    m_pSnapshotTree->resizeColumnToContents(0);
 }
 
@@ -1176,5 +1201,5 @@
     /* Create a child of passed item: */
     SnapshotWgtItem *pSnapshotItem = pItem ? new SnapshotWgtItem(this, pItem, comSnapshot) :
-                                             new SnapshotWgtItem(this, m_pTreeWidget, comSnapshot);
+                                             new SnapshotWgtItem(this, m_pSnapshotTree, comSnapshot);
     /* And recache it's content: */
     pSnapshotItem->recache();
@@ -1201,5 +1226,5 @@
 {
     /* Search for the first item with required ID: */
-    QTreeWidgetItemIterator it(m_pTreeWidget);
+    QTreeWidgetItemIterator it(m_pSnapshotTree);
     while (*it)
     {
@@ -1219,5 +1244,5 @@
     QTreeWidgetItem *pCsi = m_pCurrentSnapshotItem ?
                             m_pCurrentSnapshotItem->child(m_pCurrentSnapshotItem->childCount() - 1) :
-                            m_pTreeWidget->invisibleRootItem()->child(0);
+                            m_pSnapshotTree->invisibleRootItem()->child(0);
     return static_cast<SnapshotWgtItem*>(pCsi);
 }
@@ -1266,2 +1291,4 @@
 }
 
+#include "UISnapshotPane.moc"
+
Index: /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISnapshotPane.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISnapshotPane.h	(revision 63850)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISnapshotPane.h	(revision 63851)
@@ -32,5 +32,5 @@
 
 /* Forward declarations: */
-class QTreeWidget;
+class UISnapshotTree;
 class QTreeWidgetItem;
 class SnapshotWgtItem;
@@ -185,6 +185,6 @@
     QIcon            m_snapshotIconOnline;
 
-    /** Holds the tree-widget instance. */
-    QTreeWidget     *m_pTreeWidget;
+    /** Holds the snapshot tree instance. */
+    UISnapshotTree  *m_pSnapshotTree;
 };
 
