Ref T241, misc. logger improvements

* string formatting of logger info
* display longer in simulator
* better formatting of message
This commit is contained in:
Klaus Basan
2018-02-04 07:57:41 +01:00
parent 78711487a6
commit 5a15e74f63
7 changed files with 92 additions and 43 deletions

View File

@@ -811,8 +811,15 @@ namespace BlackCore
QString dm;
static const QString sep("\n");
if (s.tsCurrent > 0) { dm = QStringLiteral("Situation: ") % s.toQString(true, true, true, true, true, true, sep); }
if (p.tsCurrent > 0) { dm += (dm.isEmpty() ? QStringLiteral("") : "\n\n") % QStringLiteral("Parts: ") % p.toQString(sep); }
if (s.tsCurrent > 0)
{
dm = QStringLiteral("Hints: ") % s.usedHints.asString(false, true) %
QStringLiteral("\n") %
QStringLiteral("Setup: ") % s.usedSetup.toQString(true) %
QStringLiteral("\n\n") %
QStringLiteral("Situation: ") % s.toQString(false, false, true, true, true, true, sep);
}
if (p.tsCurrent > 0) { dm += (dm.isEmpty() ? QStringLiteral("") : QStringLiteral("\n\n")) % QStringLiteral("Parts: ") % p.toQString(sep); }
if (!dm.isEmpty()) { this->displayStatusMessage(CStatusMessage(this).info(dm)); }
const int t = 4500 + (qrand() % 1000); // makes sure not always using the same time difference

View File

@@ -260,7 +260,7 @@ namespace BlackCore
void callPhysicallyRemoveRemoteAircraft(const BlackMisc::Aviation::CCallsign &remoteCallsign);
//! Display a logged situation in simulator
void displayLoggedSituationInSimulator(const BlackMisc::Aviation::CCallsign &cs, bool stopLogging, int times = 10);
void displayLoggedSituationInSimulator(const BlackMisc::Aviation::CCallsign &cs, bool stopLogging, int times = 25);
bool m_blinkCycle = false; //!< used for highlighting
qint64 m_highlightEndTimeMsEpoch = 0; //!< end highlighting