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

#include <berryIntroPart.h>

Inheritance diagram for berry::IntroPart:
Collaboration diagram for berry::IntroPart:

Public Member Functions

void AddPropertyListener (IPropertyChangeListener *l) override
 
 ~IntroPart ()
 
IIntroSite::Pointer GetIntroSite () const override
 
QIcon GetTitleImage () const override
 
QString GetPartName () const override
 
void Init (IIntroSite::Pointer site, IMemento::Pointer memento) override throw (PartInitException)
 
void RemovePropertyListener (IPropertyChangeListener *l) override
 
void SaveState (IMemento::Pointer memento) override
 
void SetInitializationData (const IConfigurationElement::Pointer &cfig, const QString &propertyName, const Object::Pointer &data) override
 
- Public Member Functions inherited from berry::IIntroPart
 berryObjectMacro (berry::IIntroPart)~IIntroPart()
 
virtual void StandbyStateChanged (bool standby)=0
 
virtual void CreatePartControl (void *parent)=0
 
virtual void SetFocus ()=0
 
- 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
 

Protected Member Functions

void FirePropertyChange (int propertyId)
 
IConfigurationElement::Pointer GetConfigurationElement ()
 
QIcon GetDefaultImage () const
 
void SetSite (IIntroSite::Pointer site)
 
void SetTitleImage (const QIcon &titleImage)
 
void SetTitle (const QString &titleLabel)
 
- 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 an intro part.

Subclasses must implement the following methods:

  • CreatePartControl- to create the intro part's controls
  • SetFocus- to accept focus
  • StandbyStateChanged- to change the standby mode

Subclasses may extend or reimplement the following methods as required:

  • SetInitializationData- extend to provide additional initialization when the intro extension is instantiated
  • Init(IIntroSite::Pointer, IMemento::Pointer)- extend to provide additional initialization when intro is assigned its site
  • GetAdapter- reimplement to make their intro adaptable

Definition at line 56 of file berryIntroPart.h.

Constructor & Destructor Documentation

berry::IntroPart::~IntroPart ( )

The IntroPart implementation of this IIntroPart method disposes the title image loaded by setInitializationData. Subclasses may extend.

Definition at line 119 of file berryIntroPart.cpp.

Member Function Documentation

void berry::IntroPart::AddPropertyListener ( IPropertyChangeListener listener)
overridevirtual

Adds a listener for changes to properties of this intro part. Has no effect if an identical listener is already registered.

The properties ids are as follows:

  • IIntroPart.PROP_TITLE
Parameters
listenera property listener

Implements berry::IIntroPart.

Definition at line 114 of file berryIntroPart.cpp.

References berry::IPropertyChangeListener::Events::AddListener().

void berry::IntroPart::FirePropertyChange ( int  propertyId)
protected

Fires a property changed event.

Parameters
propertyIdthe id of the property that changed

Definition at line 59 of file berryIntroPart.cpp.

References berry::Message1< T, A >::GetListeners(), berry::IWorkbenchPartConstants::INTEGER_PROPERTY, berry::IPropertyChangeListener::Events::propertyChange, and berry::SafeRunner::Run().

Referenced by SetTitle(), and SetTitleImage().

IConfigurationElement::Pointer berry::IntroPart::GetConfigurationElement ( )
protected

Returns the configuration element for this part. The configuration element comes from the plug-in registry entry for the extension defining this part.

Returns
the configuration element for this part

Definition at line 80 of file berryIntroPart.cpp.

QIcon berry::IntroPart::GetDefaultImage ( ) const
protected

Returns the default title image.

Returns
the default image

Definition at line 85 of file berryIntroPart.cpp.

Referenced by GetTitleImage().

IIntroSite::Pointer berry::IntroPart::GetIntroSite ( ) const
overridevirtual

This implementation of the method declared by IAdaptable passes the request along to the platform's adapter manager; roughly Platform.getAdapterManager().getAdapter(this, adapter). Subclasses may override this method (however, if they do so, they should invoke the method on their superclass to ensure that the Platform's adapter manager is consulted).

Implements berry::IIntroPart.

Definition at line 124 of file berryIntroPart.cpp.

QString berry::IntroPart::GetPartName ( ) const
overridevirtual

Returns the title of this intro part. If this value changes the part must fire a property listener event with IIntroPart#PROP_TITLE.

The title is used to populate the title bar of this part's visual container.

Returns
the intro part title (not null)

Implements berry::IIntroPart.

Definition at line 138 of file berryIntroPart.cpp.

QIcon berry::IntroPart::GetTitleImage ( ) const
overridevirtual

Returns the title image of this intro part. If this value changes the part must fire a property listener event with IIntroPart#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.

Returns
the title image

Implements berry::IIntroPart.

Definition at line 129 of file berryIntroPart.cpp.

References GetDefaultImage().

void berry::IntroPart::Init ( IIntroSite::Pointer  site,
IMemento::Pointer  memento 
)
throw (PartInitException
)
overridevirtual

The base implementation of this org.eclipse.ui.intro.IIntroPartmethod ignores the memento and initializes the part in a fresh state. Subclasses may extend to perform any state restoration, but must call the super method.

Parameters
sitethe intro site
mementothe intro part state or null if there is no previous saved state
Exceptions
PartInitExceptionif this part was not initialized successfully

Implements berry::IIntroPart.

Definition at line 147 of file berryIntroPart.cpp.

References SetSite().

void berry::IntroPart::RemovePropertyListener ( IPropertyChangeListener listener)
overridevirtual

Removes the given property listener from this intro part. Has no affect if an identical listener is not registered.

Parameters
listenera property listener

Implements berry::IIntroPart.

Definition at line 153 of file berryIntroPart.cpp.

References berry::IPropertyChangeListener::Events::RemoveListener().

void berry::IntroPart::SaveState ( IMemento::Pointer  memento)
overridevirtual

The base implementation of this org.eclipse.ui.intro.IIntroPart method does nothing. Subclasses may override.

Parameters
mementoa memento to receive the object state

Implements berry::IIntroPart.

Definition at line 158 of file berryIntroPart.cpp.

void berry::IntroPart::SetInitializationData ( const IConfigurationElement::Pointer cfig,
const QString &  propertyName,
const Object::Pointer data 
)
override

The IntroPart 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 163 of file berryIntroPart.cpp.

References berry::AbstractUICTKPlugin::ImageDescriptorFromPlugin().

void berry::IntroPart::SetSite ( IIntroSite::Pointer  site)
protected

Sets the part site.

Subclasses must invoke this method from org.eclipse.ui.intro.IIntroPart#init(IIntroSite, IMemento).

Parameters
sitethe intro part site

Definition at line 90 of file berryIntroPart.cpp.

Referenced by Init().

void berry::IntroPart::SetTitle ( const QString &  titleLabel)
protected

Set the title string for this part.

Parameters
titleLabelthe title string. Must not be null.
Since
3.2

Definition at line 106 of file berryIntroPart.cpp.

References FirePropertyChange(), and berry::IWorkbenchPartConstants::PROP_TITLE.

void berry::IntroPart::SetTitleImage ( const QIcon &  titleImage)
protected

Sets or clears the title image of this part.

Parameters
titleImagethe title image, or null to clear

Definition at line 95 of file berryIntroPart.cpp.

References FirePropertyChange(), and berry::IWorkbenchPartConstants::PROP_TITLE.


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