1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:37:35 +00:00

SystemMonitor: Register MemoryStatsWidget

This also requires that the associated graph widget may be null.
This commit is contained in:
kleines Filmröllchen 2022-03-19 00:19:56 +01:00 committed by Andreas Kling
parent abf2ed4c52
commit abfddd01d4
3 changed files with 31 additions and 8 deletions

View file

@ -10,8 +10,8 @@
#include <LibGUI/Widget.h>
namespace SystemMonitor {
class GraphWidget;
}
class MemoryStatsWidget final : public GUI::Widget {
C_OBJECT(MemoryStatsWidget)
@ -20,12 +20,15 @@ public:
virtual ~MemoryStatsWidget() override = default;
void set_graph_widget(GraphWidget& graph);
void refresh();
private:
MemoryStatsWidget(SystemMonitor::GraphWidget& graph);
MemoryStatsWidget(GraphWidget* graph);
MemoryStatsWidget();
SystemMonitor::GraphWidget& m_graph;
GraphWidget* m_graph;
RefPtr<GUI::Label> m_user_physical_pages_label;
RefPtr<GUI::Label> m_user_physical_pages_committed_label;
RefPtr<GUI::Label> m_supervisor_physical_pages_label;
@ -34,3 +37,5 @@ private:
RefPtr<GUI::Label> m_kfree_count_label;
RefPtr<GUI::Label> m_kmalloc_difference_label;
};
}