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/headers/client/scstwremotetimer.h

80 lines
2.3 KiB
C
Raw Normal View History

2020-10-02 19:56:08 +02:00
#ifndef SCSTWREMOTETIMER_H
#define SCSTWREMOTETIMER_H
#include <scstwtimer.h>
#include <QObject>
class ScStwRemoteTimer : public ScStwTimer
{
Q_OBJECT
public:
ScStwRemoteTimer(QObject *parent = nullptr);
friend class ScStwRemoteRace;
private:
ScStwTimer::ReadyState readyState;
public slots:
/*!
* \brief Function to get the current ready status of a timer
* \return The current ready status
*/
virtual ScStwTimer::ReadyState getReadyState();
protected slots:
/*!
* \brief Function to dircetly change the start time
*
* Only works when directControlEnabled is set to true!
*
* \param startTime the time to change to
* \return false when directControlEnabled is set to false and the startTime was therefore not modified, true otherwise
*/
void setStartTime(double startTime);
/*!
* \brief Function to dircetly change the stop time
*
* Only works when directControlEnabled is set to true!
*
* \param stopTime the time to change to
* \return false when directControlEnabled is set to false and the stopTime was therefore not modified, true otherwise
*/
void setStopTime(double stopTime);
/*!
* \brief Function to dircetly change the rection time
*
* Only works when directControlEnabled is set to true!
*
* \param reactionTime the time to change to
* \return false when directControlEnabled is set to false and the reactionTime was therefore not modified, true otherwise
*/
void setReactionTime(double rectionTime);
/*!
* \brief Function to dircetly change the letter
*
* Only works when directControlEnabled is set to true!
*
* \param newLetter the letter to change to
* \return false when directControlEnabled is set to false and the letter was therefore not modified, true otherwise
*/
void setLetter(QString newLetter);
void setReadyState(ScStwTimer::ReadyState);
/*!
* \brief Function to change the state of the timer
*
* Doing this will emit the ScStwTimer::stateChanged() signal (only if the new state differs from the current one)
*
* \param newState The new state
*/
void setState(TimerState newState);
};
#endif // SCSTWREMOTETIMER_H