This repository has been archived on 2024-06-03. You can view files and clone it, but cannot push or open issues or pull requests.
shared-libraries/ScStwLibraries/sources/client/scstwremotetimer.cpp

43 lines
1.1 KiB
C++
Raw Normal View History

2020-10-02 19:56:08 +02:00
#include "../../headers/client/scstwremotetimer.h"
ScStwRemoteTimer::ScStwRemoteTimer(QObject *parent) : ScStwTimer(parent)
{
this->readyState = ScStwTimer::getReadyState();
}
ScStwTimer::ReadyState ScStwRemoteTimer::getReadyState() {
return this->readyState;
}
void ScStwRemoteTimer::setStartTime(double startTime) {
this->startTime = startTime;
}
void ScStwRemoteTimer::setStopTime(double stopTime) {
this->stopTime = stopTime;
}
void ScStwRemoteTimer::setReactionTime(double reactionTime) {
this->reactionTime = reactionTime;
emit this->reactionTimeChanged();
2020-10-02 19:56:08 +02:00
}
void ScStwRemoteTimer::setLetter(QString newLetter) {
this->letter = newLetter;
}
void ScStwRemoteTimer::setReadyState(ScStwTimer::ReadyState readyState) {
if(this->readyState != readyState) {
this->readyState = readyState;
emit this->readyStateChanged(readyState);
}
}
void ScStwRemoteTimer::setState(TimerState newState){
if(this->state != newState) {
this->state = newState;
qDebug() << "+ [INFO][REMOTETIMER] timer state changed: " << newState;
emit this->stateChanged(this->state);
2020-10-02 19:56:08 +02:00
}
}