Commit e5d0757a authored by Laurent Montel's avatar Laurent Montel 😁

Create list of configure widget

parent eb20ea63
......@@ -133,6 +133,7 @@ else()
KF5::KCMUtils
KF5::I18n
KF5::IconThemes
KF5::MessageViewer
)
kcoreaddons_desktop_to_json(akregator_config_webengineurlinterceptor akregator_config_webengineurlinterceptor.desktop DEFAULT_SERVICE_TYPE)
......
......@@ -22,6 +22,10 @@
#include <KLocalizedString>
#include <QVBoxLayout>
#include <QTabWidget>
#include <MessageViewer/NetworkPluginUrlInterceptor>
#include <MessageViewer/NetworkUrlInterceptorPluginManager>
using namespace Akregator;
......@@ -41,7 +45,16 @@ KCMAkregatorWebEngineUrlInterceptorConfig::KCMAkregatorWebEngineUrlInterceptorCo
about->addAuthor(i18n("Laurent Montel"), QString(), QStringLiteral("montel@kde.org"));
setAboutData(about);
QTabWidget *tab = new QTabWidget(this);
lay->addWidget(tab);
//TODO add tab
Q_FOREACH(MessageViewer::NetworkPluginUrlInterceptor *plugin, MessageViewer::NetworkUrlInterceptorPluginManager::self()->pluginsList()) {
if (plugin->hasConfigureSupport()) {
MessageViewer::NetworkPluginUrlInterceptorConfigureWidgetSetting settings = plugin->createConfigureWidget(this);
//TODO
}
}
#if 0
mWidget = new MessageViewer::AdBlockSettingWidget;
lay->addWidget(mWidget);
......
......@@ -21,6 +21,10 @@
#include <KCModule>
#include <QVariant>
namespace MessageViewer
{
class NetworkPluginUrlInterceptorConfigureWidget;
}
namespace Akregator
{
class KCMAkregatorWebEngineUrlInterceptorConfig : public KCModule
......@@ -31,6 +35,8 @@ public:
void load() Q_DECL_OVERRIDE;
void save() Q_DECL_OVERRIDE;
void defaults() Q_DECL_OVERRIDE;
private:
QList<MessageViewer::NetworkPluginUrlInterceptorConfigureWidget *> mListPlugins;
};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment