Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef DIALOG_H
- #define DIALOG_H
- #include <QDialog>
- #include<QTimer>
- class Round : public QDialog
- {
- Q_OBJECT
- int leftTime,period;
- QTimer *mTimer;
- public:
- Round()
- {
- leftTime = 3;
- period = 1;
- QTimer* mTimer = new QTimer();
- QObject::connect(mTimer, SIGNAL(timeout()), this, SLOT(Time()));
- }
- void showPics()
- {
- mTimer->start(1000);
- }
- private slots:
- void Time()
- {
- if(leftTime > 0)
- {
- leftTime--;
- if(leftTime == 0)
- {
- }
- }
- else
- {
- mTimer->stop();
- QObject::connect(mTimer, SIGNAL(timeout()), this, SLOT(changePic()));
- mTimer->start(period);
- }
- }
- void changePic()
- {
- /*for(int i = 2; i <= numberPics; i++)
- {
- }
- mTimer->stop();*/
- }
- };
- #endif // DIALOG_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement