Medical Imaging Interaction Toolkit
2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
|
#include <berryIEditorRegistry.h>
Public Member Functions | |
virtual | ~IEditorRegistry () |
virtual IEditorDescriptor::Pointer | FindEditor (const QString &editorId)=0 |
virtual IEditorDescriptor::Pointer | GetDefaultEditor ()=0 |
virtual IEditorDescriptor::Pointer | GetDefaultEditor (const QString &fileName)=0 |
virtual QList< IEditorDescriptor::Pointer > | GetEditors (const QString &fileName)=0 |
virtual QList< IFileEditorMapping::Pointer > | GetFileEditorMappings ()=0 |
virtual void | SetDefaultEditor (const QString &fileNameOrExtension, const QString &editorId)=0 |
virtual bool | IsSystemInPlaceEditorAvailable (const QString &filename)=0 |
virtual bool | IsSystemExternalEditorAvailable (const QString &filename)=0 |
Static Public Attributes | |
static const int | PROP_CONTENTS |
static const QString | SYSTEM_EXTERNAL_EDITOR_ID |
static const QString | SYSTEM_INPLACE_EDITOR_ID |
Registry of editors known to the workbench.
An editor can be created in one of two ways:
The registry does not keep track of editors that are "implicitly" determined. For example a bitmap (.bmp
) file will typically not have a registered editor. Instead, when no registered editor is found, the underlying OS is consulted.
This interface is not intended to be implemented by clients.
Definition at line 47 of file berryIEditorRegistry.h.
|
virtual |
|
pure virtual |
Finds and returns the descriptor of the editor with the given editor id.
editorId | the editor id |
null
if not found
|
pure virtual |
Returns the default editor. The default editor always exist.
findEditor(IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID)
instead.
|
pure virtual |
Returns the default editor for a given file name. This method assumes an unknown content type for the given file.
The default editor is determined by taking the file extension for the file and obtaining the default editor for that extension.
fileName | the file name in the system |
null
if not found
|
pure virtual |
Returns the list of file editors registered to work against the file with the given file name. This method assumes an unknown content type for the given file.
Note: Use getDefaultEditor(String)
if you only the need the default editor rather than all candidate editors.
fileName | the file name in the system |
|
pure virtual |
Returns a list of mappings from file type to editor. The resulting list is sorted in ascending order by file extension.
Each mapping defines an extension and the set of editors that are available for that type. The set of editors includes those registered via plug-ins and those explicitly associated with a type by the user in the workbench preference pages.
|
pure virtual |
Returns whether the system has an editor that could handle a file with the given name.
filename | the file name |
true
if an external editor available, and false
otherwise
|
pure virtual |
Returns whether there is an in-place editor that could handle a file with the given name.
filename | the file name |
true
if an in-place editor is available, and false
otherwise
|
pure virtual |
Sets the default editor id for the files that match that specified file name or extension. The specified editor must be defined as an editor for that file name or extension.
fileNameOrExtension | the file name or extension pattern (e.g. "*.xml"); |
editorId | the editor id or null for no default |
|
static |
The property identifier for the contents of this registry.
Definition at line 52 of file berryIEditorRegistry.h.
|
static |
The identifier for the system external editor descriptor. This descriptor is always present in the registry on all platforms. Use FindEditor to access the editor descriptor for this identifier.
Definition at line 61 of file berryIEditorRegistry.h.
|
static |
The identifier for the system in-place editor descriptor. This descriptor is only present in the registry on platforms that support in-place editing (for example Win32). Use FindEditor to access the editor descriptor for this identifier.
Definition at line 71 of file berryIEditorRegistry.h.