43 lines
982 B
C++
43 lines
982 B
C++
#ifndef MEASUREWORKER_H
|
|
#define MEASUREWORKER_H
|
|
|
|
#include <QObject>
|
|
|
|
class MeasureClient;
|
|
|
|
class MeasureWorker : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
|
|
private:
|
|
MeasureWorker(QObject* parent = nullptr);
|
|
static MeasureWorker* _s_instance;
|
|
|
|
public:
|
|
static MeasureWorker* Instance();
|
|
virtual ~MeasureWorker();
|
|
|
|
void SetMeasureProjectName(const QString& project_name);
|
|
|
|
void Connect();
|
|
void Start();
|
|
void Stop();
|
|
void ClearData();
|
|
|
|
private slots:
|
|
void onStartMeasureResult(bool success, const QString& info);
|
|
void onStopMeasureResult(bool success, const QString& message);
|
|
void onSetMeasureConfigParamsResult(bool success, const QString& message);
|
|
void onClearDataResult(bool success, const QString& message);
|
|
void onGetDeviceListResult(bool success, const QStringList &devices);
|
|
void onErrorOccurred(const QString &errorString);
|
|
|
|
private:
|
|
MeasureClient* _measure_client = nullptr;
|
|
QString _measure_project_name;
|
|
};
|
|
|
|
#endif
|
|
|