Commit 0d4173cb authored by Laurent Montel's avatar Laurent Montel 😁

Return configure widget

parent 40a29266
......@@ -68,3 +68,8 @@ QList<QAction *> NetworkAccessManagerWebEngine::actions() const
}
return actions;
}
QList<MessageViewer::NetworkPluginUrlInterceptorConfigureWidget *> NetworkAccessManagerWebEngine::configureInterceptorList(QWidget *parent) const
{
return d->mManager->configureInterceptorList(parent);
}
......@@ -27,6 +27,7 @@ namespace MessageViewer
{
class NetworkPluginUrlInterceptorInterface;
class NetworkAccessManagerWebEnginePrivate;
class NetworkPluginUrlInterceptorConfigureWidget;
class MESSAGEVIEWER_EXPORT NetworkAccessManagerWebEngine : public QNetworkAccessManager
{
Q_OBJECT
......@@ -35,6 +36,7 @@ public:
~NetworkAccessManagerWebEngine();
void addInterceptor(MessageViewer::NetworkPluginUrlInterceptorInterface *interceptor);
QList<QAction *> actions() const;
QList<MessageViewer::NetworkPluginUrlInterceptorConfigureWidget *> configureInterceptorList(QWidget *parent = Q_NULLPTR) const;
private:
NetworkAccessManagerWebEnginePrivate *const d;
};
......
......@@ -31,6 +31,7 @@ public:
}
QList<QAction *> actions() const;
QList<NetworkPluginUrlInterceptorConfigureWidget *> configureInterceptorList(QWidget *parent) const;
void createInterfaces(QWebEngineView *webEngine, KActionCollection *ac);
QVector<MessageViewer::NetworkPluginUrlInterceptorInterface *> mListInterface;
QList<QAction *> mActionList;
......@@ -42,6 +43,17 @@ QList<QAction *> NetworkUrlInterceptorManagerPrivate::actions() const
return mActionList;
}
QList<NetworkPluginUrlInterceptorConfigureWidget *> NetworkUrlInterceptorManagerPrivate::configureInterceptorList(QWidget *parent) const
{
QList<NetworkPluginUrlInterceptorConfigureWidget *> lstConfigureWidget;
Q_FOREACH (NetworkPluginUrlInterceptor *plugin, NetworkUrlInterceptorPluginManager::self()->pluginsList()) {
if (plugin->hasConfigureSupport()) {
lstConfigureWidget.append(plugin->createConfigureWidget(parent));
}
}
return lstConfigureWidget;
}
void NetworkUrlInterceptorManagerPrivate::createInterfaces(QWebEngineView *webEngine, KActionCollection *ac)
{
Q_FOREACH (NetworkPluginUrlInterceptor *plugin, NetworkUrlInterceptorPluginManager::self()->pluginsList()) {
......@@ -74,3 +86,8 @@ QList<QAction *> NetworkUrlInterceptorManager::actions() const
return d->actions();
}
QList<NetworkPluginUrlInterceptorConfigureWidget *> NetworkUrlInterceptorManager::configureInterceptorList(QWidget *parent) const
{
return d->configureInterceptorList(parent);
}
......@@ -34,6 +34,7 @@ public:
QVector<NetworkPluginUrlInterceptorInterface *> interfaceList() const;
QList<QAction *> actions() const;
QList<MessageViewer::NetworkPluginUrlInterceptorConfigureWidget *> configureInterceptorList(QWidget *parent) const;
private:
NetworkUrlInterceptorManagerPrivate *const d;
};
......
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