23 #ifndef _QDS_UTILITIES_H 24 #define _QDS_UTILITIES_H 28 #if defined Q_OS_LINUX 49 void copy (
const QVariant& data);
62 #if defined (Q_OS_LINUX) 63 QPair<quint64, quint64> getCpuJiffies();
64 QPair<quint64, quint64> m_pastCpuJiffies {0, 0};
72 QSettings* m_settings;
73 QProcess m_cpuProcess;
74 QProcess m_batteryLevelProcess;
75 QProcess m_connectedToACProcess;
Utilities()
Definition: utilities.cpp:91
Provides CPU and Battery information to the QML interface.
Definition: utilities.h:37
void copy(const QVariant &data)
Definition: utilities.cpp:169
void calculateScaleRatio()
Definition: utilities.cpp:245
Q_INVOKABLE int batteryLevel()
Definition: utilities.cpp:149
Q_INVOKABLE qreal scaleRatio()
Definition: utilities.cpp:127
void readConnectedToACProcess(int exit_code=0)
Definition: utilities.cpp:329
void updateBatteryLevel()
Definition: utilities.cpp:210
Q_INVOKABLE int cpuUsage()
Definition: utilities.cpp:137
void setAutoScaleEnabled(const bool enabled)
Definition: utilities.cpp:177
void readBatteryLevelProcess(int exit_code=0)
Definition: utilities.cpp:300
void updateCpuUsage()
Definition: utilities.cpp:184
Q_INVOKABLE bool isConnectedToAC()
Definition: utilities.cpp:162
void readCpuUsageProcess(int exit_code=0)
Definition: utilities.cpp:273
void updateConnectedToAC()
Definition: utilities.cpp:227