You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test.h 565B

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