Files
z-bar-qt/Plugins/ZShell/Services/tickingservice.hpp
T
zach cc9aeca98b
C++ / fmt (pull_request) Failing after 4s
C++ / build (pull_request) Failing after 10s
C++ / clang-tidy (pull_request) Failing after 10s
JS/TS / fmt (pull_request) Successful in 10s
JS/TS / lint (pull_request) Successful in 9s
Python / static (pull_request) Successful in 33s
Rust / build (pull_request) Successful in 48s
Python / verify (pull_request) Successful in 1m42s
Rust / fmt (pull_request) Successful in 26s
Rust / clippy (pull_request) Successful in 45s
fix: column index desync after reorder
2026-09-27 22:47:31 +02:00

39 lines
623 B
C++

#pragma once
#include <qtimer.h>
#include "service.hpp"
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();
void updateTriggered();
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