Changeset 103172 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Feb 2, 2024 12:01:56 PM (13 months ago)
- svn:sync-xref-src-repo-rev:
- 161429
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/activity/overview/UIVMActivityOverviewWidget.cpp
r103171 r103172 107 107 quint64 m_iData1; 108 108 quint64 m_iDataMaximum; 109 int m_iMargin;110 QColor m_color0;111 QColor m_color1;109 int m_iMargin; 110 QColor m_color0; 111 QColor m_color1; 112 112 /** If not empty this text is drawn at the center of the doughnut chart. */ 113 113 QString m_strCenter; … … 403 403 int itemIndex(const QUuid &uid); 404 404 bool isVMRunning(int rowIndex) const; 405 bool isCloudVM(int rowIndex) const; 405 406 void setDefaultViewFont(const QFont &font); 406 407 void setDefaultViewFontColor(const QColor &color); … … 1306 1307 { 1307 1308 Q_UNUSED(sourceParent); 1308 if (m_fShowNotRunningVMs )1309 if (m_fShowNotRunningVMs && m_fShowCloudVMs) 1309 1310 return true; 1310 1311 UIActivityOverviewModel *pModel = qobject_cast<UIActivityOverviewModel*>(sourceModel()); 1311 1312 if (!pModel) 1312 1313 return true; 1313 if (!pModel->isVMRunning(iSourceRow)) 1314 1315 if (!m_fShowNotRunningVMs && !pModel->isVMRunning(iSourceRow)) 1316 return false; 1317 if (!m_fShowCloudVMs && pModel->isCloudVM(iSourceRow)) 1314 1318 return false; 1315 1319 return true; … … 1396 1400 return false; 1397 1401 return m_itemList[rowIndex]->isRunning(); 1402 } 1403 1404 bool UIActivityOverviewModel::isCloudVM(int rowIndex) const 1405 { 1406 if (rowIndex >= m_itemList.size() || rowIndex < 0 || !m_itemList[rowIndex]) 1407 return false; 1408 return m_itemList[rowIndex]->isCloudVM(); 1398 1409 } 1399 1410 … … 1750 1761 , m_iSortIndicatorWidth(0) 1751 1762 , m_fShowNotRunningVMs(false) 1752 , m_fShowCloudVMs( false)1763 , m_fShowCloudVMs(true) 1753 1764 { 1754 1765 prepare(); … … 1838 1849 connect(&uiCommon(), &UICommon::sigAskToDetachCOM, 1839 1850 this, &UIVMActivityOverviewWidget::sltClearCOMData); 1851 sltCloudVMVisibility(m_fShowCloudVMs); 1840 1852 } 1841 1853
Note:
See TracChangeset
for help on using the changeset viewer.