Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
berry::IContributionItem Struct Referenceabstract

#include <berryIContributionItem.h>

Inheritance diagram for berry::IContributionItem:
Collaboration diagram for berry::IContributionItem:

Public Member Functions

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

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 contribution item represents a contribution to a shared UI resource such as a menu or tool bar. More generally, contribution items are managed by a contribution manager. For instance, in a tool bar a contribution item is a tool bar button or a separator. In a menu bar a contribution item is a menu, and in a menu a contribution item is a menu item or separator.

A contribution item can realize itself in different Qt widgets, using the different fill methods. The same type of contribution item can be used with a MenuBarManager, ToolBarManager, or a StatusLineManager.

This interface is internal to the framework; it should not be implemented outside the framework.

See also
IContributionManager

Definition at line 50 of file berryIContributionItem.h.

Member Function Documentation

◆ berryObjectMacro()

berry::IContributionItem::berryObjectMacro ( berry::IContributionItem  )

◆ Fill() [1/4]

virtual void berry::IContributionItem::Fill ( QMenu *  parent,
QAction *  before 
)
pure virtual

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

Parameters
parentthe parent menu
before

Implemented in berry::MenuManager, berry::CommandContributionItem, berry::SubContributionItem, berry::QActionContributionItem, and berry::ContributionItem.

◆ Fill() [2/4]

virtual void berry::IContributionItem::Fill ( QMenuBar *  parent,
QAction *  before 
)
pure virtual

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

Parameters
parentthe parent menu
before

Implemented in berry::MenuManager, and berry::ContributionItem.

◆ Fill() [3/4]

virtual void berry::IContributionItem::Fill ( QStatusBar *  parent)
pure virtual

Fills the given status bar control with controls representing this contribution item. Used by StatusLineManager.

Parameters
parentthe parent control

Implemented in berry::MenuManager, berry::ContributionItem, berry::SubContributionItem, and berry::QActionContributionItem.

◆ Fill() [4/4]

virtual void berry::IContributionItem::Fill ( QToolBar *  parent,
QAction *  before 
)
pure virtual

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

Parameters
parentthe parent tool bar
before

Implemented in berry::MenuManager, berry::CommandContributionItem, berry::ContributionItem, berry::SubContributionItem, and berry::QActionContributionItem.

◆ GetId()

virtual QString berry::IContributionItem::GetId ( ) const
pure virtual

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

Implemented in berry::MenuManager, berry::ContributionItem, and berry::SubContributionItem.

◆ IsDirty()

virtual bool berry::IContributionItem::IsDirty ( ) const
pure virtual

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

Implemented in berry::MenuManager, berry::ContributionItem, and berry::SubContributionItem.

◆ IsDynamic()

virtual bool berry::IContributionItem::IsDynamic ( ) const
pure virtual

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

Implemented in berry::MenuManager, berry::ContributionItem, berry::SubContributionItem, and berry::QActionContributionItem.

◆ IsEnabled()

virtual bool berry::IContributionItem::IsEnabled ( ) const
pure virtual

Returns whether this contribution item is enabled.

Returns
true if this item is enabled

Implemented in berry::IMenuManager, berry::MenuManager, berry::CommandContributionItem, berry::ContributionItem, berry::QActionContributionItem, and berry::SubContributionItem.

◆ IsGroupMarker()

virtual bool berry::IContributionItem::IsGroupMarker ( ) const
pure virtual

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)

Implemented in berry::MenuManager, berry::ContributionItem, and berry::SubContributionItem.

◆ IsSeparator()

virtual bool berry::IContributionItem::IsSeparator ( ) const
pure virtual

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

Implemented in berry::MenuManager, berry::ContributionItem, and berry::SubContributionItem.

◆ IsVisible()

virtual bool berry::IContributionItem::IsVisible ( ) const
pure virtual

Returns whether this contribution item is visible within its manager.

Returns
true if this item is visible, and false otherwise

Implemented in berry::MenuManager, berry::ContributionItem, berry::CommandContributionItem, berry::SubContributionItem, and berry::QActionContributionItem.

◆ SaveWidgetState()

virtual void berry::IContributionItem::SaveWidgetState ( )
pure virtual

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

Implemented in berry::MenuManager, berry::SubContributionItem, and berry::ContributionItem.

◆ SetParent()

virtual void berry::IContributionItem::SetParent ( IContributionManager parent)
pure virtual

Sets the parent manager of this item

Parameters
parentthe parent contribution manager

Implemented in berry::ContributionItem, berry::SubContributionItem, and berry::MenuManager.

◆ SetVisible()

virtual void berry::IContributionItem::SetVisible ( bool  visible)
pure virtual

Sets whether this contribution item is visible within its manager.

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

Implemented in berry::MenuManager, berry::ContributionItem, and berry::SubContributionItem.

◆ Update() [1/2]

virtual void berry::IContributionItem::Update ( )
pure virtual

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.

Implemented in berry::MenuManager, berry::ContributionItem, berry::CommandContributionItem, berry::SubContributionItem, and berry::QActionContributionItem.

◆ Update() [2/2]

virtual void berry::IContributionItem::Update ( const QString &  id)
pure virtual

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

Parameters
idthe id of the changed property

Implemented in berry::QActionContributionItem, berry::MenuManager, berry::ContributionItem, berry::SubContributionItem, and berry::CommandContributionItem.


The documentation for this struct was generated from the following file: