Medical Imaging Interaction Toolkit
2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
|
#include <berryQActionContributionItem.h>
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 |
IContributionManager * | GetParent () 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::TypeInfo > | GetSuperclasses () 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< Self > | Pointer |
typedef berry::SmartPointer< const Self > | ConstPointer |
typedef berry::WeakPointer< Self > | WeakPtr |
typedef berry::WeakPointer< const Self > | ConstWeakPtr |
Static Public Member Functions inherited from berry::Object | |
static const char * | GetStaticClassName () |
static Reflection::TypeInfo | GetStaticTypeInfo () |
static QList< Reflection::TypeInfo > | GetStaticSuperclasses () |
Protected Attributes inherited from berry::Object | |
QAtomicInt | m_ReferenceCount |
QMutex | m_ReferenceCountLock |
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.
berry::QActionContributionItem::QActionContributionItem | ( | QAction * | action, |
const QString & | id | ||
) |
Creates a new contribution item from the given action and id.
action | the action |
id |
|
override |
|
override |
The default implementation of this IContributionItem
method does nothing. Subclasses may override.
|
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.
|
override |
The default implementation of this IContributionItem
method does nothing. Subclasses may override.
|
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.
|
override |
The default implementation of this IContributionItem
method does nothing. Subclasses may override.
|
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.
|
override |
The default implementation of this IContributionItem
method does nothing. Subclasses may override.
QAction* berry::QActionContributionItem::GetAction | ( | ) | const |
Returns the action associated with this contribution item.
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.
|
overridevirtual |
Returns a hash code value for the object.
Reimplemented from berry::Object.
|
overridevirtual |
The action item implementation of this IContributionItem
method returns true
for menu items and false
for everything else.
Reimplemented from berry::ContributionItem.
|
overridevirtual |
The default implementation of this IContributionItem
method returns true
. Subclasses may override.
Reimplemented from berry::ContributionItem.
|
protected |
Returns true
if this item is allowed to enable, false
otherwise.
|
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.
|
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.
void berry::QActionContributionItem::SetMode | ( | Modes | mode | ) |
Sets the presentation mode, which is the bitwise-or of the MODE_*
constants.
mode | the presentation mode settings |
|
overridevirtual |
The action item implementation of this IContributionItem
method calls update(null)
.
Reimplemented from berry::ContributionItem.
|
overridevirtual |
Synchronizes the UI with the given property.
propertyName | the name of the property, or null meaning all applicable properties |
Reimplemented from berry::ContributionItem.