Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
#include <berryCommandContributionItem.h>
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) |
![]() | |
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 |
IContributionManager * | GetParent () 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) |
![]() | |
berryObjectMacro (berry::IContributionItem) | |
![]() | |
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 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 | |
![]() | |
enum | Mode { DEFAULT, MODE_FORCE_TEXT } |
enum | Style { STYLE_PUSH, STYLE_CHECK, STYLE_RADIO, STYLE_PULLDOWN } |
![]() | |
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 const char * | GetStaticClassName () |
static Reflection::TypeInfo | GetStaticTypeInfo () |
static QList< Reflection::TypeInfo > | GetStaticSuperclasses () |
![]() | |
ContributionItem () | |
ContributionItem (const QString &id) | |
![]() | |
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 |
![]() | |
QAtomicInt | m_ReferenceCount |
QMutex | m_ReferenceCountLock |
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.
berry::CommandContributionItem::CommandContributionItem | ( | const SmartPointer< CommandContributionItemParameter > & | contributionParameters | ) |
Create a CommandContributionItem to place in a ContributionManager.
contributionParameters | parameters necessary to render this contribution item. |
Definition at line 68 of file berryCommandContributionItem.cpp.
References berry::ContributionItem::GetId(), and berry::WorkbenchPlugin::Log().
|
override |
Definition at line 381 of file berryCommandContributionItem.cpp.
|
overridevirtual |
Fills the given menu with controls representing this contribution item. Used by MenuManager
.
parent | the parent menu |
index | the index where the controls are inserted, or -1 to insert at the end |
Implements berry::IContributionItem.
Definition at line 171 of file berryCommandContributionItem.cpp.
References berry::ContributionItem::STYLE_PULLDOWN, berry::ContributionItem::STYLE_PUSH, and Update().
|
overridevirtual |
Fills the given tool bar with controls representing this contribution item. Used by ToolBarManager
.
parent | the parent tool bar |
index | the index where the controls are inserted, or -1 to insert at the end |
Implements berry::IContributionItem.
Definition at line 217 of file berryCommandContributionItem.cpp.
References Update().
|
overridevirtual |
Returns whether this contribution item is enabled.
true
if this item is enabled Implements berry::IContributionItem.
Definition at line 393 of file berryCommandContributionItem.cpp.
Referenced by IsVisible(), and Update().
|
overridevirtual |
Returns whether this contribution item is visibile within its manager.
true
if this item is visible, and false
otherwise Implements berry::IContributionItem.
Definition at line 403 of file berryCommandContributionItem.cpp.
References berry::Display::AsyncExec(), display, berry::Display::GetDefault(), berry::ICommandImageService::GetImage(), berry::IServiceLocator::GetService(), berry::Display::InDisplayThread(), IsEnabled(), berry::ContributionItem::IsVisible(), and UpdateCommandPropertiesInUI().
|
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 247 of file berryCommandContributionItem.cpp.
Referenced by Fill(), and UpdateCommandPropertiesInUI().
|
overridevirtual |
Updates any controls cached by this contribution item with changes for the the given property.
id | the id of the changed property |
Implements berry::IContributionItem.
Definition at line 252 of file berryCommandContributionItem.cpp.
References BERRY_ERROR, berry::ContributionItem::GetId(), IsEnabled(), and berry::ContributionItem::MODE_FORCE_TEXT.
void berry::CommandContributionItem::UpdateCommandPropertiesInUI | ( | const SmartPointer< const CommandEvent > & | commandEvent | ) |
Definition at line 481 of file berryCommandContributionItem.cpp.
References BERRY_ERROR, berry::SmartPointer< TObjectType >::Cast(), berry::ParameterizedCommand::GenerateCommand(), berry::ContributionItem::GetId(), berry::ContributionItem::GetParent(), us::handler, berry::SmartPointer< TObjectType >::IsNull(), berry::WorkbenchPlugin::Log(), berry::ContributionItem::STYLE_CHECK, Update(), and berry::IContributionManager::Update().
Referenced by IsVisible().
|
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.