Changeset 85297 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jul 13, 2020 9:17:08 AM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r85111 r85297 682 682 VirtualBoxVM_QT_MOCHDRS = \ 683 683 src/globals/UIStarter.h \ 684 src/monitor/performance/UIPerformanceMonitor.h \685 684 src/runtime/UIConsoleEventHandler.h \ 686 685 src/runtime/UIFrameBuffer.h \ … … 815 814 src/logviewer/UIVMLogViewerTextEdit.h \ 816 815 src/logviewer/UIVMLogViewerWidget.h \ 816 src/monitor/performance/UIPerformanceMonitor.h \ 817 817 src/medium/UIFDCreationDialog.h \ 818 818 src/medium/UIMediumEnumerator.h \ … … 945 945 # 946 946 VirtualBoxVM_QT_MOCSRCS = \ 947 src/monitor/performance/UIPerformanceMonitor.cpp \948 947 src/runtime/UIConsoleEventHandler.cpp \ 949 948 src/runtime/UIFrameBuffer.cpp \ … … 980 979 src/logviewer/UIVMLogViewerSearchPanel.cpp \ 981 980 src/logviewer/UIVMLogViewerTextEdit.cpp \ 981 src/monitor/performance/UIPerformanceMonitor.cpp \ 982 982 src/medium/UIMediumEnumerator.cpp \ 983 983 src/medium/viso/UIVisoContentBrowser.cpp \ … … 1160 1160 src/main.cpp \ 1161 1161 src/globals/UIStarter.cpp \ 1162 src/monitor/performance/UIPerformanceMonitor.cpp \1163 1162 src/runtime/UIConsoleEventHandler.cpp \ 1164 1163 src/runtime/UIFrameBuffer.cpp \ … … 1321 1320 src/logviewer/UIVMLogViewerWidget.cpp \ 1322 1321 src/monitor/UIMonitorCommon.cpp \ 1322 src/monitor/performance/UIPerformanceMonitor.cpp \ 1323 1323 src/medium/UIFDCreationDialog.cpp \ 1324 1324 src/medium/UIMedium.cpp \ -
trunk/src/VBox/Frontends/VirtualBox/src/monitor/performance/UIPerformanceMonitor.cpp
r83801 r85297 30 30 #include "UICommon.h" 31 31 #include "UIPerformanceMonitor.h" 32 #include "UISession.h"33 32 34 33 /* COM includes: */ … … 690 689 } 691 690 692 693 691 /********************************************************************************************************************************* 694 692 * UIPerformanceMonitor implementation. * 695 693 *********************************************************************************************************************************/ 696 694 697 UIPerformanceMonitor::UIPerformanceMonitor(QWidget *pParent, const CMachine &machine, const CConsole &console , const UISession *pSession)695 UIPerformanceMonitor::UIPerformanceMonitor(QWidget *pParent, const CMachine &machine, const CConsole &console) 698 696 : QIWithRetranslateUI<QWidget>(pParent) 699 697 , m_fGuestAdditionsAvailable(false) … … 713 711 m_comGuest = m_console.GetGuest(); 714 712 m_fGuestAdditionsAvailable = guestAdditionsAvailable(6 /* minimum major version */); 715 connect(pSession, &UISession::sigAdditionsStateChange, this, &UIPerformanceMonitor::sltGuestAdditionsStateChange);716 713 717 714 prepareMetrics(); … … 862 859 ++m_iTimeStep; 863 860 864 if (m_metrics.contains(m_strRAMMetricName))865 {866 quint64 iTotalRAM = 0;867 quint64 iFreeRAM = 0;868 UIMonitorCommon::getRAMLoad(m_performanceMonitor, m_nameList, m_objectList, iTotalRAM, iFreeRAM);869 updateRAMGraphsAndMetric(iTotalRAM, iFreeRAM);870 }861 if (m_metrics.contains(m_strRAMMetricName)) 862 { 863 quint64 iTotalRAM = 0; 864 quint64 iFreeRAM = 0; 865 UIMonitorCommon::getRAMLoad(m_performanceMonitor, m_nameList, m_objectList, iTotalRAM, iFreeRAM); 866 updateRAMGraphsAndMetric(iTotalRAM, iFreeRAM); 867 } 871 868 872 869 /* Update the CPU load chart with values we get from IMachineDebugger::getCPULoad(..): */ … … 904 901 } 905 902 906 /**907 *908 * @returns909 */910 903 void UIPerformanceMonitor::sltGuestAdditionsStateChange() 911 904 { -
trunk/src/VBox/Frontends/VirtualBox/src/monitor/performance/UIPerformanceMonitor.h
r83346 r85297 100 100 * two sources of the performance metrics. Unfortunately these two have very distinct APIs resulting a bit too much 101 101 * special casing etc.*/ 102 class UIPerformanceMonitor : public QIWithRetranslateUI<QWidget>102 class SHARED_LIBRARY_STUFF UIPerformanceMonitor : public QIWithRetranslateUI<QWidget> 103 103 { 104 104 Q_OBJECT; … … 109 109 * @param machine is machine reference. 110 110 * @param console is machine console reference. */ 111 UIPerformanceMonitor(QWidget *pParent, const CMachine &machine, const CConsole &console , const UISession *pSession);111 UIPerformanceMonitor(QWidget *pParent, const CMachine &machine, const CConsole &console); 112 112 ~UIPerformanceMonitor(); 113 114 public slots: 115 116 /** @name These functions are connected to API events and implement necessary updates. 117 * @{ */ 118 void sltGuestAdditionsStateChange(); 119 /** @} */ 113 120 114 121 protected: … … 120 127 /** Reads the metric values for several sources and calls corresponding update functions. */ 121 128 void sltTimeout(); 122 /** @name These functions are connected to API events and implement necessary updates.123 * @{ */124 void sltGuestAdditionsStateChange();125 /** @} */126 129 127 130 private: -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIVMInformationDialog.cpp
r83345 r85297 200 200 /* Create Performance Monitor tab: */ 201 201 UIPerformanceMonitor *pPerformanceMonitorWidget = 202 new UIPerformanceMonitor(this, m_pMachineWindow->machine(), m_pMachineWindow->console() , m_pMachineWindow->uisession());202 new UIPerformanceMonitor(this, m_pMachineWindow->machine(), m_pMachineWindow->console()); 203 203 if (pPerformanceMonitorWidget) 204 204 { 205 connect(m_pMachineWindow->uisession(), &UISession::sigAdditionsStateChange, 206 pPerformanceMonitorWidget, &UIPerformanceMonitor::sltGuestAdditionsStateChange); 205 207 m_tabs.insert(2, pPerformanceMonitorWidget); 206 208 m_pTabWidget->addTab(m_tabs.value(2), QString());
Note:
See TracChangeset
for help on using the changeset viewer.