File indexing completed on 2024-04-21 04:41:50
0001 /* This file is part of the KDE project 0002 Copyright (C) 2010 by Adam Pigg (adam@piggz.co.uk) 0003 Copyright (C) 2015 Jarosław Staniek <staniek@kde.org> 0004 0005 This library is free software; you can redistribute it and/or 0006 modify it under the terms of the GNU Library General Public 0007 License as published by the Free Software Foundation; either 0008 version 2.1 of the License, or (at your option) any later version. 0009 0010 This library is distributed in the hope that it will be useful, 0011 but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0013 Library General Public License for more details. 0014 0015 You should have received a copy of the GNU Library General Public License 0016 along with this library; see the file COPYING.LIB. If not, write to 0017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0018 Boston, MA 02110-1301, USA. 0019 */ 0020 0021 #ifndef KREPORTPLUGINMANAGER_H 0022 #define KREPORTPLUGINMANAGER_H 0023 0024 #include "config-kreport.h" 0025 #include "kreport_export.h" 0026 0027 #include <QList> 0028 #include <QObject> 0029 0030 class KReportPluginMetaData; 0031 class KReportPluginInterface; 0032 0033 class QStringList; 0034 class QAction; 0035 class QString; 0036 0037 /*! 0038 * @brief Manager class for finding and loading available plugins 0039 */ 0040 class KREPORT_EXPORT KReportPluginManager : public QObject 0041 { 0042 Q_OBJECT 0043 public: 0044 static KReportPluginManager* self(); 0045 0046 QStringList pluginIds() const; 0047 0048 const KReportPluginMetaData *pluginMetaData(const QString& id) const; 0049 0050 KReportPluginInterface* plugin(const QString& id) const; 0051 0052 Q_REQUIRED_RESULT QList<QAction*> createActions(QObject *parent); 0053 0054 private: 0055 // class for access to the constructor 0056 friend class KReportPluginManagerSingleton; 0057 0058 KReportPluginManager(); 0059 0060 ~KReportPluginManager() override; 0061 0062 Q_DISABLE_COPY(KReportPluginManager) 0063 class Private; 0064 Private *const d; 0065 }; 0066 0067 #endif // KREPORTPLUGINMANAGER_H