TDengine.cpp 641 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #include "TDengine.h"
  2. #include <QDebug>
  3. TDengine::TDengine() {}
  4. void TDengine::Run()
  5. {
  6. start();
  7. }
  8. void TDengine::OnData(const QString& user, const QString& key, const QVariant& val)
  9. {
  10. qDebug() << __FILE__ << __FUNCTION__<< __LINE__ << user << key << val;
  11. }
  12. void TDengine::setLoader(QLibrary *)
  13. {
  14. }
  15. void TDengine::run()
  16. {
  17. while(!isInterruptionRequested()){
  18. qDebug() << __FILE__ << __FUNCTION__;
  19. QThread::msleep(1000);
  20. }
  21. }
  22. Client* instance()
  23. {
  24. return new TDengine();
  25. }
  26. void destroy(Client* pInstance)
  27. {
  28. if( pInstance )
  29. {
  30. delete pInstance;
  31. }
  32. }