24 lines
520 B
C++
24 lines
520 B
C++
#ifndef DATAACCESSOR_H
|
|
#define DATAACCESSOR_H
|
|
|
|
/*********中转、处理网络数据*********/
|
|
#include <QObject>
|
|
#include <QMap>
|
|
#include <QMutex>
|
|
|
|
class DataAccessor : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
DataAccessor(QObject *parent = nullptr);
|
|
~DataAccessor();
|
|
public slots:
|
|
void onReceiveHttpData(const QString& sType,const QVariant& data);
|
|
void onReceiveWebsocketData(const QVariant& data);
|
|
private:
|
|
QMap<QString,QMap<quint64,double>> _realTimeData;
|
|
mutable QMutex m_mutex;
|
|
};
|
|
|
|
#endif
|