working timer
This commit is contained in:
22
include/widgets/controlCenter/timer.hpp
Normal file
22
include/widgets/controlCenter/timer.hpp
Normal 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;
|
||||
};
|
||||
Reference in New Issue
Block a user