mirror of
https://github.com/thunderbug1/Spherebot-Host-GUI.git
synced 2026-03-03 08:33:59 +01:00
40 lines
713 B
C++
40 lines
713 B
C++
#ifndef TXTHREAD_H
|
|
#define TXTHREAD_H
|
|
#include <QThread>
|
|
#include <QString>
|
|
#include "spherebot.h"
|
|
#include <QMessageBox>
|
|
#include <QTimer>
|
|
|
|
#define MAXBUFFERCOUNTER 1
|
|
#define SENDBUFFERINTERVAL 30
|
|
|
|
class txThread : public QThread
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
txThread();
|
|
void set(QString textfile,spherebot &bot);
|
|
void run();
|
|
~txThread();
|
|
int getLineCounter();
|
|
QTimer *checkSendBufferTimer;
|
|
|
|
signals:
|
|
void progressChanged(int);
|
|
void fileTransmitted();
|
|
|
|
public slots:
|
|
void checkResponse(QString msg);
|
|
void checkBuffer();
|
|
private:
|
|
QString textfile;
|
|
int lineCounter;
|
|
int lineMax;
|
|
int bufferCounter;
|
|
int drawCounter;
|
|
spherebot *bot;
|
|
};
|
|
|
|
#endif // TXTHREAD_H
|