ttsthreads.h 751 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef TTSTHREADS_H
  2. #define TTSTHREADS_H
  3. #include <QThread>
  4. #include <QTcpSocket>
  5. #include <QStringList>
  6. #include <QHostAddress>
  7. #include <QDateTime>
  8. class ttsThreads : public QThread
  9. {
  10. Q_OBJECT
  11. public:
  12. explicit ttsThreads(QObject *parent = NULL, quint16 idx=0, QString ip="", QString path="", quint16 port=0);
  13. void appendData(QString data);
  14. void stoptts();
  15. void run();
  16. // void ttslog(quint16 idx, QDateTime t, QString data, bool dirflag);
  17. signals:
  18. void ttslog(quint16 idx, QDateTime t, QString data, bool dirflag);
  19. public slots:
  20. private:
  21. bool keepWorking;
  22. quint16 Idx;
  23. QString DestIp;
  24. QString DestPath;
  25. QStringList DataList;
  26. QTcpSocket *so[16];
  27. quint16 DestPort;
  28. };
  29. #endif // TTSTHREADS_H