ladybird/Userland/Applications/SystemMonitor/NetworkStatisticsWidget.h
brapru c2ae6c189e SystemMonitor: Show UDP sockets
Creates a new TableView in the socket list for UDP information.

Resolves #6980.
2021-05-18 08:03:40 +02:00

28 lines
765 B
C++

/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibCore/Timer.h>
#include <LibGUI/LazyWidget.h>
class NetworkStatisticsWidget final : public GUI::LazyWidget {
C_OBJECT(NetworkStatisticsWidget)
public:
virtual ~NetworkStatisticsWidget() override;
private:
NetworkStatisticsWidget();
void update_models();
RefPtr<GUI::TableView> m_adapter_table_view;
RefPtr<GUI::TableView> m_tcp_socket_table_view;
RefPtr<GUI::TableView> m_udp_socket_table_view;
RefPtr<GUI::JsonArrayModel> m_adapter_model;
RefPtr<GUI::JsonArrayModel> m_tcp_socket_model;
RefPtr<GUI::JsonArrayModel> m_udp_socket_model;
RefPtr<Core::Timer> m_update_timer;
};