Restructured locations of source.
This commit is contained in:
parent
78a4c6d730
commit
7c4e8e95e8
151 changed files with 1 additions and 0 deletions
30
src/pglab/stopwatch.h
Normal file
30
src/pglab/stopwatch.h
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#ifndef STOPWATCH_H
|
||||
#define STOPWATCH_H
|
||||
|
||||
#include <QTimer>
|
||||
#include <QElapsedTimer>
|
||||
|
||||
class QLabel;
|
||||
|
||||
class StopWatch : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
StopWatch();
|
||||
|
||||
void start();
|
||||
qint64 elapsed();
|
||||
void stop();
|
||||
|
||||
void setOutputLabel(QLabel *label);
|
||||
private:
|
||||
QElapsedTimer m_elapsed; // = nullptr; ///< Keeps time
|
||||
QTimer m_timer; ///< triggers updates
|
||||
QLabel* m_output = nullptr;
|
||||
qint64 m_timeTaken = 0LL;
|
||||
|
||||
|
||||
private slots:
|
||||
void updateTimer();
|
||||
};
|
||||
|
||||
#endif // STOPWATCH_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue