40 lines
699 B
C
40 lines
699 B
C
|
#ifndef BUZZERCONN_H
|
||
|
#define BUZZERCONN_H
|
||
|
|
||
|
#include <QObject>
|
||
|
#include <QObject>
|
||
|
#include <QDir>
|
||
|
#include <QUrl>
|
||
|
#include <QtNetwork>
|
||
|
#include <QAuthenticator>
|
||
|
#include <QDesktopServices>
|
||
|
#include <QDateTime>
|
||
|
|
||
|
typedef struct strReturnData{
|
||
|
int status_code;
|
||
|
QString text;
|
||
|
}ReturnData_t;
|
||
|
|
||
|
class BuzzerConn : public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
explicit BuzzerConn(QObject *parent = nullptr);
|
||
|
double offset;
|
||
|
QList<double> latest_offsets;
|
||
|
bool connected;
|
||
|
|
||
|
private:
|
||
|
QNetworkAccessManager *networkManager;
|
||
|
|
||
|
signals:
|
||
|
|
||
|
public slots:
|
||
|
ReturnData_t senddata(QUrl serviceUrl);
|
||
|
QList<double> gettimes();
|
||
|
bool connect();
|
||
|
void calcoffset();
|
||
|
};
|
||
|
|
||
|
#endif // BUZZERCONN_H
|