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: // interface:
@ -38,7 +45,7 @@ PLUGIN_STATE ATBVMCPlugin::initVMCPlugin(QObject *appControl,
QObject *atbSystem, QObject *atbSystem,
QObject *hmiConfig, QObject *hmiConfig,
QSettings const &settings) { QSettings const &settings) {
if (appControl && atbSystem && hmiConfig) {
m_vmc = new VMC(appControl, &settings); m_vmc = new VMC(appControl, &settings);
// -------------------- connect vmc -------------------------------------------- // -------------------- connect vmc --------------------------------------------
@ -58,25 +65,26 @@ PLUGIN_STATE ATBVMCPlugin::initVMCPlugin(QObject *appControl,
connect(m_vmc, SIGNAL(setDefaultLanguage(quint8)), hmiConfig, SLOT(setDefaultLanguage(quint8)), Qt::QueuedConnection); connect(m_vmc, SIGNAL(setDefaultLanguage(quint8)), hmiConfig, SLOT(setDefaultLanguage(quint8)), Qt::QueuedConnection);
return PLUGIN_STATE::INITIALIZED; return PLUGIN_STATE::INITIALIZED;
}
return PLUGIN_STATE::NOT_INITIALIZED;
} }
// mandantory ATBAPP plugin methods: ------------------------------------------ // mandantory ATBAPP plugin methods: ------------------------------------------
PLUGIN_STATE ATBVMCPlugin::getState() { PLUGIN_STATE ATBVMCPlugin::getState() {
return PLUGIN_STATE::NOT_INITIALIZED; return m_pluginState;
} }
QString ATBVMCPlugin::getLastError() { QString ATBVMCPlugin::getLastError() {
return ""; return m_errorCode;
} }
QString ATBVMCPlugin::getLastErrorDescription() { QString ATBVMCPlugin::getLastErrorDescription() {
return ""; return m_errorDescription;
} }
QString const &ATBVMCPlugin::getPluginInfo() {
static QString info; #if 0
return info;
}
// helpers e.g. for debug / log // helpers e.g. for debug / log
QString ATBVMCPlugin::getString(RESULT_STATE /*resultState*/) { QString ATBVMCPlugin::getString(RESULT_STATE /*resultState*/) {
@ -114,3 +122,9 @@ void ATBVMCPlugin::reboot() {
void ATBVMCPlugin::reset() { void ATBVMCPlugin::reset() {
} }
#endif
#if QT_VERSION < 0x050000
Q_EXPORT_PLUGIN2(ATBVMCPlugin, ATBVMCPlugin)
#endif