Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <berryWorkbenchPart.h>
Public Member Functions | |
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 |
Protected Member Functions | |
WorkbenchPart () | |
IConfigurationElement::Pointer | GetConfigurationElement () const |
void | SetSite (IWorkbenchPartSite::Pointer site) |
virtual void | CheckSite (IWorkbenchPartSite::Pointer site) |
virtual void | SetTitleImage (const QIcon &titleImage) |
virtual void | SetTitleToolTip (const QString &toolTip) |
virtual void | SetPartName (const QString &partName) |
virtual void | SetContentDescription (const QString &description) |
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 parts.
This class is not intended to be subclassed by clients outside this package; clients should instead subclass ViewPart
or EditorPart
.
Definition at line 45 of file berryWorkbenchPart.h.
|
protected |
Definition at line 58 of file berryWorkbenchPart.cpp.
|
overridevirtual |
The property id for getTitle
, getTitleImage
and getTitleToolTip
. Adds a listener for changes to properties of this workbench part. Has no effect if an identical listener is already registered.
The property ids are defined in IWorkbenchPartConstants.
listener | a property listener |
Implements berry::IWorkbenchPart.
Definition at line 201 of file berryWorkbenchPart.cpp.
References berry::IPropertyChangeListener::Events::AddListener().
berry::WorkbenchPart::berryObjectMacro | ( | WorkbenchPart | , |
QObject | , | ||
IWorkbenchPart | , | ||
IExecutableExtension | |||
) |
|
protectedvirtual |
Checks that the given site is valid for this type of part. The default implementation does nothing.
site | the site to check |
Reimplemented in berry::EditorPart, and berry::ViewPart.
Definition at line 116 of file berryWorkbenchPart.cpp.
Referenced by berry::ViewPart::CheckSite(), berry::EditorPart::CheckSite(), and SetSite().
|
overridepure virtual |
Creates the controls for this workbench part.
Clients should not call this method (the workbench calls this method when it needs to, which may be never).
For implementors this is a multi-step process:
IActionBars
. ISelectionService
(optional). parent | the parent control |
Implements berry::IWorkbenchPart.
Implemented in QmitkFunctionality.
|
protected |
Definition at line 181 of file berryWorkbenchPart.cpp.
References berry::Message1< T, A >::GetListeners(), berry::IWorkbenchPartConstants::INTEGER_PROPERTY, berry::IPropertyChangeListener::Events::propertyChange, and berry::SafeRunner::Run().
Referenced by berry::EditorPart::SetInputWithNotify(), SetTitleImage(), and SetTitleToolTip().
|
protected |
Definition at line 160 of file berryWorkbenchPart.cpp.
References berry::Message1< T, A >::GetListeners(), berry::IPropertyChangeListener::Events::propertyChange, and berry::SafeRunner::Run().
Referenced by SetPartProperty().
|
inlineprotected |
Returns the configuration element for this part. The configuration element comes from the plug-in registry entry for the extension defining this part.
Definition at line 81 of file berryWorkbenchPart.h.
|
overridevirtual |
Returns the content description of this part. The content description is an optional user-readable string that describes what is currently being displayed in the part. By default, the workbench will display the content description in a line near the top of the view or editor. An empty string indicates no content description text. If this value changes the part must fire a property listener event with IWorkbenchPartConstants#PROP_CONTENT_DESCRIPTION.
null
)It is considered bad practise to overload or extend this method. Parts should call setContentDescription to change their content description.
Implements berry::IWorkbenchPart.
Definition at line 253 of file berryWorkbenchPart.cpp.
|
overridevirtual |
Returns the name of this part. If this value changes the part must fire a property listener event with IWorkbenchPartConstants#PROP_PART_NAME.
null
)It is considered bad practise to overload or extend this method. Parts should call setPartName to change their part name.
Implements berry::IWorkbenchPart.
Definition at line 248 of file berryWorkbenchPart.cpp.
|
overridevirtual |
Return an unmodifiable map of the arbitrary properties. This method can be used to save the properties during workbench save/restore.
null
. Implements berry::IWorkbenchPart.
Definition at line 238 of file berryWorkbenchPart.cpp.
|
overridevirtual |
Return the value for the arbitrary property key, or null
.
key | the arbitrary property. Must not be null . |
null
. Implements berry::IWorkbenchPart.
Definition at line 230 of file berryWorkbenchPart.cpp.
|
overridevirtual |
Returns the site for this workbench part. The site can be null
while the workbench part is being initialized. After the initialization is complete, this value must be non-null
for the remainder of the part's life cycle.
null
if the part has not yet been initialized Implements berry::IWorkbenchPart.
Definition at line 243 of file berryWorkbenchPart.cpp.
Referenced by QmitkFunctionality::AfterCreateQtPartControl(), QmitkFunctionality::ClosePartProxy(), QmitkStdMultiWidgetEditor::CreateQtPartControl(), QmitkDataManagerView::CreateQtPartControl(), QmitkFunctionality::GetActiveStdMultiWidget(), QmitkAbstractView::GetCurrentSelection(), QmitkFunctionality::GetCurrentSelection(), QmitkAbstractView::GetDataManagerSelection(), QmitkFunctionality::GetDataManagerSelection(), berry::EditorPart::GetEditorSite(), QmitkAbstractRenderEditor::GetPreferences(), QmitkAbstractView::GetRenderWindowPart(), berry::ViewPart::GetViewSite(), QmitkAbstractView::IsCurrentSelectionValid(), QmitkAbstractView::IsDataManagerSelectionValid(), QmitkAbstractView::SetDataManagerSelection(), QmitkDataManagerView::ShowIn(), QmitkAbstractView::SynchronizeDataManagerSelection(), QmitkAbstractView::~QmitkAbstractView(), and QmitkStdMultiWidgetEditor::~QmitkStdMultiWidgetEditor().
|
overridevirtual |
Returns the title image of this workbench part. If this value changes the part must fire a property listener event with PROP_TITLE
.
The title image is usually used to populate the title bar of this part's visual container. Since this image is managed by the part itself, callers must not dispose the returned image.
Implements berry::IWorkbenchPart.
Definition at line 258 of file berryWorkbenchPart.cpp.
|
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 264 of file berryWorkbenchPart.cpp.
Referenced by berry::EditorPart::GetTitleToolTip().
|
overridevirtual |
Removes the given property listener from this workbench part. Has no affect if an identical listener is not registered.
listener | a property listener |
Implements berry::IWorkbenchPart.
Definition at line 206 of file berryWorkbenchPart.cpp.
References berry::IPropertyChangeListener::Events::RemoveListener().
|
protectedvirtual |
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 in berry::EditorPart.
Definition at line 153 of file berryWorkbenchPart.cpp.
Referenced by berry::EditorPart::SetContentDescription().
|
overridepure virtual |
Asks this part to take focus within the workbench.
Clients should not call this method (the workbench calls this method at appropriate times). To have the workbench activate a part, use IWorkbenchPage.activate(IWorkbenchPart) instead
.
Implements berry::IWorkbenchPart.
Implemented in QmitkFunctionality, QmitkDataManagerView, and QmitkStdMultiWidgetEditor.
|
override |
The WorkbenchPart
implementation of this IExecutableExtension
records the configuration element in and internal state variable (accessible via getConfigElement
). It also loads the title image, if one is specified in the configuration element. Subclasses may extend.
Should not be called by clients. It is called by the core plugin when creating this executable extension.
Definition at line 269 of file berryWorkbenchPart.cpp.
References berry::AbstractUICTKPlugin::ImageDescriptorFromPlugin().
|
protectedvirtual |
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 in berry::EditorPart.
Definition at line 145 of file berryWorkbenchPart.cpp.
Referenced by berry::EditorPart::SetPartName().
|
overridevirtual |
Set an arbitrary property on the part. It is the implementor's responsibility to fire the corresponding PropertyChangeEvent.
A default implementation has been added to WorkbenchPart.
key | the arbitrary property. Must not be null . |
value | the property value. A null value will remove that property. |
Implements berry::IWorkbenchPart.
Definition at line 211 of file berryWorkbenchPart.cpp.
References FirePropertyChanged().
|
protected |
Returns the default title image.
Subclasses must invoke this method from IEditorPart.init
and IViewPart.init
.
site | the workbench part site |
Definition at line 110 of file berryWorkbenchPart.cpp.
References CheckSite().
Referenced by QmitkAbstractRenderEditor::Init().
|
protectedvirtual |
Sets or clears the title image of this part.
titleImage | the title image, or null to clear |
Definition at line 121 of file berryWorkbenchPart.cpp.
References FirePropertyChange(), and berry::IWorkbenchPartConstants::PROP_TITLE.
|
protectedvirtual |
Sets or clears the title tool tip text of this part. Clients should call this method instead of overriding getTitleToolTip
toolTip | the new tool tip text, or null to clear |
Definition at line 133 of file berryWorkbenchPart.cpp.
References FirePropertyChange(), and berry::IWorkbenchPartConstants::PROP_TITLE.