2023-12-20 17:05:47 +01:00
|
|
|
#ifndef REPORTING_THREAD_H_INCLUDED
|
|
|
|
#define REPORTING_THREAD_H_INCLUDED
|
|
|
|
|
|
|
|
#include <QThread>
|
|
|
|
#include <QString>
|
2024-02-02 13:31:04 +01:00
|
|
|
// #include <functional>
|
2023-12-20 17:05:47 +01:00
|
|
|
|
|
|
|
class hwapi;
|
|
|
|
class ReportingThread : public QThread {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
ReportingThread(hwapi *hw);
|
|
|
|
~ReportingThread();
|
|
|
|
|
2024-02-02 13:31:04 +01:00
|
|
|
//void setFunction(std::function<void(QString const&)> f) {
|
|
|
|
// m_f = f;
|
|
|
|
//}
|
|
|
|
|
|
|
|
//std::function<void(QString const&)> function() {
|
|
|
|
// return m_f;
|
|
|
|
//}
|
|
|
|
|
2023-12-20 17:05:47 +01:00
|
|
|
protected:
|
|
|
|
// reporting thread does not have a running event queue, and therefore
|
|
|
|
// no slots. signals work the usual way.
|
|
|
|
void run() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
hwapi *m_hw;
|
|
|
|
QString m_fileToDownload;
|
2024-02-02 13:31:04 +01:00
|
|
|
//std::function<void(QString const&)> m_f;
|
2023-12-20 17:05:47 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // REPORTING_THREAD_H_INCLUDED
|