![]() |
Tulip
4.6.0
Better Visualization Through Research
|
00001 /* 00002 * 00003 * This file is part of Tulip (www.tulip-software.org) 00004 * 00005 * Authors: David Auber and the Tulip development Team 00006 * from LaBRI, University of Bordeaux 00007 * 00008 * Tulip is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License 00010 * as published by the Free Software Foundation, either version 3 00011 * of the License, or (at your option) any later version. 00012 * 00013 * Tulip is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00016 * See the GNU General Public License for more details. 00017 * 00018 */ 00019 ///@cond DOXYGEN_HIDDEN 00020 00021 #ifndef PLUGINMANAGER_H 00022 #define PLUGINMANAGER_H 00023 00024 #include <QStringList> 00025 00026 #include <tulip/tulipconf.h> 00027 00028 class QNetworkReply; 00029 00030 namespace tlp { 00031 00032 class Plugin; 00033 00034 struct TLP_QT_SCOPE PluginVersionInformation { 00035 bool isValid; 00036 00037 QString libraryLocation; 00038 QString author; 00039 QString version; 00040 QString icon; 00041 QString description; 00042 QString date; 00043 00044 QStringList dependencies; 00045 00046 PluginVersionInformation(); 00047 PluginVersionInformation(const PluginVersionInformation& copy); 00048 }; 00049 00050 // deprecated name 00051 _DEPRECATED_TYPEDEF(PluginVersionInformation, PluginVersionInformations); 00052 00053 struct TLP_QT_SCOPE PluginInformation { 00054 QString name; 00055 QString category; 00056 PluginVersionInformation installedVersion; 00057 PluginVersionInformation availableVersion; 00058 00059 PluginInformation(); 00060 PluginInformation(const PluginInformation& copy); 00061 00062 void fillLocalInfos(const tlp::Plugin& info); 00063 }; 00064 00065 // deprecated name 00066 _DEPRECATED_TYPEDEF(PluginInformation, PluginInformations); 00067 00068 class TLP_QT_SCOPE PluginManager { 00069 static QStringList _markedForInstallation; 00070 00071 public: 00072 enum PluginLocation { 00073 Remote = 0x01, 00074 Local = 0x02 00075 }; 00076 Q_DECLARE_FLAGS(PluginLocations, PluginLocation) 00077 00078 static const QString STABLE_LOCATION; 00079 static const QString TESTING_LOCATION; 00080 00081 typedef QList<PluginVersionInformation> PluginVersionInformationList; 00082 _DEPRECATED_TYPEDEF(QList<PluginVersionInformation>, PluginVersionInformationsList); 00083 00084 typedef QList<PluginInformation> PluginInformationList; 00085 _DEPRECATED_TYPEDEF(QList<PluginInformation>, PluginInformationsList); 00086 00087 static void addRemoteLocation(const QString& location); 00088 static void removeRemoteLocation(const QString& location); 00089 static QStringList remoteLocations(); 00090 00091 static PluginInformationList listPlugins(PluginLocations locations,const QString& nameFilter = QString(),const QString& categoryFilter = QString()); 00092 00093 static void markForRemoval(const QString& plugin); 00094 static void markForInstallation(const QString& plugin, QObject *recv, const char* progressSlot); 00095 00096 static QStringList markedForInstallation(); 00097 static QStringList markedForRemoval(); 00098 static void unmarkForRemoval(const QString& file); 00099 }; 00100 00101 Q_DECLARE_OPERATORS_FOR_FLAGS(PluginManager::PluginLocations) 00102 } 00103 00104 #endif //PLUGINMANAGER_H 00105 ///@endcond