File indexing completed on 2024-05-19 05:01:22

0001 /*
0002     This file is part of the KDE project.
0003 
0004     SPDX-FileCopyrightText: 2008 Laurent Montel <montel@kde.org>
0005 
0006     SPDX-License-Identifier: LGPL-2.1-or-later
0007 */
0008 
0009 #ifndef WEBENGINEPARTFACTORY
0010 #define WEBENGINEPARTFACTORY
0011 
0012 #include <KPluginFactory>
0013 
0014 #include <QHash>
0015 
0016 class QWidget;
0017 
0018 class WebEngineFactory : public KPluginFactory
0019 {
0020     Q_OBJECT
0021     Q_PLUGIN_METADATA(IID KPluginFactory_iid FILE "webenginepart.json")
0022     Q_INTERFACES(KPluginFactory)
0023 public:
0024     ~WebEngineFactory() override;
0025 #if QT_VERSION_MAJOR < 6
0026     QObject *create(const char* iface, QWidget *parentWidget, QObject *parent, const QVariantList& args, const QString &keyword) override;
0027 #else
0028     QObject *create(const char* iface, QWidget *parentWidget, QObject *parent, const QVariantList& args) override;
0029 #endif
0030 
0031 private Q_SLOTS:
0032     void slotDestroyed(QObject* object);
0033     void slotSaveHistory(QObject* widget, const QByteArray&);
0034 
0035 private:
0036     QHash<QObject*, QByteArray> m_historyBufContainer;
0037 };
0038 
0039 #endif // WEBENGINEPARTFACTORY