Medical Imaging Interaction Toolkit
2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
|
#include <berryIWorkbenchPart.h>
Public Member Functions | |
berryObjectMacro (berry::IWorkbenchPart, Object) | |
~IWorkbenchPart () override | |
virtual void | AddPropertyListener (IPropertyChangeListener *listener)=0 |
virtual void | CreatePartControl (QWidget *parent)=0 |
virtual SmartPointer< IWorkbenchPartSite > | GetSite () const =0 |
virtual QString | GetPartName () const =0 |
virtual QString | GetContentDescription () const =0 |
virtual QIcon | GetTitleImage () const =0 |
virtual QString | GetTitleToolTip () const =0 |
virtual void | RemovePropertyListener (IPropertyChangeListener *listener)=0 |
virtual QString | GetPartProperty (const QString &key) const =0 |
virtual void | SetPartProperty (const QString &key, const QString &value)=0 |
virtual const QHash< QString, QString > & | GetPartProperties () const =0 |
virtual void | SetFocus ()=0 |
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 |
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 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 |
Protected Attributes inherited from berry::Object | |
QAtomicInt | m_ReferenceCount |
QMutex | m_ReferenceCountLock |
A workbench part is a visual component within a workbench page. There are two subtypes: view and editor, as defined by IViewPart
and IEditorPart
.
A view is typically used to navigate a hierarchy of information (like the workspace), open an editor, or display properties for the active editor. Modifications made in a view are saved immediately.
An editor is typically used to edit or browse a document or input object. The input is identified using an IEditorInput
. Modifications made in an editor part follow an open-save-close lifecycle model.
This interface may be implemented directly. For convenience, a base implementation is defined in WorkbenchPart
.
The lifecycle of a workbench part is as follows:
part.init(site)
part.createControl(parent)
to create actual widgets partOpened
event to all listeners part.setFocus()
partActivated
event to all listeners partClosed
event to all listeners part.dispose()
After createPartControl
has been called, the implementor may safely reference the controls created. When the part is closed these controls will be disposed as part of an SWT composite. This occurs before the IWorkbenchPart.dispose
method is called. If there is a need to free SWT resources the part should define a dispose listener for its own control and free those resources from the dispose listener. If the part invokes any method on the disposed SWT controls after this point an SWTError
will be thrown.
The last method called on IWorkbenchPart
is dispose
. This signals the end of the part lifecycle.
An important point to note about this lifecycle is that following a call to init, createControl may never be called. Thus in the dispose method, implementors must not assume controls were created.
Workbench parts implement the IAdaptable
interface; extensions are managed by the platform's adapter manager.
Definition at line 106 of file berryIWorkbenchPart.h.
|
override |
|
pure virtual |
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 |
Implemented in berry::WorkbenchPart.
berry::IWorkbenchPart::berryObjectMacro | ( | berry::IWorkbenchPart | , |
Object | |||
) |
|
pure 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 |
Implemented in berry::WorkbenchPart, berry::QtViewPart, and berry::QtEditorPart.
|
pure virtual |
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
) Implemented in berry::WorkbenchPart.
|
pure virtual |
Returns the name of this part. If this value changes the part must fire a property listener event with IWorkbenchPartConstants#PROP_PART_NAME.
null
) Implemented in berry::WorkbenchPart.
|
pure virtual |
Return an unmodifiable map of the arbitrary properties. This method can be used to save the properties during workbench save/restore.
null
. Implemented in berry::WorkbenchPart.
|
pure virtual |
Return the value for the arbitrary property key, or null
.
key | the arbitrary property. Must not be null . |
null
. Implemented in berry::WorkbenchPart.
|
pure virtual |
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 Implemented in berry::WorkbenchPart.
|
pure virtual |
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.
Implemented in berry::WorkbenchPart.
|
pure virtual |
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
) Implemented in berry::WorkbenchPart, and berry::EditorPart.
|
pure virtual |
Removes the given property listener from this workbench part. Has no affect if an identical listener is not registered.
listener | a property listener |
Implemented in berry::WorkbenchPart.
|
pure 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
.
Implemented in berry::WorkbenchPart, and QmitkDataManagerView.
|
pure virtual |
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. |
Implemented in berry::WorkbenchPart.