working timer

This commit is contained in:
2026-02-07 21:16:35 +01:00
parent ff2d0afd9b
commit 6be70a7d93
14 changed files with 456 additions and 3 deletions

View File

@@ -0,0 +1,22 @@
#pragma once
#include <memory>
#include <sys/types.h>
#include "components/timer.hpp"
#include "services/timerService.hpp"
#include "gtkmm/box.h"
class TimerWidget : public Gtk::Box {
public:
TimerWidget();
void addTimer(const std::string &duration, uint64_t timerId);
void removeTimer(uint64_t timerId);
void activateTimer(uint64_t timerId);
private:
std::shared_ptr<TimerService> timerService = TimerService::getInstance();
bool updatingText = false;
std::string rawDigits;
std::map<uint64_t, std::unique_ptr<Timer>> activeTimers;
};