Files
qt5-legatus-legacy/Lts/Services/CentralEffectSimulation/Plugins/FunctionalAreas/supplytimer.h
T
2026-08-13 18:33:10 +02:00

42 lines
796 B
C++
Executable File

/**
* CES Supply Truck Timer
* $Id$
* $HeadURL$
* $Author$
* Created by Gerlinde Rudolphus, SLTE, 2016-04-14
*/
#pragma once
#include <QObject>
#include <QTimer>
namespace CES_FUNCTIONAL_AREA
{
class SupplyTimer: public QObject
{
Q_OBJECT
public:
SupplyTimer(int participantId,
int aesId,
int timeToEffectInterval_msec);
void startTimer();
void stopTimer();
bool isActive() { return m_timer->isActive(); }
int getParticipantId() { return m_aesId; }
public slots:
void myTimerSlot();
signals:
void timeToEffectTimeout(int participantId, int targetParticipantId);
private:
QTimer *m_timer{nullptr};
int m_participantId{0};
int m_aesId{0};
int m_timeToEffectInterval{0};
};
} // namespace CES_FUNCTIONAL_AREA