Changeset 102796 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jan 9, 2024 2:22:00 PM (15 months ago)
- svn:sync-xref-src-repo-rev:
- 160977
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/activity/overview
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/activity/overview/UIVMActivityOverviewWidget.cpp
r101561 r102796 291 291 void dataUpdate(); 292 292 void setNotRunningVMVisibility(bool fShow); 293 void setCloudVMVisibility(bool fShow); 293 294 294 295 protected: … … 300 301 301 302 bool m_fShowNotRunningVMs; 303 bool m_fShowCloudVMs; 302 304 }; 303 305 … … 899 901 void UIActivityOverviewProxyModel::setNotRunningVMVisibility(bool fShow) 900 902 { 903 if (m_fShowNotRunningVMs == fShow) 904 return; 901 905 m_fShowNotRunningVMs = fShow; 902 906 invalidateFilter(); 903 907 } 904 908 909 void UIActivityOverviewProxyModel::setCloudVMVisibility(bool fShow) 910 { 911 if (m_fShowCloudVMs == fShow) 912 return; 913 m_fShowCloudVMs = fShow; 914 invalidateFilter(); 915 } 905 916 906 917 bool UIActivityOverviewProxyModel::lessThan(const QModelIndex &sourceLeftIndex, const QModelIndex &sourceRightIndex) const … … 1388 1399 , m_iSortIndicatorWidth(0) 1389 1400 , m_fShowNotRunningVMs(false) 1401 , m_fShowCloudVMs(false) 1390 1402 { 1391 1403 prepare(); … … 1653 1665 menu.addAction(m_pVMActivityMonitorAction); 1654 1666 menu.addSeparator(); 1667 1655 1668 QAction *pHideNotRunningAction = 1656 1669 menu.addAction(UIVMActivityOverviewWidget::tr("List all virtual machines")); … … 1659 1672 connect(pHideNotRunningAction, &QAction::triggered, 1660 1673 this, &UIVMActivityOverviewWidget::sltNotRunningVMVisibility); 1674 1675 QAction *pShowCloudVMsAction = 1676 menu.addAction(UIVMActivityOverviewWidget::tr("Show cloud virtual machines")); 1677 pShowCloudVMsAction->setCheckable(true); 1678 pShowCloudVMsAction->setChecked(m_fShowCloudVMs); 1679 connect(pShowCloudVMsAction, &QAction::triggered, 1680 this, &UIVMActivityOverviewWidget::sltCloudVMVisibility); 1681 1661 1682 menu.exec(m_pTableView->mapToGlobal(pos)); 1662 1683 } … … 1697 1718 if (m_pProxyModel) 1698 1719 m_pProxyModel->setNotRunningVMVisibility(m_fShowNotRunningVMs); 1720 } 1721 1722 void UIVMActivityOverviewWidget::sltCloudVMVisibility(bool fShow) 1723 { 1724 m_fShowCloudVMs = fShow; 1725 if (m_pProxyModel) 1726 m_pProxyModel->setCloudVMVisibility(m_fShowCloudVMs); 1699 1727 } 1700 1728 -
trunk/src/VBox/Frontends/VirtualBox/src/activity/overview/UIVMActivityOverviewWidget.h
r98103 r102796 96 96 void sltHandleTableSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected); 97 97 void sltNotRunningVMVisibility(bool fShow); 98 void sltCloudVMVisibility(bool fShow); 98 99 void sltSaveSettings(); 99 100 void sltClearCOMData(); … … 142 143 int m_iSortIndicatorWidth; 143 144 bool m_fShowNotRunningVMs; 145 bool m_fShowCloudVMs; 144 146 }; 145 147
Note:
See TracChangeset
for help on using the changeset viewer.