diff --git a/ScStwLibraries/headers/scstwtimer.h b/ScStwLibraries/headers/scstwtimer.h index ccd67b4..7cfc984 100644 --- a/ScStwLibraries/headers/scstwtimer.h +++ b/ScStwLibraries/headers/scstwtimer.h @@ -64,6 +64,7 @@ class ScStwRemoteRace; class ScStwTimer : public QObject { Q_OBJECT + Q_PROPERTY(QString letter READ getLetter WRITE setLetter) public: explicit ScStwTimer(QObject *parent = nullptr); @@ -244,6 +245,13 @@ public slots: */ QString getLetter(); + /*! + * \brief Function to set the letter of the timer + * \param letter the letter + * \return The letter of the timer or "" + */ + void setLetter(QString letter); + /*! * \brief Function to set if the timer is supposed to be disabled * diff --git a/ScStwLibraries/sources/scstwtimer.cpp b/ScStwLibraries/sources/scstwtimer.cpp index f426313..9ba8567 100644 --- a/ScStwLibraries/sources/scstwtimer.cpp +++ b/ScStwLibraries/sources/scstwtimer.cpp @@ -231,6 +231,10 @@ QString ScStwTimer::getLetter() { return this->letter; } +void ScStwTimer::setLetter(QString letter) { + this->letter = letter; +} + QString ScStwTimer::getText() { QString newText = ""; int newTime = 0;