21 #ifndef PLUGINMANAGER_H 22 #define PLUGINMANAGER_H 25 #include <QStringList> 27 #include <tulip/tulipconf.h> 35 struct TLP_QT_SCOPE PluginVersionInformation {
38 QString libraryLocation;
45 QStringList dependencies;
47 PluginVersionInformation();
48 PluginVersionInformation(
const PluginVersionInformation ©);
49 PluginVersionInformation &operator=(
const PluginVersionInformation &) =
default;
52 struct TLP_QT_SCOPE PluginInformation {
55 PluginVersionInformation installedVersion;
56 PluginVersionInformation availableVersion;
59 PluginInformation(
const PluginInformation ©);
60 PluginInformation &operator=(
const PluginInformation &) =
default;
65 class TLP_QT_SCOPE PluginManager {
66 static QStringList _markedForInstallation;
69 enum PluginLocation { Remote = 0x01, Local = 0x02 };
70 Q_DECLARE_FLAGS(PluginLocations, PluginLocation)
72 static const QString STABLE_LOCATION;
73 static const QString TESTING_LOCATION;
75 typedef QList<PluginVersionInformation> PluginVersionInformationList;
77 typedef QList<PluginInformation> PluginInformationList;
79 static void addRemoteLocation(
const QString &location);
80 static void removeRemoteLocation(
const QString &location);
81 static QStringList remoteLocations();
83 static PluginInformationList listPlugins(PluginLocations locations,
84 const QString &nameFilter = QString(),
85 const QString &categoryFilter = QString());
87 static void markForRemoval(
const QString &plugin);
88 static void markForInstallation(
const QString &plugin, QObject *recv,
const char *progressSlot);
90 static QStringList markedForInstallation();
91 static QStringList markedForRemoval();
92 static void unmarkForRemoval(
const QString &file);
95 Q_DECLARE_OPERATORS_FOR_FLAGS(PluginManager::PluginLocations)
98 #endif // PLUGINMANAGER_H
Top-level interface for plug-ins.