Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
berry::QActionContributionItem Class Reference

#include <berryQActionContributionItem.h>

Inheritance diagram for berry::QActionContributionItem:
Collaboration diagram for berry::QActionContributionItem:

Public Member Functions

 QActionContributionItem (QAction *action, const QString &id)
 
 ~QActionContributionItem () override
 
bool operator== (const Object *o) const override
 
uint HashCode () const override
 
void Fill (QStatusBar *parent) override
 
void Fill (QMenu *parent, QAction *before) override
 
void Fill (QToolBar *parent, QAction *before) override
 
QAction * GetAction () const
 
Modes GetMode () const
 
bool IsDynamic () const override
 
bool IsEnabled () const override
 
bool IsVisible () const override
 
void SetMode (Modes mode)
 
void Update () override
 
void Update (const QString &propertyName) override
 
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
 
- Public Member Functions inherited from berry::ContributionItem
 berryObjectMacro (ContributionItem)
 
void Fill (QMenuBar *menu, QAction *before) override
 
void SaveWidgetState () override
 
QString GetId () const override
 
IContributionManagerGetParent () const
 
bool IsDirty () const override
 
bool IsGroupMarker () const override
 
bool IsSeparator () const override
 
void SetVisible (bool visible) override
 
QString ToString () const override
 
void SetParent (IContributionManager *parent) 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 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
 

Protected Member Functions

bool IsEnabledAllowed () const
 
- 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
 

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

Detailed Description

A contribution item which delegates to a QAction.

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

Definition at line 27 of file berryQActionContributionItem.h.

Constructor & Destructor Documentation

◆ QActionContributionItem()

berry::QActionContributionItem::QActionContributionItem ( QAction *  action,
const QString &  id 
)

Creates a new contribution item from the given action and id.

Parameters
actionthe action
id

◆ ~QActionContributionItem()

berry::QActionContributionItem::~QActionContributionItem ( )
override

Member Function Documentation

◆ Fill() [1/7]

void berry::ContributionItem::Fill
override

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

◆ Fill() [2/7]

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

The ActionContributionItem implementation of this IContributionItem method creates an SWT MenuItem for the action using the action's style. If the action's checked property has been set, a button is created and primed to the value of the checked property. If the action's menu creator property has been set, a cascading submenu is created.

Reimplemented from berry::ContributionItem.

◆ Fill() [3/7]

void berry::ContributionItem::Fill
override

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

◆ Fill() [4/7]

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

The QActionContributionItem implementation of this IContributionItem method creates an SWT Button for the action using the action's style. If the action's checked property has been set, the button is created and primed to the value of the checked property.

Reimplemented from berry::ContributionItem.

◆ Fill() [5/7]

void berry::ContributionItem::Fill
override

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

◆ Fill() [6/7]

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

The ActionContributionItem implementation of this , IContributionItem method creates an SWT ToolItem for the action using the action's style. If the action's checked property has been set, a button is created and primed to the value of the checked property. If the action's menu creator property has been set, a drop-down tool item is created.

Reimplemented from berry::ContributionItem.

◆ Fill() [7/7]

void berry::ContributionItem::Fill
override

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

◆ GetAction()

QAction* berry::QActionContributionItem::GetAction ( ) const

Returns the action associated with this contribution item.

Returns
the action

◆ GetMode()

Modes berry::QActionContributionItem::GetMode ( ) const

Returns the presentation mode, which is the bitwise-or of the MODE_* constants. The default mode setting is 0, meaning that for menu items, both text and image are shown (if present), but for tool items, the text is shown only if there is no image.

Returns
the presentation mode settings

◆ HashCode()

uint berry::QActionContributionItem::HashCode ( ) const
overridevirtual

Returns a hash code value for the object.

Reimplemented from berry::Object.

◆ IsDynamic()

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

The action item implementation of this IContributionItem method returns true for menu items and false for everything else.

Reimplemented from berry::ContributionItem.

◆ IsEnabled()

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

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

Reimplemented from berry::ContributionItem.

◆ IsEnabledAllowed()

bool berry::QActionContributionItem::IsEnabledAllowed ( ) const
protected

Returns true if this item is allowed to enable, false otherwise.

Returns
if this item is allowed to be enabled

◆ IsVisible()

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

The ActionContributionItem implementation of this ContributionItem method extends the super implementation by also checking whether the command corresponding to this action is active.

Reimplemented from berry::ContributionItem.

◆ operator==()

bool berry::QActionContributionItem::operator== ( const Object o) const
overridevirtual

Compares this action contribution item with another object. Two action contribution items are equal if they refer to the identical QAction.

Reimplemented from berry::Object.

◆ SetMode()

void berry::QActionContributionItem::SetMode ( Modes  mode)

Sets the presentation mode, which is the bitwise-or of the MODE_* constants.

Parameters
modethe presentation mode settings

◆ Update() [1/2]

void berry::QActionContributionItem::Update ( )
overridevirtual

The action item implementation of this IContributionItem method calls update(null).

Reimplemented from berry::ContributionItem.

◆ Update() [2/2]

void berry::QActionContributionItem::Update ( const QString &  propertyName)
overridevirtual

Synchronizes the UI with the given property.

Parameters
propertyNamethe name of the property, or null meaning all applicable properties

Reimplemented from berry::ContributionItem.


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