This repository has been archived on 2024-06-03. You can view files and clone it, but cannot push or open issues or pull requests.
app/headers/buzzerconn.h
2018-08-02 12:51:05 +02:00

49 lines
1,010 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;
double latest_button_pressed;
double starttime;
bool connected;
int connection_progress;
private:
QNetworkAccessManager *networkManager;
QDateTime *date;
signals:
public slots:
ReturnData_t senddata(QUrl serviceUrl, int timeout);
Q_INVOKABLE QList<double> gettimes(int timeout);
Q_INVOKABLE bool connect();
Q_INVOKABLE bool calcoffset();
Q_INVOKABLE bool buzzer_triggered();
Q_INVOKABLE bool start();
Q_INVOKABLE double get(QString key);
Q_INVOKABLE QString test();
};
#endif // BUZZERCONN_H