Medical Imaging Interaction Toolkit  2018.04.99-aba3194f
Medical Imaging Interaction Toolkit
berry::CommandContributionItem Class Reference

#include <berryCommandContributionItem.h>

Inheritance diagram for berry::CommandContributionItem:
Collaboration diagram for berry::CommandContributionItem:

Public Member Functions

 CommandContributionItem (const SmartPointer< CommandContributionItemParameter > &contributionParameters)
 
 ~CommandContributionItem () override
 
void Fill (QMenu *parent, QAction *before) override
 
void Fill (QToolBar *parent, QAction *before) override
 
void Update () override
 
void Update (const QString &id) override
 
bool IsEnabled () const override
 
bool IsVisible () const override
 
void UpdateCommandPropertiesInUI (const SmartPointer< const CommandEvent > &commandEvent)
 
- Public Member Functions inherited from berry::ContributionItem
 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
 

Static Public Attributes

static Modes modes
 

Additional Inherited Members

- Public Types inherited from berry::ContributionItem
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
 
- 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::ContributionItem
 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
 
- Protected Attributes inherited from berry::Object
QAtomicInt m_ReferenceCount
 
QMutex m_ReferenceCountLock
 

Detailed Description

A contribution item which delegates to a command. It can be used in berry::AbstractContributionFactory::CreateContributionItems().

It currently supports placement in menus and toolbars.

This class may be instantiated; it is not intended to be subclassed.

Definition at line 47 of file berryCommandContributionItem.h.

Constructor & Destructor Documentation

◆ CommandContributionItem()

berry::CommandContributionItem::CommandContributionItem ( const SmartPointer< CommandContributionItemParameter > &  contributionParameters)

Create a CommandContributionItem to place in a ContributionManager.

Parameters
contributionParametersparameters necessary to render this contribution item.

◆ ~CommandContributionItem()

berry::CommandContributionItem::~CommandContributionItem ( )
override

Member Function Documentation

◆ Fill() [1/2]

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

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

Parameters
parentthe parent menu
before

Implements berry::IContributionItem.

◆ Fill() [2/2]

void berry::CommandContributionItem::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
before

Implements berry::IContributionItem.

◆ IsEnabled()

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

Returns whether this contribution item is enabled.

Returns
true if this item is enabled

Implements berry::IContributionItem.

◆ IsVisible()

bool berry::CommandContributionItem::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.

◆ Update() [1/2]

void berry::CommandContributionItem::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.

◆ Update() [2/2]

void berry::CommandContributionItem::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.

◆ UpdateCommandPropertiesInUI()

void berry::CommandContributionItem::UpdateCommandPropertiesInUI ( const SmartPointer< const CommandEvent > &  commandEvent)

Member Data Documentation

◆ modes

Modes berry::CommandContributionItem::modes
static

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 58 of file berryCommandContributionItem.h.


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