33 #ifndef CXPLUGINFRAMEWORK_H_ 34 #define CXPLUGINFRAMEWORK_H_ 36 #include "cxLogicManagerExport.h" 40 #include <boost/shared_ptr.hpp> 42 #include "ctkPlugin.h" 43 #include "ctkPluginFramework_global.h" 48 class ctkPluginFramework;
49 class ctkPluginFrameworkFactory;
69 ctkPlugin::State targetState;
79 void install(
const QString& symbolicName);
80 void uninstall(
const QString& symbolicName);
81 bool start(
const QString& symbolicName, ctkPlugin::StartOptions options = ctkPlugin::START_ACTIVATION_POLICY);
82 bool stop(
const QString& symbolicName, ctkPlugin::StopOptions options = 0);
86 ctkPluginContext* getPluginContext();
87 QSharedPointer<ctkPluginFramework> getPluginFramework();
90 void setSearchPaths(
const QStringList& searchPath);
91 QStringList getSearchPaths()
const;
92 QStringList getPluginSymbolicNames();
93 QSharedPointer<ctkPlugin> getInstalledPluginFromSymbolicName(QString symbolicName);
94 ctkPlugin::State getStateFromSymbolicName(QString name);
98 void pluginPoolChanged();
102 QString getPluginPath(
const QString& symbolicName);
103 QStringList getPluginSymbolicNames(
const QString& searchPath);
104 bool nameIsProbablyPlugin(QString name)
const;
105 std::vector<PluginFrameworkManager::PluginLoadInfo> getPluginLoadInfo(QStringList symbolicNames);
107 QScopedPointer<ctkPluginFrameworkFactory> mFrameworkFactory;
108 QSharedPointer<ctkPluginFramework> mFramework;
110 void initializeFramework();
111 void startFramework();
113 bool frameworkInitialized()
const;
114 bool frameworkStarted()
const;
117 void loadPluginFromStoredState(QString symbolicName, QString storedState);
119 QString convertToRelativePath(QString path)
const;
120 QString convertToAbsolutePath(QString path)
const;
122 QStringList mPluginSearchPaths;
123 QStringList mPluginLibFilter;
125 QString mSettingsSearchPaths;
126 QString mSettingsBase;
128 void handlePluginException(
const QString& message,
const ctkException &exc);
QSharedPointer< ctkPlugin > ctkPluginPtr
std::pair< QString, ctkPluginPtr > PluginData
boost::shared_ptr< class PluginFrameworkManager > PluginFrameworkManagerPtr
static PluginFrameworkManagerPtr create()
Namespace for all CustusX production code.