mythread.h 496 B

123456789101112131415161718192021222324252627282930
  1. #ifndef MYTHREAD_H
  2. #define MYTHREAD_H
  3. #include <QThread>
  4. #include <QTcpSocket>
  5. #include <QDebug>
  6. class MyThread : public QThread
  7. {
  8. Q_OBJECT
  9. public:
  10. explicit MyThread(long iID, QObject *parent = 0);
  11. void run();
  12. signals:
  13. void error(QTcpSocket::SocketError socketerror);
  14. public slots:
  15. void readyRead();
  16. void disconnected();
  17. public slots:
  18. private:
  19. QTcpSocket *socket;
  20. int socketDescriptor;
  21. QString cmd_left,cmd_right,cmd_f5,cmd_esc;
  22. };
  23. #endif // MYTHREAD_H