mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
d6bce37756
This fetches info from /proc/netadapters and /proc/net_tcp, updating every second. Very cool. :^)
20 lines
484 B
C++
20 lines
484 B
C++
#pragma once
|
|
|
|
#include <LibCore/CTimer.h>
|
|
#include <LibGUI/GWidget.h>
|
|
|
|
class GTableView;
|
|
|
|
class NetworkStatisticsWidget final : public GWidget {
|
|
C_OBJECT(NetworkStatisticsWidget)
|
|
public:
|
|
explicit NetworkStatisticsWidget(GWidget* parent = nullptr);
|
|
virtual ~NetworkStatisticsWidget() override;
|
|
|
|
private:
|
|
void update_models();
|
|
|
|
GTableView* m_adapter_table_view { nullptr };
|
|
GTableView* m_socket_table_view { nullptr };
|
|
CTimer* m_update_timer { nullptr };
|
|
};
|