1 /* This file is part of the KDE project 2 Copyright (C) 2010 by Adam Pigg (adam@piggz.co.uk) 3 Copyright (C) 2015 Jarosław Staniek <staniek@kde.org> 4 5 This library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Library General Public 7 License as published by the Free Software Foundation; either 8 version 2.1 of the License, or (at your option) any later version. 9 10 This library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Library General Public License for more details. 14 15 You should have received a copy of the GNU Library General Public License 16 along with this library; see the file COPYING.LIB. If not, write to 17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 Boston, MA 02110-1301, USA. 19 */ 20 21 #ifndef KREPORTPLUGINMANAGER_H 22 #define KREPORTPLUGINMANAGER_H 23 24 #include "config-kreport.h" 25 #include "kreport_export.h" 26 27 #include <QList> 28 #include <QObject> 29 30 class KReportPluginMetaData; 31 class KReportPluginInterface; 32 33 class QStringList; 34 class QAction; 35 class QString; 36 37 /*! 38 * @brief Manager class for finding and loading available plugins 39 */ 40 class KREPORT_EXPORT KReportPluginManager : public QObject 41 { 42 Q_OBJECT 43 public: 44 static KReportPluginManager* self(); 45 46 QStringList pluginIds() const; 47 48 const KReportPluginMetaData *pluginMetaData(const QString& id) const; 49 50 KReportPluginInterface* plugin(const QString& id) const; 51 52 QList<QAction*> createActions(QObject *parent) Q_REQUIRED_RESULT; 53 54 private: 55 // class for access to the constructor 56 friend class KReportPluginManagerSingleton; 57 58 KReportPluginManager(); 59 60 ~KReportPluginManager() override; 61 62 Q_DISABLE_COPY(KReportPluginManager) 63 class Private; 64 Private *const d; 65 }; 66 67 #endif // KREPORTPLUGINMANAGER_H 68