diff --git a/plugins/datalogger/src/dataloggerplugin.cpp b/plugins/datalogger/src/dataloggerplugin.cpp index d32e1df8c7..9a61325763 100644 --- a/plugins/datalogger/src/dataloggerplugin.cpp +++ b/plugins/datalogger/src/dataloggerplugin.cpp @@ -39,36 +39,7 @@ bool DataLoggerPlugin::compatible(QString m_param, QString category) return true; } -bool DataLoggerPlugin::loadPage() -{ - // Here you must write the code for the plugin info page - // Below is an example for an iio device - /*m_page = new QWidget(); - m_page->setLayout(new QVBoxLayout(m_page)); - m_page->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - m_infoPage = new InfoPage(m_page); - m_infoPage->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); - m_page->layout()->addWidget(m_infoPage); - m_page->layout()->addItem(new QSpacerItem(0, 0, QSizePolicy::Preferred, QSizePolicy::Expanding)); - - auto cp = ContextProvider::GetInstance(); - struct iio_context *context = cp->open(m_param); - ssize_t attributeCount = iio_context_get_attrs_count(context); - for(int i = 0; i < attributeCount; ++i) { - const char *name; - const char *value; - int ret = iio_context_get_attr(context, i, &name, &value); - if(ret < 0) { - qWarning(CAT_DATALOGGERLUGIN) << "Could not read attribute with index:" << i; - continue; - } - - m_infoPage->update(name, value); - } - cp->close(m_param); - m_page->ensurePolished();*/ - return true; -} +bool DataLoggerPlugin::loadPage() { return false; } bool DataLoggerPlugin::loadIcon() { diff --git a/plugins/iiodebug/src/iiodebugplugin.cpp b/plugins/iiodebug/src/iiodebugplugin.cpp index 828f238bcd..ba55a0d593 100644 --- a/plugins/iiodebug/src/iiodebugplugin.cpp +++ b/plugins/iiodebug/src/iiodebugplugin.cpp @@ -22,36 +22,7 @@ bool IIODebugPlugin::compatible(QString m_param, QString category) return ret; } -bool IIODebugPlugin::loadPage() -{ - // Here you must write the code for the plugin info page - // Below is an example for an iio device - /*m_page = new QWidget(); - m_page->setLayout(new QVBoxLayout(m_page)); - m_page->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - m_infoPage = new InfoPage(m_page); - m_infoPage->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); - m_page->layout()->addWidget(m_infoPage); - m_page->layout()->addItem(new QSpacerItem(0, 0, QSizePolicy::Preferred, QSizePolicy::Expanding)); - - auto cp = ContextProvider::GetInstance(); - struct iio_context *context = cp->open(m_param); - ssize_t attributeCount = iio_context_get_attrs_count(context); - for(int i = 0; i < attributeCount; ++i) { - const char *name; - const char *value; - int ret = iio_context_get_attr(context, i, &name, &value); - if(ret < 0) { - qWarning(CAT_IIODEBUGPLUGIN) << "Could not read attribute with index:" << i; - continue; - } - - m_infoPage->update(name, value); - } - cp->close(m_param); - m_page->ensurePolished();*/ - return true; -} +bool IIODebugPlugin::loadPage() { return false; } bool IIODebugPlugin::loadIcon() { diff --git a/tools/plugingenerator/templates/plugin_src_template.mako b/tools/plugingenerator/templates/plugin_src_template.mako index 12bbbe9cc8..ea92b501a8 100644 --- a/tools/plugingenerator/templates/plugin_src_template.mako +++ b/tools/plugingenerator/templates/plugin_src_template.mako @@ -52,8 +52,10 @@ bool ${config['class_name']}::loadPage() m_infoPage->update(name, value); } cp->close(m_param); - m_page->ensurePolished();*/ + m_page->ensurePolished(); return true; + */ + return false; } bool ${config['class_name']}::loadIcon() @@ -129,4 +131,4 @@ void ${config['class_name']}::initMetadata() } % endif % endif -% endif \ No newline at end of file +% endif