dottextautorepeat.cpp 539 B

123456789101112131415161718192021222324252627
  1. #include "dottextautorepeat.h"
  2. DotTextAutoRepeat::DotTextAutoRepeat()
  3. {
  4. this->stop = false;
  5. }
  6. DotTextAutoRepeat::~DotTextAutoRepeat()
  7. {
  8. qDebug()<<QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss")\
  9. <<"ShowDisplayText Destroyed.";
  10. }
  11. void DotTextAutoRepeat::abort()
  12. {
  13. this->stop = true;
  14. }
  15. void DotTextAutoRepeat::run()
  16. {
  17. int i=1;
  18. while(!stop)
  19. {
  20. if(i>6)
  21. i=1;
  22. emit showText(QString(".").leftJustified(i++,'.'));
  23. msleep(500);
  24. }
  25. }