Changeset 83491 in vbox
- Timestamp:
- Mar 30, 2020 5:22:24 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 136737
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/monitor/resource/UIResourceMonitor.cpp
r83490 r83491 198 198 void setColumnVisible(const QMap<int, bool>& columnVisible); 199 199 bool columnVisible(int iColumnId) const; 200 void setShouldUpdate(bool fShouldUpdate); 200 201 201 202 private slots: … … 224 225 CPerformanceCollector m_performanceMonitor; 225 226 QMap<int, bool> m_columnVisible; 226 227 /** If true the table data and corresponding view is updated. Possibly set by host widget to true only 228 * when the widget is visible in the main UI. */ 229 bool m_fShouldUpdate; 227 230 }; 228 231 … … 450 453 :QAbstractTableModel(parent) 451 454 , m_pTimer(new QTimer(this)) 455 , m_fShouldUpdate(true) 452 456 { 453 457 initializeItems(); … … 472 476 Q_UNUSED(parent); 473 477 return VMResouceMonitorColumn_Max; 478 } 479 480 void UIResourceMonitorModel::setShouldUpdate(bool fShouldUpdate) 481 { 482 m_fShouldUpdate = fShouldUpdate; 474 483 } 475 484 … … 588 597 void UIResourceMonitorModel::sltTimeout() 589 598 { 599 if (!m_fShouldUpdate) 600 return; 590 601 ULONG aPctExecuting; 591 602 ULONG aPctHalted; … … 787 798 { 788 799 m_fIsCurrentTool = fIsCurrentTool; 800 if (m_pModel) 801 m_pModel->setShouldUpdate(fIsCurrentTool); 789 802 } 790 803
Note:
See TracChangeset
for help on using the changeset viewer.