refs #859, allow to trigger digest signal manually

* Useful if the input signal was just a bogus signal used to trigger
* Login component shows a use case
This commit is contained in:
Klaus Basan
2017-01-13 22:05:11 +01:00
committed by Mathew Sutcliffe
parent 4e7144db08
commit 265b6d33f0
5 changed files with 44 additions and 26 deletions

View File

@@ -205,7 +205,7 @@ namespace BlackGui
{
this->m_logoffCountdownTimer->stop();
ui->pb_LogoffTimeout->setValue(LogoffIntervalSeconds);
emit loginOrLogoffCancelled();
emit this->loginOrLogoffCancelled();
}
void CLoginComponent::ps_toggleNetworkConnection()
@@ -301,11 +301,11 @@ namespace BlackGui
if (!ownAircraft.getAircraftIcaoCombinedType().isEmpty()) { ac += " "; ac += ownAircraft.getAircraftIcaoCode().getCombinedType(); }
ui->le_LoginSince->setText(QDateTime::currentDateTimeUtc().toString());
ui->le_LoginAsAircaft->setText(ac);
emit loginOrLogoffSuccessful();
emit this->loginOrLogoffSuccessful();
}
else
{
emit loginOrLogoffCancelled();
emit this->loginOrLogoffCancelled();
}
}
@@ -462,7 +462,7 @@ namespace BlackGui
const bool changedOwnAircraftIcaoValues = this->updateOwnAircaftIcaoValuesFromGuiValues();
if (changedOwnAircraftIcaoValues || changedOwnAircraftCallsignPilot)
{
emit this->loginDataChanged();
this->m_changedLoginDataDigestSignal.inputSignal();
}
}
@@ -595,7 +595,7 @@ namespace BlackGui
this->updateOwnAircraftCallsignAndPilotFromGuiValues();
// let others know data changed
emit this->loginDataChanged();
this->m_changedLoginDataDigestSignal.inputSignal();
}
void CLoginComponent::ps_mappingWizard()

View File

@@ -78,10 +78,6 @@ namespace BlackGui
//! Request network settings
void requestNetworkSettings();
//! Relevant login data changed
//! \private normally loginDataChangedDigest will be used
void loginDataChanged();
//! Relevant login data changed (digest version)
void loginDataChangedDigest();
@@ -208,7 +204,7 @@ namespace BlackGui
QScopedPointer<Ui::CLoginComponent> ui;
QScopedPointer<CDbQuickMappingWizard> m_mappingWizard;
BlackMisc::CDigestSignal m_changedLoginDataDigestSignal { this, &CLoginComponent::loginDataChanged, &CLoginComponent::loginDataChangedDigest, 1500, 10 };
BlackMisc::CDigestSignal m_changedLoginDataDigestSignal { this, &CLoginComponent::loginDataChangedDigest, 1500, 10 };
bool m_autoPopupWizard = false; //!< automatically popup wizard if mapping is needed
bool m_visible = false; //!< is this component selected?
const int LogoffIntervalSeconds = 20; //!< time before logoff