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

#include <berrySubContributionItem.h>

Inheritance diagram for berry::SubContributionItem:
Collaboration diagram for berry::SubContributionItem:

Public Member Functions

 SubContributionItem (IContributionItem::Pointer item)
 
void Fill (QStatusBar *parent) override
 
void Fill (QMenu *parent, QAction *before) override
 
void Fill (QToolBar *parent, QAction *before) override
 
QString GetId () const override
 
IContributionItem::Pointer GetInnerItem () const
 
bool IsEnabled () const override
 
bool IsDirty () const override
 
bool IsDynamic () const override
 
bool IsGroupMarker () const override
 
bool IsSeparator () const override
 
bool IsVisible () const override
 
void SetParent (IContributionManager *parent) override
 
void SetVisible (bool visible) override
 
void Update () override
 
void Update (const QString &id) override
 
void SaveWidgetState () override
 
- Public Member Functions inherited from berry::IContributionItem
 berryObjectMacro (berry::IContributionItem) virtual void Fill(QStatusBar *parent)=0
 
virtual void Fill (QMenuBar *parent, QAction *before)=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 Attributes

berryObjectMacro(SubContributionItem) private IContributionItem::Pointer innerItem
 

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 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
 

Detailed Description

A SubContributionItem is a wrapper for an IContributionItem. It is used within a SubContributionManager to control the visibility of items.

This class is not intended to be subclassed.

This class is not intended to be subclassed by clients.

Definition at line 36 of file berrySubContributionItem.h.

Constructor & Destructor Documentation

berry::SubContributionItem::SubContributionItem ( IContributionItem::Pointer  item)

Creates a new SubContributionItem.

Parameters
itemthe contribution item to be wrapped

Definition at line 22 of file berrySubContributionItem.cpp.

Member Function Documentation

void berry::SubContributionItem::Fill ( QStatusBar *  parent)
override

Definition at line 28 of file berrySubContributionItem.cpp.

References Fill(), and innerItem.

Referenced by Fill().

void berry::SubContributionItem::Fill ( QMenu *  parent,
QAction *  before 
)
overridevirtual

Fills the given menu with controls representing this contribution item. Used by MenuManager.

Parameters
parentthe parent menu
indexthe index where the controls are inserted, or -1 to insert at the end

Implements berry::IContributionItem.

Definition at line 36 of file berrySubContributionItem.cpp.

References Fill(), and innerItem.

void berry::SubContributionItem::Fill ( QToolBar *  parent,
QAction *  before 
)
overridevirtual

Fills the given tool bar with controls representing this contribution item. Used by ToolBarManager.

Parameters
parentthe parent tool bar
indexthe index where the controls are inserted, or -1 to insert at the end

Implements berry::IContributionItem.

Definition at line 44 of file berrySubContributionItem.cpp.

References Fill(), and innerItem.

QString berry::SubContributionItem::GetId ( ) const
overridevirtual

Returns the identifier of this contribution item. The id is used for retrieving an item from its manager.

Returns
the contribution item identifier, or null if none

Implements berry::IContributionItem.

Definition at line 52 of file berrySubContributionItem.cpp.

References GetId(), and innerItem.

Referenced by GetId().

IContributionItem::Pointer berry::SubContributionItem::GetInnerItem ( ) const

Returns the inner contribution item.

Returns
the inner contribution item

Definition at line 57 of file berrySubContributionItem.cpp.

References innerItem.

bool berry::SubContributionItem::IsDirty ( ) const
overridevirtual

Returns whether this contribution item is dirty. A dirty item will be recreated when the action bar is updated.

Returns
true if this item is dirty

Implements berry::IContributionItem.

Definition at line 67 of file berrySubContributionItem.cpp.

References innerItem, and IsDirty().

Referenced by IsDirty().

bool berry::SubContributionItem::IsDynamic ( ) const
overridevirtual

Returns whether this contribution item is dynamic. A dynamic contribution item contributes items conditionally, dependent on some internal state.

Returns
true if this item is dynamic, and false for normal items

Implements berry::IContributionItem.

Definition at line 72 of file berrySubContributionItem.cpp.

References innerItem, and IsDynamic().

Referenced by IsDynamic().

bool berry::SubContributionItem::IsEnabled ( ) const
overridevirtual

Returns whether this contribution item is enabled.

Returns
true if this item is enabled

Implements berry::IContributionItem.

Definition at line 62 of file berrySubContributionItem.cpp.

References innerItem, and IsEnabled().

Referenced by IsEnabled().

bool berry::SubContributionItem::IsGroupMarker ( ) const
overridevirtual

Returns whether this contribution item is a group marker. This information is used when adding items to a group.

Returns
true if this item is a group marker, and false for normal items
See also
GroupMarker
IContributionManager::appendToGroup(String, IContributionItem)
IContributionManager::prependToGroup(String, IContributionItem)

Implements berry::IContributionItem.

Definition at line 77 of file berrySubContributionItem.cpp.

References innerItem, and IsGroupMarker().

Referenced by IsGroupMarker().

bool berry::SubContributionItem::IsSeparator ( ) const
overridevirtual

Returns whether this contribution item is a separator. This information is used to enable hiding of unnecessary separators.

Returns
true if this item is a separator, and false for normal items
See also
Separator

Implements berry::IContributionItem.

Definition at line 82 of file berrySubContributionItem.cpp.

References innerItem, and IsSeparator().

Referenced by IsSeparator().

bool berry::SubContributionItem::IsVisible ( ) const
overridevirtual

Returns whether this contribution item is visibile within its manager.

Returns
true if this item is visible, and false otherwise

Implements berry::IContributionItem.

Definition at line 87 of file berrySubContributionItem.cpp.

References innerItem, and IsVisible().

Referenced by IsVisible().

void berry::SubContributionItem::SaveWidgetState ( )
overridevirtual

Saves any state information of the control(s) owned by this contribution item. The contribution manager calls this method before disposing of the controls.

Implements berry::IContributionItem.

Definition at line 113 of file berrySubContributionItem.cpp.

void berry::SubContributionItem::SetParent ( IContributionManager parent)
overridevirtual

Sets the parent manager of this item

Parameters
parentthe parent contribution manager

Implements berry::IContributionItem.

Definition at line 92 of file berrySubContributionItem.cpp.

void berry::SubContributionItem::SetVisible ( bool  visible)
overridevirtual

Sets whether this contribution item is visibile within its manager.

Parameters
visibletrue if this item should be visible, and false otherwise

Implements berry::IContributionItem.

Definition at line 98 of file berrySubContributionItem.cpp.

void berry::SubContributionItem::Update ( )
overridevirtual

Updates any controls cached by this contribution item with any changes which have been made to this contribution item since the last update. Called by contribution manager update methods.

Implements berry::IContributionItem.

Definition at line 103 of file berrySubContributionItem.cpp.

References innerItem, and Update().

Referenced by Update().

void berry::SubContributionItem::Update ( const QString &  id)
overridevirtual

Updates any controls cached by this contribution item with changes for the the given property.

Parameters
idthe id of the changed property

Implements berry::IContributionItem.

Definition at line 108 of file berrySubContributionItem.cpp.

References innerItem, and Update().

Member Data Documentation

berryObjectMacro (SubContributionItem) private IContributionItem::Pointer berry::SubContributionItem::innerItem

The visibility of the item. The inner item for this contribution.

Definition at line 41 of file berrySubContributionItem.h.

Referenced by Fill(), GetId(), GetInnerItem(), IsDirty(), IsDynamic(), IsEnabled(), IsGroupMarker(), IsSeparator(), IsVisible(), and Update().


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