Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <berryQActionContributionItem.h>
Public Member Functions | |
QActionContributionItem (QAction *action, const QString &id) | |
~QActionContributionItem () | |
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 |
Public Member Functions inherited from berry::ContributionItem | |
berryObjectMacro (ContributionItem) enum Mode | |
void | Fill (QStatusBar *parent) override |
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) 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::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 | 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.
This class is not intended to be subclassed by clients.
Definition at line 32 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 |
Definition at line 27 of file berryQActionContributionItem.cpp.
berry::QActionContributionItem::~QActionContributionItem | ( | ) |
Definition at line 183 of file berryQActionContributionItem.cpp.
|
override |
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.
Definition at line 46 of file berryQActionContributionItem.cpp.
|
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.
Definition at line 86 of file berryQActionContributionItem.cpp.
References Update().
|
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.
Definition at line 134 of file berryQActionContributionItem.cpp.
QAction * berry::QActionContributionItem::GetAction | ( | ) | const |
Returns the action associated with this contribution item.
Definition at line 178 of file berryQActionContributionItem.cpp.
ContributionItem::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.
Definition at line 188 of file berryQActionContributionItem.cpp.
|
overridevirtual |
Returns a hash code value for the object.
Reimplemented from berry::Object.
Definition at line 41 of file berryQActionContributionItem.cpp.
References qHash().
|
overridevirtual |
The action item implementation of this IContributionItem
method returns true
for menu items and false
for everything else.
Reimplemented from berry::ContributionItem.
Definition at line 193 of file berryQActionContributionItem.cpp.
|
overridevirtual |
The default implementation of this IContributionItem
method returns true
. Subclasses may override.
Reimplemented from berry::ContributionItem.
Definition at line 211 of file berryQActionContributionItem.cpp.
|
protected |
Returns true
if this item is allowed to enable, false
otherwise.
Definition at line 507 of file berryQActionContributionItem.cpp.
References berry::IContributionManager::GetOverrides(), and berry::ContributionItem::GetParent().
|
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.
Definition at line 216 of file berryQActionContributionItem.cpp.
References berry::ContributionItem::IsVisible().
|
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.
Definition at line 32 of file berryQActionContributionItem.cpp.
void berry::QActionContributionItem::SetMode | ( | Modes | mode | ) |
Sets the presentation mode, which is the bitwise-or of the MODE_*
constants.
mode | the presentation mode settings |
Definition at line 221 of file berryQActionContributionItem.cpp.
References Update().
|
overridevirtual |
The action item implementation of this IContributionItem
method calls update(null)
.
Reimplemented from berry::ContributionItem.
Definition at line 227 of file berryQActionContributionItem.cpp.
|
overridevirtual |
Synchronizes the UI with the given property.
propertyName | the name of the property, or null meaning all applicable properties |
Reimplemented from berry::ContributionItem.
Definition at line 232 of file berryQActionContributionItem.cpp.