simpletimerqt.h 581 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef SIMPLETIMERQT_H
  2. #define SIMPLETIMERQT_H
  3. #include <QMainWindow>
  4. #include <QTimer>
  5. #include <QString>
  6. QT_BEGIN_NAMESPACE
  7. namespace Ui { class SimpleTimerQt; }
  8. QT_END_NAMESPACE
  9. class SimpleTimerQt : public QMainWindow
  10. {
  11. Q_OBJECT
  12. public:
  13. SimpleTimerQt(QWidget *parent = nullptr);
  14. ~SimpleTimerQt();
  15. private slots:
  16. void on_pushButton_clicked();
  17. void timer_slot();
  18. void on_pushButtonSetValues_clicked();
  19. private:
  20. Ui::SimpleTimerQt *ui;
  21. QTimer *timer;
  22. int ms, s, m;
  23. QString time;
  24. bool flagbtn = true;
  25. };
  26. #endif // SIMPLETIMERQT_H