12 #ifndef CXPLUGINFRAMEWORK_H_ 13 #define CXPLUGINFRAMEWORK_H_ 15 #include "cxLogicManagerExport.h" 19 #include <boost/shared_ptr.hpp> 21 #include "ctkPlugin.h" 22 #include "ctkPluginFramework_global.h" 27 class ctkPluginFramework;
28 class ctkPluginFrameworkFactory;
48 ctkPlugin::State targetState;
58 void install(
const QString& symbolicName);
59 void uninstall(
const QString& symbolicName);
60 bool start(
const QString& symbolicName, ctkPlugin::StartOptions options = ctkPlugin::START_ACTIVATION_POLICY);
61 bool stop(
const QString& symbolicName, ctkPlugin::StopOptions options = 0);
65 ctkPluginContext* getPluginContext();
66 QSharedPointer<ctkPluginFramework> getPluginFramework();
69 void setSearchPaths(
const QStringList& searchPath);
70 QStringList getSearchPaths()
const;
71 QStringList getPluginSymbolicNames();
72 QSharedPointer<ctkPlugin> getInstalledPluginFromSymbolicName(QString symbolicName);
73 ctkPlugin::State getStateFromSymbolicName(QString name);
77 void pluginPoolChanged();
81 QString getPluginPath(
const QString& symbolicName);
82 QStringList getPluginSymbolicNames(
const QString& searchPath);
83 bool nameIsProbablyPlugin(QString name)
const;
84 std::vector<PluginFrameworkManager::PluginLoadInfo> getPluginLoadInfo(QStringList symbolicNames);
86 QScopedPointer<ctkPluginFrameworkFactory> mFrameworkFactory;
87 QSharedPointer<ctkPluginFramework> mFramework;
89 void initializeFramework();
90 void startFramework();
92 bool frameworkInitialized()
const;
93 bool frameworkStarted()
const;
96 void loadPluginFromStoredState(QString symbolicName, QString storedState);
98 QString convertToRelativePath(QString path)
const;
99 QString convertToAbsolutePath(QString path)
const;
101 QStringList mPluginSearchPaths;
102 QStringList mPluginLibFilter;
104 QString mSettingsSearchPaths;
105 QString mSettingsBase;
107 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.