2020-01-18 11:38:21 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
2022-02-10 22:28:48 +03:00
|
|
|
* Copyright (c) 2022, the SerenityOS developers.
|
2020-01-18 11:38:21 +03:00
|
|
|
*
|
2021-04-22 11:24:48 +03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 11:38:21 +03:00
|
|
|
*/
|
|
|
|
|
2019-07-28 13:15:24 +03:00
|
|
|
#pragma once
|
|
|
|
|
2020-02-06 22:33:02 +03:00
|
|
|
#include <LibGUI/Widget.h>
|
2019-07-28 13:15:24 +03:00
|
|
|
|
2022-03-24 15:30:52 +03:00
|
|
|
namespace SystemMonitor {
|
|
|
|
|
2020-02-02 17:07:41 +03:00
|
|
|
class ProcessMemoryMapWidget final : public GUI::Widget {
|
2023-05-21 17:47:34 +03:00
|
|
|
C_OBJECT_ABSTRACT(ProcessMemoryMapWidget);
|
2020-02-02 17:07:41 +03:00
|
|
|
|
2019-07-28 13:15:24 +03:00
|
|
|
public:
|
2022-02-10 22:28:48 +03:00
|
|
|
virtual ~ProcessMemoryMapWidget() override = default;
|
2019-07-28 13:15:24 +03:00
|
|
|
|
2023-05-21 17:47:34 +03:00
|
|
|
static ErrorOr<NonnullRefPtr<ProcessMemoryMapWidget>> try_create();
|
|
|
|
|
2019-07-28 13:15:24 +03:00
|
|
|
void set_pid(pid_t);
|
2019-12-02 19:36:10 +03:00
|
|
|
void refresh();
|
2019-07-28 13:15:24 +03:00
|
|
|
|
|
|
|
private:
|
2023-05-21 17:47:34 +03:00
|
|
|
ProcessMemoryMapWidget() = default;
|
|
|
|
|
2020-02-02 17:07:41 +03:00
|
|
|
RefPtr<GUI::TableView> m_table_view;
|
|
|
|
RefPtr<GUI::JsonArrayModel> m_json_model;
|
2019-07-28 13:15:24 +03:00
|
|
|
pid_t m_pid { -1 };
|
2020-02-02 14:34:39 +03:00
|
|
|
RefPtr<Core::Timer> m_timer;
|
2019-07-28 13:15:24 +03:00
|
|
|
};
|
2022-03-24 15:30:52 +03:00
|
|
|
|
|
|
|
}
|