summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2016-04-05 13:41:29 +0200
committerMontel Laurent <[email protected]>2016-04-05 13:58:02 +0200
commite5d0757a882fe83221f76ee66883a3c632d8cc29 (patch)
tree59825c4c9f35342a82a2f6d3b6621c27fbda539a
parenteb20ea639d3905bee10c33f22c639ea9184cf449 (diff)
Create list of configure widget
-rw-r--r--akregator/configuration/CMakeLists.txt1
-rw-r--r--akregator/configuration/akregator_config_webengineurlinterceptor.cpp13
-rw-r--r--akregator/configuration/akregator_config_webengineurlinterceptor.h6
3 files changed, 20 insertions, 0 deletions
diff --git a/akregator/configuration/CMakeLists.txt b/akregator/configuration/CMakeLists.txt
index 61359f8..5666c64 100644
--- a/akregator/configuration/CMakeLists.txt
+++ b/akregator/configuration/CMakeLists.txt
@@ -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)
diff --git a/akregator/configuration/akregator_config_webengineurlinterceptor.cpp b/akregator/configuration/akregator_config_webengineurlinterceptor.cpp
index fcd5387..fad29a5 100644
--- a/akregator/configuration/akregator_config_webengineurlinterceptor.cpp
+++ b/akregator/configuration/akregator_config_webengineurlinterceptor.cpp
@@ -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("[email protected]"));
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);
diff --git a/akregator/configuration/akregator_config_webengineurlinterceptor.h b/akregator/configuration/akregator_config_webengineurlinterceptor.h
index fb68547..e3fb508 100644
--- a/akregator/configuration/akregator_config_webengineurlinterceptor.h
+++ b/akregator/configuration/akregator_config_webengineurlinterceptor.h
@@ -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;
};
}