Index: trunk/src/VBox/Frontends/VirtualBox/src/activity/overview/UIVMActivityOverviewWidget.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/activity/overview/UIVMActivityOverviewWidget.cpp	(revision 102972)
+++ trunk/src/VBox/Frontends/VirtualBox/src/activity/overview/UIVMActivityOverviewWidget.cpp	(revision 102973)
@@ -135,11 +135,9 @@
 };
 
-/** A container QWidget to layout host stats. related widgets. */
-
 
 /*********************************************************************************************************************************
 *   Class UIVMActivityOverviewHostStatsWidget definition.                                                                        *
 *********************************************************************************************************************************/
-
+/** A container QWidget to layout host stats. related widgets. */
 class UIVMActivityOverviewHostStatsWidget : public QIWithRetranslateUI<QWidget>
 {
@@ -233,6 +231,6 @@
 public:
 
-    UIActivityOverviewItem(const QUuid &uid, const QString &strVMName, KMachineState enmState);
-    //yUIActivityOverviewItem(const QUuid &uid);
+    UIActivityOverviewItem(const QUuid &uid, const QString &strVMName);
+
     UIActivityOverviewItem();
     ~UIActivityOverviewItem();
@@ -356,5 +354,6 @@
     void removeItem(const QUuid& uMachineId);
     void getHostRAMStats();
-    void obtainCloudClientList();
+    QVector<CCloudClient> obtainCloudClientList();
+    QVector<CCloudMachine> obtainCloudMachineList();
 
     QVector<UIActivityOverviewItem> m_itemList;
@@ -369,7 +368,4 @@
     CPerformanceCollector m_performanceCollector;
     QMap<int, bool> m_columnVisible;
-    /** If true the table data and corresponding view is updated. Possibly set by host widget to true only
-     *  when the widget is visible in the main UI. */
-    bool m_fShouldUpdate;
     UIVMActivityOverviewHostStats m_hostStats;
     QFont m_defaultViewFont;
@@ -377,5 +373,4 @@
     /** Maximum length of string length of data displayed in column. Updated in UIActivityOverviewModel::data(..). */
     mutable QMap<int, int> m_columnDataMaxLength;
-    QVector<CCloudClient> m_comCloudClients;
 };
 
@@ -795,8 +790,7 @@
 *   Class UIVMActivityOverviewItem implementation.                                                                               *
 *********************************************************************************************************************************/
-UIActivityOverviewItem::UIActivityOverviewItem(const QUuid &uid, const QString &strVMName, KMachineState enmState)
+UIActivityOverviewItem::UIActivityOverviewItem(const QUuid &uid, const QString &strVMName)
     : m_VMuid(uid)
     , m_strVMName(strVMName)
-    , m_enmMachineState(enmState)
     , m_uCPUGuestLoad(0)
     , m_uCPUVMMLoad(0)
@@ -969,5 +963,4 @@
     , m_pTimer(new QTimer(this))
     , m_pCloudUpdateTimer(new QTimer(this))
-    , m_fShouldUpdate(true)
 {
     initialize();
@@ -995,5 +988,4 @@
         m_pCloudUpdateTimer->start(10 * 1000);
     }
-    obtainCloudClientList();
 }
 
@@ -1012,5 +1004,18 @@
 void UIActivityOverviewModel::setShouldUpdate(bool fShouldUpdate)
 {
-    m_fShouldUpdate = fShouldUpdate;
+    if (m_pTimer)
+    {
+        if (fShouldUpdate)
+            m_pTimer->start();
+        else
+            m_pTimer->stop();
+    }
+    if (m_pCloudUpdateTimer)
+    {
+        if (fShouldUpdate)
+            m_pCloudUpdateTimer->start();
+        else
+            m_pCloudUpdateTimer->stop();
+    }
 }
 
@@ -1142,6 +1147,4 @@
 void UIActivityOverviewModel::sltTimeout()
 {
-    if (!m_fShouldUpdate)
-        return;
     ULONG aPctExecuting;
     ULONG aPctHalted;
@@ -1266,6 +1269,18 @@
 }
 
-void UIActivityOverviewModel::obtainCloudClientList()
-{
+QVector<CCloudMachine> UIActivityOverviewModel::obtainCloudMachineList()
+{
+    QVector<CCloudMachine> cloudMachineList;
+    QVector<CCloudClient> cloudClientList = obtainCloudClientList();
+    foreach (const CCloudClient &comClient, cloudClientList)
+    {
+        cloudMachineList << comClient.GetCloudMachineList();
+    }
+    return cloudMachineList;
+}
+
+QVector<CCloudClient> UIActivityOverviewModel::obtainCloudClientList()
+{
+    QVector<CCloudClient> comCloudClients;
     /* Acquire Cloud Profile Manager restrictions: */
     const QStringList restrictions = gEDataManager->cloudProfileManagerRestrictions();
@@ -1321,11 +1336,13 @@
                                                             strErrorMessage);
             if (strErrorMessage.isEmpty() && comCloudClient.isOk())
-                m_comCloudClients << comCloudClient;
+                comCloudClients << comCloudClient;
         }
     }
+    return comCloudClients;
 }
 
 void UIActivityOverviewModel::sltCloudUpdateTimeout()
 {
+    ///QVector<CCloudMachine> obtainCloudMachineList(); UIActivityOverviewModel::obtainCloudMachineList()
 }
 
@@ -1437,5 +1454,7 @@
 void UIActivityOverviewModel::addItem(const QUuid& uMachineId, const QString& strMachineName, KMachineState enmState)
 {
-    m_itemList.append(UIActivityOverviewItem(uMachineId, strMachineName, enmState));
+    UIActivityOverviewItem newItem(uMachineId, strMachineName);
+    newItem.m_enmMachineState = enmState;
+    m_itemList.append(newItem);
 }
 
