mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:08:12 +00:00
SystemMonitor: Convert most widgets to a failable factory
I didn't convert widgets that don't do any failable tasks currently or are lazy-initialized.
This commit is contained in:
parent
a5936864d9
commit
412630637a
10 changed files with 96 additions and 71 deletions
|
@ -12,16 +12,19 @@
|
|||
namespace SystemMonitor {
|
||||
|
||||
class ProcessMemoryMapWidget final : public GUI::Widget {
|
||||
C_OBJECT(ProcessMemoryMapWidget);
|
||||
C_OBJECT_ABSTRACT(ProcessMemoryMapWidget);
|
||||
|
||||
public:
|
||||
virtual ~ProcessMemoryMapWidget() override = default;
|
||||
|
||||
static ErrorOr<NonnullRefPtr<ProcessMemoryMapWidget>> try_create();
|
||||
|
||||
void set_pid(pid_t);
|
||||
void refresh();
|
||||
|
||||
private:
|
||||
ProcessMemoryMapWidget();
|
||||
ProcessMemoryMapWidget() = default;
|
||||
|
||||
RefPtr<GUI::TableView> m_table_view;
|
||||
RefPtr<GUI::JsonArrayModel> m_json_model;
|
||||
pid_t m_pid { -1 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue