From edf3d463e990ff8573bb6655c793490e6b1ea82c Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Fri, 21 Aug 2020 17:17:49 +0300 Subject: add a new aoclocklabel class that is a QLabel with fancy DR-Style timing features WIP --- include/aoclocklabel.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 include/aoclocklabel.h (limited to 'include') 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 +#include +#include +#include + +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 -- cgit