Medical Imaging Interaction Toolkit  2018.4.99-ae21cdc4
Medical Imaging Interaction Toolkit
berry::ContributionItem Class Reference

#include <berryContributionItem.h>

Inheritance diagram for berry::ContributionItem:
Collaboration diagram for berry::ContributionItem:

Public Types

enum  Mode { DEFAULT, MODE_FORCE_TEXT }
 
enum  Style { STYLE_PUSH, STYLE_CHECK, STYLE_RADIO, STYLE_PULLDOWN }
 
- 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
 

Public Member Functions

 berryObjectMacro (ContributionItem)
 
void Fill (QStatusBar *parent) override
 
void Fill (QMenu *menu, QAction *before) override
 
void Fill (QMenuBar *menu, QAction *before) override
 
void Fill (QToolBar *parent, QAction *before) override
 
void SaveWidgetState () override
 
QString GetId () const override
 
IContributionManagerGetParent () const
 
bool IsDirty () const override
 
bool IsEnabled () const override
 
bool IsDynamic () const override
 
bool IsGroupMarker () const override
 
bool IsSeparator () const override
 
bool IsVisible () const override
 
void SetVisible (bool visible) override
 
QString ToString () const override
 
void Update () override
 
void SetParent (IContributionManager *parent) override
 
void Update (const QString &id) override
 
void SetId (const QString &itemId)
 
- Public Member Functions inherited from berry::IContributionItem
 berryObjectMacro (berry::IContributionItem)
 
- 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 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
 

Protected Member Functions

 ContributionItem ()
 
 ContributionItem (const QString &id)
 
- 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

- 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

An abstract base implementation for contribution items.

Definition at line 26 of file berryContributionItem.h.

Member Enumeration Documentation

◆ Mode

Enumerator
DEFAULT 
MODE_FORCE_TEXT 

Mode bit: Show text on tool items or buttons, even if an image is present. If this mode bit is not set, text is only shown on tool items if there is no image present.

Definition at line 33 of file berryContributionItem.h.

◆ Style

Enumerator
STYLE_PUSH 

A push button tool item or menu item.

STYLE_CHECK 

A checked tool item or menu item.

STYLE_RADIO 

A radio-button style menu item.

STYLE_PULLDOWN 

A ToolBar pulldown item.

Definition at line 45 of file berryContributionItem.h.

Constructor & Destructor Documentation

◆ ContributionItem() [1/2]

berry::ContributionItem::ContributionItem ( )
protected

Creates a contribution item with a null id. Calls this(String) with null.

◆ ContributionItem() [2/2]

berry::ContributionItem::ContributionItem ( const QString &  id)
protected

Creates a contribution item with the given (optional) id. The given id is used to find items in a contribution manager, and for positioning items relative to other items.

Parameters
idthe contribution item identifier, or null

Member Function Documentation

◆ berryObjectMacro()

berry::ContributionItem::berryObjectMacro ( ContributionItem  )

◆ Fill() [1/4]

void berry::ContributionItem::Fill ( QStatusBar *  parent)
overridevirtual

The default implementation of this IContributionItem method does nothing. Subclasses may override.

Implements berry::IContributionItem.

Reimplemented in berry::QActionContributionItem.

◆ Fill() [2/4]

void berry::ContributionItem::Fill ( QMenu *  menu,
QAction *  before 
)
overridevirtual

The default implementation of this IContributionItem method does nothing. Subclasses may override.

Implements berry::IContributionItem.

Reimplemented in berry::QActionContributionItem.

◆ Fill() [3/4]

void berry::ContributionItem::Fill ( QMenuBar *  menu,
QAction *  before 
)
overridevirtual

The default implementation of this IContributionItem method does nothing. Subclasses may override.

Implements berry::IContributionItem.

◆ Fill() [4/4]

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

The default implementation of this IContributionItem method does nothing. Subclasses may override.

Implements berry::IContributionItem.

Reimplemented in berry::QActionContributionItem.

◆ GetId()

QString berry::ContributionItem::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.

◆ GetParent()

IContributionManager* berry::ContributionItem::GetParent ( ) const

Returns the parent contribution manager, or null if this contribution item is not currently added to a contribution manager.

Returns
the parent contribution manager, or null

◆ IsDirty()

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

The default implementation of this IContributionItem method returns false. Subclasses may override.

Implements berry::IContributionItem.

◆ IsDynamic()

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

The default implementation of this IContributionItem method returns false. Subclasses may override.

Implements berry::IContributionItem.

Reimplemented in berry::QActionContributionItem.

◆ IsEnabled()

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

The default implementation of this IContributionItem method returns true. Subclasses may override.

Implements berry::IContributionItem.

Reimplemented in berry::QActionContributionItem.

◆ IsGroupMarker()

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

The default implementation of this IContributionItem method returns false. Subclasses may override.

Implements berry::IContributionItem.

◆ IsSeparator()

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

The default implementation of this IContributionItem method returns false. Subclasses may override.

Implements berry::IContributionItem.

◆ IsVisible()

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

The default implementation of this IContributionItem method returns the value recorded in an internal state variable, which is true by default. setVisible should be used to change this setting.

Implements berry::IContributionItem.

Reimplemented in berry::QActionContributionItem.

◆ SaveWidgetState()

void berry::ContributionItem::SaveWidgetState ( )
overridevirtual

The default implementation of this IContributionItem method does nothing. Subclasses may override.

Implements berry::IContributionItem.

◆ SetId()

void berry::ContributionItem::SetId ( const QString &  itemId)

The ID for this contribution item. It should be set once either in the constructor or using this method.

Parameters
itemId
See also
#getId()

◆ SetParent()

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

Sets the parent manager of this item

Parameters
parentthe parent contribution manager

Implements berry::IContributionItem.

◆ SetVisible()

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

The default implementation of this IContributionItem method stores the value in an internal state variable, which is true by default.

Implements berry::IContributionItem.

◆ ToString()

QString berry::ContributionItem::ToString ( ) const
overridevirtual

Returns a string representation of this contribution item suitable only for debugging.

Reimplemented from berry::Object.

◆ Update() [1/2]

void berry::ContributionItem::Update ( )
overridevirtual

The default implementation of this IContributionItem method does nothing. Subclasses may override.

Implements berry::IContributionItem.

Reimplemented in berry::QActionContributionItem.

◆ Update() [2/2]

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

The ContributionItem implementation of this method declared on IContributionItem does nothing. Subclasses should override to update their state.

Implements berry::IContributionItem.

Reimplemented in berry::QActionContributionItem.


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