Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <berryEditorPart.h>
Public Member Functions | |
virtual void | DoSave () override=0 |
virtual void | DoSaveAs () override=0 |
IEditorInput::Pointer | GetEditorInput () const override |
IEditorSite::Pointer | GetEditorSite () const override |
QString | GetTitleToolTip () const override |
virtual void | Init (IEditorSite::Pointer site, IEditorInput::Pointer input) override=0 |
virtual bool | IsDirty () const override=0 |
virtual bool | IsSaveAsAllowed () const override=0 |
virtual bool | IsSaveOnCloseNeeded () const override |
Public Member Functions inherited from berry::WorkbenchPart | |
berryObjectMacro (WorkbenchPart, QObject, IWorkbenchPart, IExecutableExtension)~WorkbenchPart() | |
void | AddPropertyListener (IPropertyChangeListener *l) override |
void | RemovePropertyListener (IPropertyChangeListener *l) override |
void | SetPartProperty (const QString &key, const QString &value) override |
QString | GetPartProperty (const QString &key) const override |
const QHash< QString, QString > & | GetPartProperties () const override |
void | SetInitializationData (const IConfigurationElement::Pointer &cfig, const QString &propertyName, const Object::Pointer &data) override |
virtual void | CreatePartControl (QWidget *parent) override=0 |
virtual void | SetFocus () override=0 |
IWorkbenchPartSite::Pointer | GetSite () const override |
QString | GetPartName () const override |
QString | GetContentDescription () const override |
QIcon | GetTitleImage () const override |
QString | GetTitleToolTip () const override |
Public Member Functions inherited from berry::IWorkbenchPart | |
berryObjectMacro (berry::IWorkbenchPart, Object) virtual ~IWorkbenchPart() | |
Public Member Functions inherited from berry::Object | |
virtual QString | GetClassName () const |
virtual Reflection::TypeInfo | GetTypeInfo () const |
virtual QList< Reflection::TypeInfo > | GetSuperclasses () const |
virtual void | Delete () |
QDebug | Print (QDebug os, Indent Indent=0) const |
virtual QString | ToString () const |
virtual uint | HashCode () const |
virtual bool | operator< (const Object *) const |
void | Register () const |
void | UnRegister (bool del=true) const |
int | GetReferenceCount () const |
void | SetReferenceCount (int) |
void | AddDestroyListener (const MessageAbstractDelegate<> &delegate) const |
void | RemoveDestroyListener (const MessageAbstractDelegate<> &delegate) const |
virtual bool | operator== (const Object *) const |
Public Member Functions inherited from berry::IExecutableExtension | |
virtual | ~IExecutableExtension () |
virtual void | SetInitializationData (const SmartPointer< IConfigurationElement > &config, const QString &propertyName, const Object::Pointer &data)=0 |
Public Member Functions inherited from berry::IEditorPart | |
berryObjectMacro (berry::IEditorPart, IWorkbenchPart, ISaveablePart) virtual ~IEditorPart() | |
virtual void | Init (SmartPointer< IEditorSite > site, SmartPointer< IEditorInput > input)=0 |
Public Member Functions inherited from berry::ISaveablePart | |
berryObjectMacro (berry::ISaveablePart) static const int PROP_DIRTY | |
Protected Member Functions | |
EditorPart () | |
virtual void | SetInput (IEditorInput::Pointer input) |
virtual void | SetInputWithNotify (IEditorInput::Pointer input) |
virtual void | SetContentDescription (const QString &description) override |
virtual void | SetPartName (const QString &partName) override |
void | CheckSite (IWorkbenchPartSite::Pointer site) override |
Protected Member Functions inherited from berry::WorkbenchPart | |
WorkbenchPart () | |
IConfigurationElement::Pointer | GetConfigurationElement () const |
void | SetSite (IWorkbenchPartSite::Pointer site) |
virtual void | SetTitleImage (const QIcon &titleImage) |
virtual void | SetTitleToolTip (const QString &toolTip) |
void | FirePropertyChanged (const QString &key, const QString &oldValue, const QString &newValue) |
void | FirePropertyChange (int propertyId) |
Protected Member Functions inherited from berry::Object | |
Object () | |
virtual | ~Object () |
virtual QDebug | PrintSelf (QDebug os, Indent indent) const |
virtual QDebug | PrintHeader (QDebug os, Indent indent) const |
virtual QDebug | PrintTrailer (QDebug os, Indent indent) const |
Additional Inherited Members | |
Public Types inherited from berry::Object | |
typedef Object | Self |
typedef berry::SmartPointer< Self > | Pointer |
typedef berry::SmartPointer< const Self > | ConstPointer |
typedef berry::WeakPointer< Self > | WeakPtr |
typedef berry::WeakPointer< const Self > | ConstWeakPtr |
Static Public Member Functions inherited from berry::Object | |
static const char * | GetStaticClassName () |
static Reflection::TypeInfo | GetStaticTypeInfo () |
static QList< Reflection::TypeInfo > | GetStaticSuperclasses () |
Protected Attributes inherited from berry::Object | |
QAtomicInt | m_ReferenceCount |
QMutex | m_ReferenceCountLock |
Abstract base implementation of all workbench editors.
This class should be subclassed by clients wishing to define new editors. The name of the subclass should be given as the "class"
attribute in a editor
extension contributed to the workbench's editor extension point (named "org.mitk.ui.editors"
). For example, the plug-in's XML markup might contain:
extension point="org.blueberry.ui.editors" editor id="com.example.myplugin.ed" name="My Editor" icon="./images/cedit.gif" extensions="foo" class="com.example.myplugin.MyFooEditor" contributorClass="com.example.myplugin.MyFooEditorContributor" / /extension
where com.example.myplugin.MyEditor
is the name of the EditorPart
subclass.
Subclasses must implement the following methods:
IEditorPart.init
- to initialize editor when assigned its site IWorkbenchPart.createPartControl
- to create the editor's controls IWorkbenchPart.setFocus
- to accept focus IEditorPart.isDirty
- to decide whether a significant change has occurred IEditorPart.doSave
- to save contents of editor IEditorPart.doSaveAs
- to save contents of editor IEditorPart.isSaveAsAllowed
- to control Save As Subclasses may extend or reimplement the following methods as required:
IExecutableExtension.setInitializationData
- extend to provide additional initialization when editor extension is instantiated IWorkbenchPart.dispose
- extend to provide additional cleanup IAdaptable.getAdapter
- reimplement to make the editor adaptable Definition at line 76 of file berryEditorPart.h.
|
protected |
Editor input, or null
if none. Creates a new workbench editor.
Definition at line 26 of file berryEditorPart.cpp.
|
overrideprotectedvirtual |
Checks that the given site is valid for this type of part. The site for an editor must be an IEditorSite
.
site | the site to check |
Reimplemented from berry::WorkbenchPart.
Definition at line 66 of file berryEditorPart.cpp.
References berry::SmartPointer< TObjectType >::Cast(), and berry::WorkbenchPart::CheckSite().
|
overridepure virtual |
Saves the contents of this part.
If the save is successful, the part should fire a property changed event reflecting the new dirty state (PROP_DIRTY
property).
If the save is cancelled through user action, or for any other reason, the part should invoke setCancelled
on the IProgressMonitor
to inform the caller.
This method is long-running; progress and cancellation are provided by the given progress monitor.
monitor | the progress monitor |
Implements berry::ISaveablePart.
Implemented in QmitkAbstractRenderEditor.
|
overridepure virtual |
Saves the contents of this part to another object.
Implementors are expected to open a "Save As" dialog where the user will be able to select a new name for the contents. After the selection is made, the contents should be saved to that new name. During this operation a IProgressMonitor
should be used to indicate progress.
If the save is successful, the part fires a property changed event reflecting the new dirty state (PROP_DIRTY
property).
Implements berry::ISaveablePart.
Implemented in QmitkAbstractRenderEditor.
|
overridevirtual |
The property id for getEditorInput
. Returns the input for this editor. If this value changes the part must fire a property listener event with PROP_INPUT
.
Implements berry::IEditorPart.
Definition at line 72 of file berryEditorPart.cpp.
Referenced by QmitkAbstractRenderEditor::GetDataStorageReference().
|
overridevirtual |
Returns the site for this editor. This method is equivalent to (IEditorSite) getSite()
.
The site can be null
while the editor is being initialized. After the initialization is complete, this value must be non-null
for the remainder of the editor's life cycle.
null
if the editor has not yet been initialized Implements berry::IEditorPart.
Definition at line 77 of file berryEditorPart.cpp.
References berry::WorkbenchPart::GetSite().
|
overridevirtual |
Returns the title tool tip text of this workbench part. An empty string result indicates no tool tip. If this value changes the part must fire a property listener event with PROP_TITLE
.
The tool tip text is used to populate the title bar of this part's visual container.
null
) Implements berry::IWorkbenchPart.
Definition at line 82 of file berryEditorPart.cpp.
References berry::WorkbenchPart::GetTitleToolTip().
|
overridepure virtual |
Implemented in QmitkAbstractRenderEditor.
|
overridepure virtual |
Returns whether the contents of this part have changed since the last save operation. If this value changes the part must fire a property listener event with PROP_DIRTY
.
Note: this method is called often on a part open or part activation switch, for example by actions to determine their enabled status.
true
if the contents have been modified and need saving, and false
if they have not changed since the last save Implements berry::ISaveablePart.
Implemented in QmitkAbstractRenderEditor.
Referenced by IsSaveOnCloseNeeded().
|
overridepure virtual |
Returns whether the "Save As" operation is supported by this part.
true
if "Save As" is supported, and false
if not supported Implements berry::ISaveablePart.
Implemented in QmitkAbstractRenderEditor.
|
overridevirtual |
Returns whether the contents of this part should be saved when the part is closed.
true
if the contents of the part should be saved on close, and false
if the contents are expendable Implements berry::ISaveablePart.
Definition at line 94 of file berryEditorPart.cpp.
References IsDirty().
|
overrideprotectedvirtual |
Sets the content description for this part. The content description is typically a short string describing the current contents of the part. Setting this to the empty string will cause a default content description to be used. Clients should call this method instead of overriding getContentDescription(). For views, the content description is shown (by default) in a line near the top of the view. For editors, the content description is shown beside the part name when showing a list of editors. If the editor is open on a file, this typically contains the path to the input file, without the filename or trailing slash.
description | the content description |
Reimplemented from berry::WorkbenchPart.
Definition at line 44 of file berryEditorPart.cpp.
References berry::WorkbenchPart::SetContentDescription().
|
protectedvirtual |
Sets the input to this editor. This method simply updates the internal member variable.
Unlike most of the other set methods on this class, this method does not fire a property change. Clients that call this method from a subclass must ensure that they fire an IWorkbenchPartConstants.PROP_INPUT property change after calling this method but before leaving whatever public method they are in. Clients that expose this method as public API must fire the property change within their implementation of setInput.
Note that firing a property change may cause listeners to immediately reach back and call methods on this editor. Care should be taken not to fire the property change until the editor has fully updated its internal state to reflect the new input.
input | the editor input |
Definition at line 30 of file berryEditorPart.cpp.
Referenced by QmitkAbstractRenderEditor::Init().
|
protectedvirtual |
Sets the input to this editor and fires a PROP_INPUT property change if the input has changed. This is the convenience method implementation.
Note that firing a property change may cause other objects to reach back and invoke methods on the editor. Care should be taken not to call this method until the editor has fully updated its internal state to reflect the new input.
input | the editor input |
Definition at line 35 of file berryEditorPart.cpp.
References berry::WorkbenchPart::FirePropertyChange(), and berry::IWorkbenchPartConstants::PROP_INPUT.
|
overrideprotectedvirtual |
Sets the name of this part. The name will be shown in the tab area for the part. Clients should call this method instead of overriding getPartName. Setting this to the empty string will cause a default part name to be used.
partName | the part name, as it should be displayed in tabs. |
Reimplemented from berry::WorkbenchPart.
Definition at line 55 of file berryEditorPart.cpp.
References berry::WorkbenchPart::SetPartName().