Qmmp
general.h
1 /***************************************************************************
2  * Copyright (C) 2008-2019 by Ilya Kotov *
3  * forkotov02@ya.ru *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program 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 *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19  ***************************************************************************/
20 #ifndef GENERAL_H
21 #define GENERAL_H
22 
23 #include <QObject>
24 #include <QStringList>
25 #include <QHash>
26 #include "generalfactory.h"
27 #include "qmmpui_export.h"
28 
29 class QmmpUiPluginCache;
30 
34 class QMMPUI_EXPORT General
35 {
36 public:
41  static void create(QObject *parent);
45  static QList<GeneralFactory *> factories();
49  static QList<GeneralFactory *> enabledFactories();
54  static QString file(GeneralFactory *factory);
60  static void setEnabled(GeneralFactory* factory, bool enable = true);
66  static void showSettings(GeneralFactory* factory, QWidget* parentWidget);
71  static bool isEnabled(GeneralFactory* factory);
72 
73 private:
74  static void loadPlugins();
75  static QHash <GeneralFactory*, QObject*> *m_generals;
76  static QObject *m_parent;
77  static QList<QmmpUiPluginCache*> *m_cache;
78  static QStringList m_enabledNames;
79 };
80 
81 #endif
The General class provides simple access to general plugins.
Definition: general.h:34
General plugin interface.
Definition: generalfactory.h:56