some fixes to remote race
This commit is contained in:
parent
6709a1fd2b
commit
9c73623418
4 changed files with 9 additions and 8 deletions
|
@ -60,12 +60,13 @@ public slots:
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void handleBaseStationSignal(ScStw::SignalKey key, QVariant data);
|
void handleBaseStationSignal(ScStw::SignalKey key, QVariant data);
|
||||||
void handleSettingChange(int keyInt, int keyLevel, QVariant value);
|
|
||||||
|
|
||||||
bool refreshRemoteTimers(QVariantList remoteTimers);
|
bool refreshRemoteTimers(QVariantList remoteTimers);
|
||||||
void rebuildRemoteTimers(QVariantList remoteTimers);
|
void rebuildRemoteTimers(QVariantList remoteTimers);
|
||||||
void refreshDetails(QVariantMap details);
|
void refreshDetails(QVariantMap details);
|
||||||
void handleClientStateChange();
|
void handleClientStateChange();
|
||||||
|
|
||||||
|
void refreshCompetitionMode();
|
||||||
RaceMode getMode();
|
RaceMode getMode();
|
||||||
bool local();
|
bool local();
|
||||||
};
|
};
|
||||||
|
|
|
@ -129,12 +129,6 @@ bool ScStwRemoteRace::local() {
|
||||||
return this->getMode() == LOCAL;
|
return this->getMode() == LOCAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScStwRemoteRace::handleSettingChange(int keyInt, int keyLevel, QVariant value) {
|
|
||||||
if(this->local())
|
|
||||||
return ScStwRace::handleSettingChange(keyInt, keyLevel, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief ScStwAppBackend::handleBaseStationUpdate
|
* @brief ScStwAppBackend::handleBaseStationUpdate
|
||||||
*
|
*
|
||||||
|
@ -292,3 +286,8 @@ bool ScStwRemoteRace::getReadySoundEnabled() {
|
||||||
|
|
||||||
return this->readySoundEnabled;
|
return this->readySoundEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ScStwRemoteRace::refreshCompetitionMode() {
|
||||||
|
if(this->local())
|
||||||
|
return ScStwRace::refreshCompetitionMode();
|
||||||
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ void ScStwLibraries::init() {
|
||||||
qRegisterMetaType<ScStw::SocketCommand>("ScStw::SocketCommand");
|
qRegisterMetaType<ScStw::SocketCommand>("ScStw::SocketCommand");
|
||||||
qRegisterMetaType<ScStw::StatusCode>("ScStw::StatusCode");
|
qRegisterMetaType<ScStw::StatusCode>("ScStw::StatusCode");
|
||||||
|
|
||||||
qmlRegisterType<ScStwRace>("de.itsblue.ScStw", 2, 0, "ScStwRace");
|
qmlRegisterUncreatableType<ScStwRace>("de.itsblue.ScStw", 2, 0, "ScStwRace", "ScStwRace is not creatable");
|
||||||
qmlRegisterType<ScStwTimer>("de.itsblue.ScStw", 2, 0, "ScStwTimer");
|
qmlRegisterType<ScStwTimer>("de.itsblue.ScStw", 2, 0, "ScStwTimer");
|
||||||
|
|
||||||
#ifdef ScStwLibraries_ClientLibs
|
#ifdef ScStwLibraries_ClientLibs
|
||||||
|
|
|
@ -667,6 +667,7 @@ QVariantList ScStwRace::getTimerDetailList() {
|
||||||
tmpTimer.insert("reactionTime", timer->getReactionTime());
|
tmpTimer.insert("reactionTime", timer->getReactionTime());
|
||||||
tmpTimer.insert("letter", timer->getLetter());
|
tmpTimer.insert("letter", timer->getLetter());
|
||||||
tmpTimer.insert("readyState", timer->getReadyState());
|
tmpTimer.insert("readyState", timer->getReadyState());
|
||||||
|
tmpTimer.insert("text", timer->getText());
|
||||||
tmpTimers.append(tmpTimer);
|
tmpTimers.append(tmpTimer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue