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/buzzerconn.h

48 lines
986 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);
Q_INVOKABLE QList<double> gettimes();
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