diff options
| author | Crystalwarrior <varsash@gmail.com> | 2020-08-21 17:17:49 +0300 |
|---|---|---|
| committer | Crystalwarrior <varsash@gmail.com> | 2020-08-21 17:17:49 +0300 |
| commit | edf3d463e990ff8573bb6655c793490e6b1ea82c (patch) | |
| tree | 7d85a18f2ca7b6fb8f434017b700ef18090c834f /include | |
| parent | af1e76022568af1f146e2b49e96af85eb06521b9 (diff) | |
add a new aoclocklabel class that is a QLabel with fancy DR-Style timing features
WIP
Diffstat (limited to 'include')
| -rw-r--r-- | include/aoclocklabel.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/aoclocklabel.h b/include/aoclocklabel.h new file mode 100644 index 00000000..518cae7b --- /dev/null +++ b/include/aoclocklabel.h @@ -0,0 +1,29 @@ +#ifndef AOCLOCKLABEL_H +#define AOCLOCKLABEL_H + +#include <QLabel> +#include <QBasicTimer> +#include <QTimerEvent> +#include <QTime> + +class AOClockLabel : public QLabel { + Q_OBJECT + +public: + AOClockLabel(QWidget *parent); + void start(); + void start(QTime p_time); + void pause(); + void resume(); + void stop(); + +protected: + void timerEvent(QTimerEvent *event) override; + +private: + QBasicTimer timer; + QTime starting_time; + QTime target_time; +}; + +#endif // AOCLOCKLABEL_H |
