Advertisement
Guest User

123

a guest
Sep 7th, 2014
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. class What
  2. {
  3. int leftTime;
  4. QTimer *mTimer;
  5.  
  6. public:
  7.  
  8. Round()
  9. {
  10. leftTime = 3;
  11.  
  12. QTimer* mTimer = new QTimer();
  13. QObject::connect(mTimer, SIGNAL(timeout()), this, SLOT(Time()));
  14. }
  15.  
  16. void showPics()
  17. {
  18.  
  19. mTimer->start(1000);
  20. }
  21.  
  22. private slots:
  23.  
  24. void Time()
  25. {
  26. if(leftTime > 0)
  27. {
  28. leftTime--;
  29.  
  30. if(leftTime == 0)
  31. {
  32.  
  33. }
  34.  
  35.  
  36. }
  37. else
  38. {
  39. mTimer->stop();
  40. QObject::connect(mTimer, SIGNAL(timeout()), this, SLOT(changePic()));
  41.  
  42. mTimer->start(period);
  43. }
  44. }
  45.  
  46. void changePic()
  47. {
  48. for(int i = 2; i <= numberPics; i++)
  49. {
  50.  
  51. }
  52. mTimer->stop();
  53.  
  54. }
  55. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement