Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <berryAbstractUICTKPlugin.h>
Public Member Functions | |
AbstractUICTKPlugin () | |
IPreferencesService * | GetPreferencesService () const |
SmartPointer< IPreferences > | GetPreferences () const |
IWorkbench * | GetWorkbench () |
void | start (ctkPluginContext *context) override |
void | stop (ctkPluginContext *context) override |
Public Member Functions inherited from berry::Plugin | |
Plugin () | |
void | start (ctkPluginContext *context) override |
void | stop (ctkPluginContext *context) override |
QSharedPointer< ctkPlugin > | GetPlugin () const |
ILog * | GetLog () const |
QString | GetStateLocation () const |
Static Public Member Functions | |
static QIcon | ImageDescriptorFromPlugin (const QString &pluginId, const QString &imageFilePath) |
static QIcon | GetMissingIcon () |
Additional Inherited Members | |
Protected Attributes inherited from berry::Plugin | |
ctkPluginContext * | m_Context |
Abstract base class for plug-ins that integrate with the BlueBerry platform UI.
Subclasses obtain the following capabilities:
Preferences
org.blueberry.core.runtime.Preferences
). This class provides appropriate conversion to the older JFace preference API (org.blueberry.jface.preference.IPreferenceStore
). getPreferenceStore
returns the JFace preference store (cf. Plugin.getPluginPreferences
which returns a core runtime preferences object. initializeDefaultPreferences
to set up any default values for preferences using JFace API. In this case, initializeDefaultPluginPreferences
should not be overridden. initializeDefaultPluginPreferences
to set up any default values for preferences using core runtime API. In this case, initializeDefaultPreferences
should not be overridden. Dialogs
getDialogSettings
is called. FN_DIALOG_STORE
. A dialog store file is first looked for in the plug-in's read/write state area; if not found there, the plug-in's install directory is checked. This allows a plug-in to ship with a read-only copy of a dialog store file containing initial values for certain settings. saveDialogSettings
to cause settings to be saved in the plug-in's read/write state area. A plug-in may opt to do this each time a wizard or dialog is closed to ensure the latest information is always safe on disk. For easy access to your plug-in object, use the singleton pattern. Declare a static variable in your plug-in class for the singleton. Store the first (and only) instance of the plug-in class in the singleton when it is created. Then access the singleton when needed through a static getDefault
method.
See the description on Plugin.
Definition at line 95 of file berryAbstractUICTKPlugin.h.
berry::AbstractUICTKPlugin::AbstractUICTKPlugin | ( | ) |
The bundle listener used for kicking off refreshPluginActions(). Creates an abstract UI plug-in runtime object.
Plug-in runtime classes are ctkPluginActivator
s and so must have an default constructor. This method is called by the runtime when the associated bundle is being activated.
Definition at line 34 of file berryAbstractUICTKPlugin.cpp.
|
static |
Definition at line 276 of file berryAbstractUICTKPlugin.cpp.
SmartPointer< IPreferences > berry::AbstractUICTKPlugin::GetPreferences | ( | ) | const |
Definition at line 71 of file berryAbstractUICTKPlugin.cpp.
References GetPreferencesService(), and berry::IPreferencesService::GetSystemPreferences().
IPreferencesService * berry::AbstractUICTKPlugin::GetPreferencesService | ( | ) | const |
Returns the dialog settings for this UI plug-in. The dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug-in in the context of a workbench.
If an error occurs reading the dialog store, an empty one is quietly created and returned.
Subclasses may override this method but are not expected to.
If an error occurs reading the preferences service, an empty preference service is quietly created, initialized with defaults, and returned.
Definition at line 56 of file berryAbstractUICTKPlugin.cpp.
References BERRY_ERROR, and berry::Plugin::m_Context.
Referenced by GetPreferences().
IWorkbench * berry::AbstractUICTKPlugin::GetWorkbench | ( | ) |
Returns the Platform UI workbench.
This method exists as a convenience for plugin implementors. The workbench can also be accessed by invoking PlatformUI.getWorkbench()
.
Definition at line 79 of file berryAbstractUICTKPlugin.cpp.
References berry::PlatformUI::GetWorkbench().
|
static |
Creates and returns a new image descriptor for an image file located within the specified plug-in.
This is a convenience method that simply locates the image file in within the plug-in (no image registries are involved). The path is relative to the root of the plug-in, and takes into account files coming from plug-in fragments. The path may include $arg$ elements. However, the path must not have a leading "." or path separator. Clients should use a path like "icons/mysample.gif" rather than "./icons/mysample.gif" or "/icons/mysample.gif".
pluginId | the id of the plug-in containing the image file; null is returned if the plug-in does not exist |
imageFilePath | the relative path of the image file, relative to the root of the plug-in; the path must be legal |
null
if no image could be found Definition at line 255 of file berryAbstractUICTKPlugin.cpp.
Referenced by berry::WorkbenchPart::SetInitializationData(), and berry::IntroPart::SetInitializationData().
|
override |
Returns a new image registry for this plugin-in. The registry will be used to manage images which are frequently used by the plugin-in.
The default implementation of this method creates an empty registry. Subclasses may override this method if needed.
The image registry contains the images used by this plug-in that are very frequently used and so need to be globally shared within the plug-in. Since many OSs have a severe limit on the number of images that can be in memory at any given time, each plug-in should only keep a small number of images in its registry.
Implementors should create a JFace image descriptor for each frequently used image. The descriptors describe how to create/find the image should it be needed. The image described by the descriptor is not actually allocated until someone retrieves it.
Subclasses may override this method to fill the image registry.
reg | the registry to initalize |
This framework method may be overridden, although this is typically unnecessary.
Refreshes the actions for the plugin. This method is called from startup
.
This framework method may be overridden, although this is typically unnecessary.
Saves this plug-in's dialog settings. Any problems which arise are silently ignored. The AbstractUIPlugin
implementation of this Plugin
method refreshes the plug-in actions. Subclasses may extend this method, but must send super first.
Definition at line 197 of file berryAbstractUICTKPlugin.cpp.
References berry::Plugin::start().
|
override |
The AbstractUIPlugin
implementation of this Plugin
method saves this plug-in's preference and dialog stores and shuts down its image registry (if they are in use). Subclasses may extend this method, but must send super last. A try-finally statement should be used where necessary to ensure that super.shutdown()
is always done.
Definition at line 234 of file berryAbstractUICTKPlugin.cpp.
References berry::Plugin::stop().