August 2018
Intermediate to advanced
534 pages
11h 21m
English
Let's make the Linux implementation of our ch02-sysinfo project. If you have already done the Windows implementation, it will be a piece of cake! If you have not, you should take a look at it. Some information and tips will not be repeated in this part, such as how to create a SysInfo implementation class, keyboard shortcuts, and details about the SysInfo interface.
Create a new C++ class, called SysInfoLinuxImpl, that inherits from the SysInfo class and insert virtual functions from the base class:
#include <QtGlobal>#include "SysInfo.h"
class SysInfoLinuxImpl : public SysInfo
{
public:
SysInfoLinuxImpl();
void init() override;
double cpuLoadAverage() override;
double memoryUsed() override;
};
We will start ...
Read now
Unlock full access