add battery
This commit is contained in:
28
src/json/cmdhelper.h
Normal file
28
src/json/cmdhelper.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifndef CMDHELPER_H
|
||||
#define CMDHELPER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
class cmdHelper : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
static cmdHelper* Instance()
|
||||
{
|
||||
static cmdHelper obj;
|
||||
return &obj;
|
||||
}
|
||||
bool getDiskSize(double& size);
|
||||
bool getDiskUsed(double& used);
|
||||
|
||||
QString getLinuxVersion();
|
||||
QString getDCMTKVersion();
|
||||
|
||||
private:
|
||||
bool exec(const char* cmd, std::string& result);
|
||||
bool exec2(const char* cmd, std::string& result);
|
||||
explicit cmdHelper(QObject* parent = nullptr);
|
||||
};
|
||||
|
||||
#endif // CMDHEPLER_H
|
||||
Reference in New Issue
Block a user