2019-10-24 20:21:43 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <LibGUI/GWidget.h>
|
|
|
|
|
|
|
|
|
|
class CTimer;
|
|
|
|
|
class GLabel;
|
|
|
|
|
|
|
|
|
|
class ProcessStateWidget final : public GWidget {
|
|
|
|
|
C_OBJECT(ProcessStateWidget)
|
|
|
|
|
public:
|
|
|
|
|
virtual ~ProcessStateWidget() override;
|
|
|
|
|
|
2019-10-24 20:56:13 +02:00
|
|
|
void set_tty_fd(int);
|
2019-10-24 20:21:43 +02:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
explicit ProcessStateWidget(GWidget* parent);
|
|
|
|
|
|
|
|
|
|
void refresh();
|
|
|
|
|
|
|
|
|
|
RefPtr<GLabel> m_pid_label;
|
|
|
|
|
RefPtr<GLabel> m_state_label;
|
|
|
|
|
RefPtr<GLabel> m_cpu_label;
|
|
|
|
|
RefPtr<GLabel> m_memory_label;
|
|
|
|
|
|
|
|
|
|
RefPtr<CTimer> m_timer;
|
|
|
|
|
|
2019-10-24 20:56:13 +02:00
|
|
|
int m_tty_fd { -1 };
|
2019-10-24 20:21:43 +02:00
|
|
|
};
|