42 lines
1.1 KiB
C++
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;
|
||
|
}
|
||
|
|
||
|
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();
|
||
|
}
|
||
|
}
|