1 /***************************************************************************
2  *   Copyright (C) 2004-2017 by Thomas Fischer <fischer@unix-ag.uni-kl.de> *
3  *                                                                         *
4  *   This program is free software; you can redistribute it and/or modify  *
5  *   it under the terms of the GNU General Public License as published by  *
6  *   the Free Software Foundation; either version 2 of the License, or     *
7  *   (at your option) any later version.                                   *
8  *                                                                         *
9  *   This program is distributed in the hope that it will be useful,       *
10  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
11  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
12  *   GNU General Public License for more details.                          *
13  *                                                                         *
14  *   You should have received a copy of the GNU General Public License     *
15  *   along with this program; if not, see <https://www.gnu.org/licenses/>. *
16  ***************************************************************************/
17 
18 #ifndef KBIBTEX_PART_PARTFACTORY_H
19 #define KBIBTEX_PART_PARTFACTORY_H
20 
21 #include <KPluginFactory>
22 
23 class KBibTeXPartFactory : public KPluginFactory
24 {
25     Q_OBJECT
26     Q_PLUGIN_METADATA(IID KPluginFactory_iid FILE "kbibtexpart.json")
27     Q_INTERFACES(KPluginFactory)
28 
29 public:
30     KBibTeXPartFactory();
31     ~KBibTeXPartFactory() override;
32 
33 protected:
34 
35     /**
36      * From KPluginFactory's documentation: "You may reimplement it to
37      * provide a very flexible factory. This is especially useful to
38      * provide generic factories for plugins implemeted using a scripting
39      * language."
40      */
41     QObject *create(const char *iface, QWidget *parentWidget, QObject *parent, const QVariantList &args, const QString &keyword) override;
42 
43 private:
44     class Private;
45     Private *const d;
46 };
47 
48 #endif // KBIBTEX_PART_PARTFACTORY_H
49