infocenterserver.h 788 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef INFOCENTERSERVER_H
  2. #define INFOCENTERSERVER_H
  3. #include <QTcpServer>
  4. #include <QTcpSocket>
  5. #include <QStringList>
  6. #include <QTimer>
  7. #include <QList>
  8. #include "infoclient.h"
  9. class InfoCenterServer : public QTcpServer
  10. {
  11. Q_OBJECT
  12. public:
  13. explicit InfoCenterServer(QObject *parent = nullptr);
  14. void start();
  15. bool check_usercompany(QString agentid, QString compnaycode);
  16. void appendData(QString data);
  17. protected:
  18. void incomingConnection(qintptr socketDescriptor) override;
  19. signals:
  20. void weblog(QString emitlog);
  21. public slots:
  22. void write_error();
  23. void receivelog(QString recelog);
  24. // void savedata();
  25. private:
  26. // QList<InfoClient *> clientList;
  27. // QTimer *timer;
  28. // QSqlDatabase db;
  29. // int flag;
  30. };
  31. #endif // INFOCENTERSERVER_H