refs #894, register dot commands for help

(wherever dor commands are implemented)
This commit is contained in:
Klaus Basan
2017-03-03 05:00:04 +01:00
committed by Mathew Sutcliffe
parent b287d8d9d7
commit 38ea336cbb
12 changed files with 83 additions and 20 deletions

View File

@@ -25,6 +25,7 @@
#include "blackmisc/identifiable.h"
#include "blackmisc/identifier.h"
#include "blackmisc/pixmap.h"
#include "blackmisc/simplecommandparser.h"
#include <QFlags>
#include <QObject>
@@ -159,6 +160,15 @@ namespace BlackCore
//! Parse command line
virtual bool parseCommandLine(const QString &commandLine, const BlackMisc::CIdentifier &originator) = 0;
//! Register help
static void registerHelp()
{
if (BlackMisc::CSimpleCommandParser::registered("BlackCore::ISimulator")) { return; }
BlackMisc::CSimpleCommandParser::registerCommand({".drv", "alias: .driver .plugin"});
BlackMisc::CSimpleCommandParser::registerCommand({".drv unload", "unload driver"});
BlackMisc::CSimpleCommandParser::registerCommand({".drv fsuipc on|off", "enable/disable FSUIPC (if applicable)"});
}
//! Status to string
static QString statusToString(int status);
@@ -188,10 +198,7 @@ namespace BlackCore
protected:
//! Default constructor
ISimulator(QObject *parent = nullptr) :
QObject(parent),
BlackMisc::CIdentifiable(this)
{}
ISimulator(QObject *parent = nullptr);
//! Are we connected to the simulator?
virtual bool isConnected() const = 0;