summaryrefslogtreecommitdiffstats
path: root/app/procinfo.h
diff options
context:
space:
mode:
authorVitaly Wool <vitaly.wool@konsulko.com>2018-11-27 08:49:32 +0100
committerVitaly Wool <vitaly.wool@konsulko.com>2018-11-28 16:51:21 +0100
commitf52f93fa42ffc213653e4772acedfcf849707ce8 (patch)
tree409bb47397fd5fb104cc53d2df868898f0eef714 /app/procinfo.h
parent49364e7ea0df798a48c7b671821f63401b6c7798 (diff)
Initial commit
Add Task Manager GUI. Signed-off-by: Vitaly Wool <vitaly.wool@konsulko.com> Change-Id: I56d9a34df38fb441b598d150e88c905db95346aa
Diffstat (limited to 'app/procinfo.h')
-rw-r--r--app/procinfo.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/app/procinfo.h b/app/procinfo.h
new file mode 100644
index 0000000..fdde7d7
--- /dev/null
+++ b/app/procinfo.h
@@ -0,0 +1,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;
+};