added timer
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <QMainWindow>
|
||||
#include <QSettings>
|
||||
#include <QStateMachine>
|
||||
#include <QTimer>
|
||||
|
||||
namespace Ui {
|
||||
class MainWindow;
|
||||
@@ -21,16 +22,22 @@ public:
|
||||
|
||||
private slots:
|
||||
void on_btn_startstop_clicked();
|
||||
void updateTime();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
|
||||
QSettings* mSettings = nullptr;
|
||||
QStateMachine mState;
|
||||
QStateMachine mStateMachine;
|
||||
QByteArray mCss;
|
||||
QTimer mTimer;
|
||||
int mTimeLeft = -1; // in seconds
|
||||
|
||||
void initStateMachine();
|
||||
void triggerCssUpdate();
|
||||
void keyPressEvent(QKeyEvent *event) override;
|
||||
void timerToggled();
|
||||
void shutdown();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user