Files
z-bar-qt/Plugins/ZShell/Services/tickingservice.hpp
T
zach 2a50732bc2
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 10s
Python / lint-format (pull_request) Successful in 23s
Python / test (pull_request) Successful in 31s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m12s
resources popout refresh + new components & reskinned old components
2026-06-14 23:09:10 +02:00

36 lines
578 B
C++

#pragma once
#include "service.hpp"
#include <qtimer.h>
namespace ZShell::services {
class TickingService : public Service {
Q_OBJECT
Q_PROPERTY(int updateInterval READ updateInterval NOTIFY updateIntervalChanged)
public:
explicit TickingService(QObject* parent = nullptr);
[[nodiscard]] int updateInterval() const;
signals:
void updateIntervalChanged();
protected:
void start() final;
void stop() final;
virtual void tick() = 0;
private:
void applyInterval(int ms);
QTimer* m_timer;
int m_interval = 1000;
bool m_running = false;
};
} // namespace ZShell::services