implement setPluginInfo()

This commit is contained in:
Gerhard Hoffmann 2023-11-14 14:54:58 +01:00
parent 1c2ac9f4da
commit 35f3c5f0a1

View File

@ -31,6 +31,13 @@ ATBVMCPlugin::~ATBVMCPlugin() {
}
}
QString const &ATBVMCPlugin::getPluginInfo() {
return m_pluginInfo;
}
void ATBVMCPlugin::setPluginInfo(QString const &info) {
m_pluginInfo = info;
}
// ----------------------------------------------------------------------------
// interface:
@ -38,7 +45,7 @@ PLUGIN_STATE ATBVMCPlugin::initVMCPlugin(QObject *appControl,
QObject *atbSystem,
QObject *hmiConfig,
QSettings const &settings) {
if (appControl && atbSystem && hmiConfig) {
m_vmc = new VMC(appControl, &settings);
// -------------------- connect vmc --------------------------------------------
@ -60,23 +67,24 @@ PLUGIN_STATE ATBVMCPlugin::initVMCPlugin(QObject *appControl,
return PLUGIN_STATE::INITIALIZED;
}
// mandantory ATBAPP plugin methods: ------------------------------------------
PLUGIN_STATE ATBVMCPlugin::getState() {
return PLUGIN_STATE::NOT_INITIALIZED;
}
// mandantory ATBAPP plugin methods: ------------------------------------------
PLUGIN_STATE ATBVMCPlugin::getState() {
return m_pluginState;
}
QString ATBVMCPlugin::getLastError() {
return "";
return m_errorCode;
}
QString ATBVMCPlugin::getLastErrorDescription() {
return "";
return m_errorDescription;
}
QString const &ATBVMCPlugin::getPluginInfo() {
static QString info;
return info;
}
#if 0
// helpers e.g. for debug / log
QString ATBVMCPlugin::getString(RESULT_STATE /*resultState*/) {
@ -114,3 +122,9 @@ void ATBVMCPlugin::reboot() {
void ATBVMCPlugin::reset() {
}
#endif
#if QT_VERSION < 0x050000
Q_EXPORT_PLUGIN2(ATBVMCPlugin, ATBVMCPlugin)
#endif