19 #include "internal/berryBundleUtility.h"
20 #include "internal/berryWorkbenchPlugin.h"
32 const QString AbstractUICTKPlugin::FN_DIALOG_SETTINGS =
"dialog_settings.xml";
35 : preferencesService(nullptr)
59 if (preferencesService ==
nullptr)
68 return preferencesService;
256 const QString& pluginId,
const QString& imageFilePath)
258 if (pluginId.isEmpty() || imageFilePath.isEmpty())
260 throw ctkInvalidArgumentException(
"argument cannot be empty");
265 if (!BundleUtility::IsReady(plugin.data()))
270 QByteArray imgContent = plugin->getResource(imageFilePath);
271 QImage image = QImage::fromData(imgContent);
272 QPixmap pixmap = QPixmap::fromImage(image);
273 return QIcon(pixmap);
278 return QIcon(
":/org.blueberry.ui.qt/icon_missing.png");
static QIcon GetMissingIcon()
void stop(ctkPluginContext *context) override
void start(ctkPluginContext *context) override
virtual SmartPointer< IPreferences > GetSystemPreferences()=0
Implements transparent reference counting.
void start(ctkPluginContext *context) override
void stop(ctkPluginContext *context) override
IWorkbench * GetWorkbench()
IPreferencesService * GetPreferencesService() const
ctkPluginContext * m_Context
SmartPointer< IPreferences > GetPreferences() const
static QIcon ImageDescriptorFromPlugin(const QString &pluginId, const QString &imageFilePath)
berry::SmartPointer< Self > Pointer