Medical Imaging Interaction Toolkit  2016.11.0
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 ()
 
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) enum Mode
 
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) virtual void Fill(QStatusBar *parent)=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 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  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 IContributionRoot).

It currently supports placement in menus and toolbars.

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

Definition at line 52 of file berryCommandContributionItem.h.

Constructor & Destructor Documentation

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

Create a CommandContributionItem to place in a ContributionManager.

Parameters
contributionParametersparameters necessary to render this contribution item.

Definition at line 72 of file berryCommandContributionItem.cpp.

References berry::ContributionItem::GetId().

berry::CommandContributionItem::~CommandContributionItem ( )

Member Function Documentation

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
indexthe index where the controls are inserted, or -1 to insert at the end

Implements berry::IContributionItem.

Definition at line 175 of file berryCommandContributionItem.cpp.

References berry::ContributionItem::STYLE_PULLDOWN, berry::ContributionItem::STYLE_PUSH, and Update().

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
indexthe index where the controls are inserted, or -1 to insert at the end

Implements berry::IContributionItem.

Definition at line 221 of file berryCommandContributionItem.cpp.

References Update().

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

Returns whether this contribution item is enabled.

Returns
true if this item is enabled

Implements berry::IContributionItem.

Definition at line 397 of file berryCommandContributionItem.cpp.

References berry::IMenuService::GetCurrentState().

Referenced by 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.

Definition at line 407 of file berryCommandContributionItem.cpp.

References IsEnabled(), and berry::ContributionItem::IsVisible().

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.

Definition at line 251 of file berryCommandContributionItem.cpp.

Referenced by Fill(), and UpdateCommandPropertiesInUI().

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.

Definition at line 256 of file berryCommandContributionItem.cpp.

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

Member Data Documentation

ContributionItem::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 63 of file berryCommandContributionItem.h.


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