It is now possible to create multiple independent query tabs. However somethings are currently a bit broken.
24 lines
416 B
C++
24 lines
416 B
C++
#ifndef STOPWATCH_H
|
|
#define STOPWATCH_H
|
|
|
|
#include <QTimer>
|
|
#include <QElapsedTimer>
|
|
#include <memory>
|
|
|
|
class StopWatch : public QObject {
|
|
Q_OBJECT
|
|
public:
|
|
StopWatch();
|
|
|
|
void start();
|
|
qint64 elapsed();
|
|
private:
|
|
std::unique_ptr<QElapsedTimer> m_elapsed = nullptr; ///< Keeps time
|
|
std::unique_ptr<QTimer> m_timer = nullptr; ///< triggers updates
|
|
|
|
|
|
private slots:
|
|
void updateTimer();
|
|
};
|
|
|
|
#endif // STOPWATCH_H
|