mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +08:00
As of workshop RW/KB, improved / fixed text messages
Also refs #351 * messages can be formatted with style sheet * fixed: removed command from message * added originator to command line * msg parsing now in core * using ITimestampBased for text messages and status messages * allow to resize rows to content (view base) * model / views for text messages * removed old qt stylesheets
This commit is contained in:
@@ -225,15 +225,17 @@ namespace BlackCore
|
||||
return aircraft;
|
||||
}
|
||||
|
||||
bool CContextOwnAircraft::parseCommandLine(const QString &commandLine)
|
||||
bool CContextOwnAircraft::parseCommandLine(const QString &commandLine, const QString &originator)
|
||||
{
|
||||
static CSimpleCommandParser parser(
|
||||
Q_UNUSED(originator);
|
||||
if (commandLine.isEmpty()) { return false; }
|
||||
CSimpleCommandParser parser(
|
||||
{
|
||||
".x", ".xpdr", // transponder
|
||||
".com1", ".com2", // com1, com2 frequencies
|
||||
".c1", ".c2", // com1, com2 frequencies
|
||||
".selcal"
|
||||
});
|
||||
if (commandLine.isEmpty()) { return false; }
|
||||
parser.parse(commandLine);
|
||||
if (!parser.isKnownCommand()) { return false; }
|
||||
|
||||
@@ -256,7 +258,7 @@ namespace BlackCore
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (parser.commandStartsWith("com"))
|
||||
else if (parser.commandStartsWith("com") || parser.commandStartsWith("c"))
|
||||
{
|
||||
CFrequency frequency(parser.toDouble(1), CFrequencyUnit::MHz());
|
||||
if (CComSystem::isValidComFrequency(frequency))
|
||||
|
||||
Reference in New Issue
Block a user