diff options
Diffstat (limited to 'map65/cqdatasender.h')
| -rw-r--r-- | map65/cqdatasender.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/map65/cqdatasender.h b/map65/cqdatasender.h new file mode 100644 index 00000000..9b21f238 --- /dev/null +++ b/map65/cqdatasender.h @@ -0,0 +1,32 @@ +// cqdatasender.h + +#ifndef CQDATASENDER_H +#define CQDATASENDER_H + +#include <QObject> +#include <QNetworkAccessManager> +#include <QThread> + +class CQDataSender : public QObject +{ + Q_OBJECT + +public: + explicit CQDataSender(QObject *parent = nullptr); + ~CQDataSender(); + +public slots: + void send(QString theUrl, const QString &data); // This runs in the worker thread + +signals: + void resultReady(const QString &response); // Success + void errorOccurred(const QString &error); // Error + +private slots: + void onFinished(QNetworkReply *reply); + +private: + QNetworkAccessManager *m_networkManager; +}; + +#endif // CQDATASENDER_H
\ No newline at end of file |
