Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berry::ViewPart Class Reference

#include <berryViewPart.h>

Inheritance diagram for berry::ViewPart:
Collaboration diagram for berry::ViewPart:

Public Member Functions

IViewSite::Pointer GetViewSite () 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::TypeInfoGetSuperclasses () 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::IViewPart
 berryObjectMacro (berry::IViewPart, IWorkbenchPart) virtual ~IViewPart()
 
virtual void Init (IViewSite::Pointer site, IMemento::Pointer memento=IMemento::Pointer(nullptr))=0
 
virtual void SaveState (IMemento::Pointer memento)=0
 

Protected Member Functions

 ViewPart ()
 
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)
 
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< SelfPointer
 
typedef berry::SmartPointer< const SelfConstPointer
 
typedef berry::WeakPointer< SelfWeakPtr
 
typedef berry::WeakPointer< const SelfConstWeakPtr
 
- Static Public Member Functions inherited from berry::Object
static const char * GetStaticClassName ()
 
static Reflection::TypeInfo GetStaticTypeInfo ()
 
static QList< Reflection::TypeInfoGetStaticSuperclasses ()
 
- Protected Attributes inherited from berry::Object
QAtomicInt m_ReferenceCount
 
QMutex m_ReferenceCountLock
 

Detailed Description

Abstract base implementation of all workbench views.

This class should be subclassed by clients wishing to define new views. The name of the subclass should be given as the "class" attribute in a view extension contributed to the workbench's view extension point (named "org.blueberry.ui.views"). For example, the plug-in's XML markup might contain:

extension point="org.blueberry.ui.views"
     view id="com.example.myplugin.view"
        name="My View"
        class="com.example.myplugin.MyView"
        icon="images/eview.gif"
     /
/extension

where com.example.myplugin.MyView is the name of the ViewPart subclass.

Subclasses must implement the following methods:

  • createPartControl - to create the view's controls
  • setFocus - to accept focus

Subclasses may extend or reimplement the following methods as required:

  • setInitializationData - extend to provide additional initialization when view extension is instantiated
  • init(IWorkbenchPartSite) - extend to provide additional initialization when view is assigned its site
  • dispose - extend to provide additional cleanup
  • getAdapter - reimplement to make their view adaptable

Definition at line 70 of file berryViewPart.h.

Constructor & Destructor Documentation

berry::ViewPart::ViewPart ( )
protected

Definition at line 24 of file berryViewPart.cpp.

Member Function Documentation

void berry::ViewPart::CheckSite ( IWorkbenchPartSite::Pointer  site)
overrideprotectedvirtual

Checks that the given site is valid for this type of part. The site for a view must be an IViewSite.

Parameters
sitethe site to check
Since
3.1

Reimplemented from berry::WorkbenchPart.

Definition at line 49 of file berryViewPart.cpp.

References berry::SmartPointer< TObjectType >::Cast(), and berry::WorkbenchPart::CheckSite().

IViewSite::Pointer berry::ViewPart::GetViewSite ( )
overridevirtual

Returns the site for this view. This method is equivalent to (IViewSite) getSite().

The site can be null while the view is being initialized. After the initialization is complete, this value must be non-null for the remainder of the view's life cycle.

Returns
the view site; this value may be null if the view has not yet been initialized

Implements berry::IViewPart.

Definition at line 56 of file berryViewPart.cpp.

References berry::WorkbenchPart::GetSite().


The documentation for this class was generated from the following files: