summaryrefslogtreecommitdiffstats
path: root/app/taskmanager.h
diff options
context:
space:
mode:
authorVitaly Wool <vitaly.wool@konsulko.com>2019-04-08 12:45:42 +0200
committerVitaly Wool <vitaly.wool@konsulko.com>2019-04-08 12:47:51 +0200
commit22a7ffb93ee7ef8d0c05e86e99fb1c70efca0888 (patch)
tree9bd9dc211d5d72c9fa73db4e1835cc88df635344 /app/taskmanager.h
parent122bcc295d054a733585996e859dea870ba5ca88 (diff)
Implement system load visualization
Implement system load visualization in TaskManager as a separate tab showing average system load graph basing on the info provided by the backend. Change-Id: I81359185516ebb1b6218bfd9ca53f1d76dfddeb4 Signed-off-by: Vitaly Wool <vitaly.wool@konsulko.com>
Diffstat (limited to 'app/taskmanager.h')
-rw-r--r--app/taskmanager.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/taskmanager.h b/app/taskmanager.h
index 0bd53d5..180c379 100644
--- a/app/taskmanager.h
+++ b/app/taskmanager.h
@@ -22,18 +22,21 @@ public:
Q_INVOKABLE void kill(int tid);
Q_INVOKABLE void getExtraInfo(int tid);
QTimer *timer;
+ QTimer *loadAvgTimer;
signals:
void updateProcess(const QString& cmd_, int tid_, int euid_, double scpu_, double ucpu_, double resident_memory_, const QString& state_);
void addProcess(const QString& cmd_, int tid_, int euid_, double scpu_, double ucpu_, double resident_memory_, const QString& state_);
void removeProcess(int tid_);
void showProcessInfo(const QString info_);
+ void updateLoadAverage(double value_);
private slots:
void query();
void callService(const QString& ccommand, QJsonValue value);
void onConnected();
void onMessageReceived(MessageType type, Message *message);
+ void loadAvg();
private:
MessageEngine *m_loop;
@@ -42,6 +45,7 @@ private:
void ProcessResponse(Message *message);
void ProcessResponseTasklist(QJsonArray& processes);
void ProcessResponseExtraInfo(QJsonObject& info);
+ void ProcessResponseLoadAvg(QJsonObject& loadInfo);
};
#endif // TASKMANAGER_H