18#include "TimeUnitLabel.hpp"
20#include "src/ui/TimeUnit.hpp"
39 QString timeStr =
"0";
41 for(
const auto &unit : TIME_UNITS) {
42 auto m = unit.multiplier();
43 if (this->time >= m) {
45 timeStr = QString::number(this->time/m,
'f');
50 this->setText(timeStr + unitStr);
void setTime(double time)
TimeUnitLabel(double time, QWidget *parent=nullptr)
void updateView()
Updates the view to reflect the current state.