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

42 lines
1.1 KiB
C++

#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();
}
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);
}
}