mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 08:36:52 +08:00
refs #894, register dot commands for help
(wherever dor commands are implemented)
This commit is contained in:
committed by
Mathew Sutcliffe
parent
b287d8d9d7
commit
38ea336cbb
@@ -62,6 +62,7 @@ namespace BlackCore
|
||||
Q_ASSERT(this->getRuntime());
|
||||
Q_ASSERT(this->getIContextOwnAircraft());
|
||||
Q_ASSERT(this->getIContextOwnAircraft()->isUsingImplementingObject());
|
||||
CContextNetwork::registerHelp();
|
||||
|
||||
// 1. Init by "network driver"
|
||||
this->m_network = new CNetworkVatlib(this->getRuntime()->getCContextOwnAircraft(), this);
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "blackmisc/statusmessage.h"
|
||||
#include "blackmisc/digestsignal.h"
|
||||
#include "blackmisc/identifier.h"
|
||||
#include "blackmisc/simplecommandparser.h"
|
||||
|
||||
class QTimer;
|
||||
|
||||
@@ -141,6 +142,15 @@ namespace BlackCore
|
||||
//! \copydoc IContextNetwork::parseCommandLine
|
||||
virtual bool parseCommandLine(const QString &commandLine, const BlackMisc::CIdentifier &originator) override;
|
||||
|
||||
//! Register help
|
||||
static void registerHelp()
|
||||
{
|
||||
if (BlackMisc::CSimpleCommandParser::registered("BlackCore::CContextNetwork")) { return; }
|
||||
BlackMisc::CSimpleCommandParser::registerCommand({".m", "alias: .msg"});
|
||||
BlackMisc::CSimpleCommandParser::registerCommand({".m message <text>", "send text message"});
|
||||
BlackMisc::CSimpleCommandParser::registerCommand({".m callsign message <text>", "send text message"});
|
||||
}
|
||||
|
||||
//! \publicsection
|
||||
//! @{
|
||||
virtual BlackMisc::Aviation::CAtcStationList getAtcStationsBooked() const override;
|
||||
|
||||
@@ -58,6 +58,7 @@ namespace BlackCore
|
||||
{
|
||||
Q_ASSERT(this->getRuntime());
|
||||
this->setObjectName("CContextOwnAircraft");
|
||||
CContextOwnAircraft::registerHelp();
|
||||
|
||||
if (sApp && sApp->getWebDataServices())
|
||||
{
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "blackmisc/settingscache.h"
|
||||
#include "blackmisc/identifiable.h"
|
||||
#include "blackmisc/identifier.h"
|
||||
#include "blackmisc/simplecommandparser.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QReadWriteLock>
|
||||
@@ -141,6 +142,7 @@ namespace BlackCore
|
||||
//! @{
|
||||
//! <pre>
|
||||
//! .x .xpdr code set transponder code BlackCore::Context::CContextOwnAircraft
|
||||
//! .x .xpdr mode set transponder mode BlackCore::Context::CContextOwnAircraft
|
||||
//! .com1 .com2 frequency set COM1/2 frequency BlackCore::Context::CContextOwnAircraft
|
||||
//! .selcal code set SELCAL code BlackCore::Context::CContextOwnAircraft
|
||||
//! </pre>
|
||||
@@ -148,6 +150,18 @@ namespace BlackCore
|
||||
//! \copydoc IContextOwnAircraft::parseCommandLine
|
||||
virtual bool parseCommandLine(const QString &commandLine, const BlackMisc::CIdentifier &originator) override;
|
||||
|
||||
//! Register help
|
||||
static void registerHelp()
|
||||
{
|
||||
if (BlackMisc::CSimpleCommandParser::registered("BlackCore::Context::CContextOwnAircraft")) { return; }
|
||||
BlackMisc::CSimpleCommandParser::registerCommand({".x", "alias: .xpdr"});
|
||||
BlackMisc::CSimpleCommandParser::registerCommand({".x code|mode", "set XPDR code or mode"});
|
||||
BlackMisc::CSimpleCommandParser::registerCommand({".selcal code", "set SELCAL code"});
|
||||
BlackMisc::CSimpleCommandParser::registerCommand({".com1", "alias .c1"});
|
||||
BlackMisc::CSimpleCommandParser::registerCommand({".com1 frequency", "set COM1 frequency"});
|
||||
BlackMisc::CSimpleCommandParser::registerCommand({".com2 frequency", "set COM2 frequency"});
|
||||
}
|
||||
|
||||
protected:
|
||||
//! Constructor, with link to runtime
|
||||
CContextOwnAircraft(CCoreFacadeConfig::ContextMode, CCoreFacade *runtime);
|
||||
|
||||
Reference in New Issue
Block a user