aboutsummaryrefslogtreecommitdiffstats
path: root/app/procinfo.h
blob: fdde7d722f20d378204a081c3b0be9095606b6c4 (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
29
30
31
32
33
34
35
#pragma once

#include <QString>
#include <QJsonObject>

class ProcInfo
{
public:
    QString cmd() const;
    int tid() const;
    int euid() const;
    double scpu() const;
    double ucpu() const;
    double resident_memory() const;
    QString state() const;

    explicit ProcInfo() = default;
    explicit ProcInfo(const ProcInfo&) = default;
    explicit ProcInfo(ProcInfo&&) = default;
    ~ProcInfo() = default;

    explicit ProcInfo(const QJsonObject& obj);

    ProcInfo& operator=(const ProcInfo&) = default;
    bool operator==(const ProcInfo& o);

private:
	QString m_cmd;
	int m_tid;
	int m_euid;
	double m_scpu;
	double m_ucpu;
	double m_resident_memory;
	QString m_state;
};