30 #ifndef EXTENSIONSYSTEM_PLUGINMANAGER_H
31 #define EXTENSIONSYSTEM_PLUGINMANAGER_H
36 #include <QtCore/QObject>
37 #include <QtCore/QStringList>
38 #include <QtCore/QReadWriteLock>
44 namespace ExtensionSystem {
47 class PluginManagerPrivate;
60 bool allPluginsLoaded(){
return m_allPluginsLoaded;}
65 void addObject(QObject *obj);
66 void removeObject(QObject *obj);
68 template <
typename T>
QList<T *> getObjects()
const
70 QReadLocker lock(&m_lock);
74 foreach (QObject *obj, all) {
75 result = Aggregation::query_all<T>(obj);
76 if (!result.isEmpty())
81 template <
typename T> T *getObject()
const
83 QReadLocker lock(&m_lock);
86 foreach (QObject *obj, all) {
87 if ((result = Aggregation::query<T>(obj)) !=
nullptr)
95 QStringList pluginPaths()
const;
96 void setPluginPaths(
const QStringList &paths);
98 void setFileExtension(
const QString &extension);
99 QString fileExtension()
const;
102 QStringList arguments()
const;
103 QStringList parseOptions(QStringList pluginOptions, QStringList pluginTests, QStringList pluginNoLoad);
104 void formatPluginOptions(QTextStream &str,
int optionIndentation,
int descriptionIndentation)
const;
105 void formatPluginVersions(QTextStream &str)
const;
107 bool runningTests()
const;
108 QString testDataDirectory()
const;
111 void objectAdded(QObject *obj);
112 void aboutToRemoveObject(QObject *obj);
114 void pluginsChanged();
115 void pluginsLoadEnded();
116 void splashMessages(QString);
126 mutable QReadWriteLock m_lock;
127 bool m_allPluginsLoaded;
134 #endif // EXTENSIONSYSTEM_PLUGINMANAGER_H
Core plugin system that manages the plugins, their life cycle and their registered objects...
end function found on Matlab s file exchange The two functions return identical results