summaryrefslogtreecommitdiff
path: root/DevTools/HackStudio/ProcessStateWidget.h
blob: 572148679e82b197ccdcc6327511f51fdef1d237 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once

#include <LibGUI/GWidget.h>

class CTimer;
class GLabel;

class ProcessStateWidget final : public GWidget {
    C_OBJECT(ProcessStateWidget)
public:
    virtual ~ProcessStateWidget() override;

    void set_tty_fd(int);

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;

    int m_tty_fd { -1 };
};