您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef TEST_H
  2. #define TEST_H
  3. #include <QObject>
  4. #include "ptserver.h"
  5. #include "ptsocket.h"
  6. #include <QDebug>
  7. #define ASSERT_LISTEN Q_ASSERT(m_serv->isListening())
  8. class Test : public QObject
  9. {
  10. Q_OBJECT
  11. public:
  12. explicit Test(QObject *parent = 0);
  13. signals:
  14. public slots:
  15. void testIntConvert();
  16. void testListen(quint16 p);
  17. void testNewConnection();
  18. private slots:
  19. void m_newConnection();
  20. void m_newClient(PTSocket* s);
  21. void m_clientStateChanged(PTSocket::State s);
  22. private:
  23. PTServer* m_serv;
  24. QList<PTSocket*> m_clients;
  25. };
  26. #endif // TEST_H