app/headers/buzzerconn.h

49 lines
986 B
C
Raw Normal View History

#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;
2018-07-26 14:54:11 +02:00
double latest_button_pressed;
double starttime;
bool connected;
int connection_progress;
2018-07-26 14:54:11 +02:00
private:
QNetworkAccessManager *networkManager;
2018-07-26 14:54:11 +02:00
QDateTime *date;
signals:
public slots:
ReturnData_t senddata(QUrl serviceUrl);
2018-07-26 14:54:11 +02:00
Q_INVOKABLE QList<double> gettimes();
Q_INVOKABLE bool connect();
Q_INVOKABLE bool calcoffset();
2018-07-26 14:54:11 +02:00
Q_INVOKABLE bool buzzer_triggered();
Q_INVOKABLE bool start();
Q_INVOKABLE double get(QString key);
Q_INVOKABLE QString test();
};
#endif // BUZZERCONN_H