Medical Imaging Interaction Toolkit  2022.04.99-e5ef182d
Medical Imaging Interaction Toolkit
berry::UIElement Class Referenceabstract

#include <berryUIElement.h>

Inheritance diagram for berry::UIElement:
Collaboration diagram for berry::UIElement:

Public Member Functions

 berryObjectMacro (berry::UIElement)
virtual void SetText (const QString &text)=0
virtual void SetToolTip (const QString &text)=0
virtual void SetIcon (const QIcon &icon)=0
virtual void SetChecked (bool checked)=0
IServiceLocatorGetServiceLocator () const
virtual void SetDropDownId (const QString &id)
- 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 QString ToString () 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

Protected Member Functions

 UIElement (IServiceLocator *serviceLocator)
- 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::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

Allow a command or application to provide feedback to a user through updating a MenuItem or ToolItem. Initially used to update properties for UI elements created by the CommandContributionItem.

This class may be extended by clients.

Definition at line 36 of file berryUIElement.h.

Constructor & Destructor Documentation

◆ UIElement()

berry::UIElement::UIElement ( IServiceLocator serviceLocator)

Construct a new instance of this class keyed off of the provided service locator.

serviceLocatorthe locator. May not be null.

Member Function Documentation

◆ berryObjectMacro()

berry::UIElement::berryObjectMacro ( berry::UIElement  )

◆ GetServiceLocator()

IServiceLocator* berry::UIElement::GetServiceLocator ( ) const

Get the service locator scope in which this UI element resides. May not be null.

The locator may be used to obtain services that are scoped in the same way as the UIElement. Such services include but are not limited to IWorkbench, IWorkbenchWindow, and IWorkbenchPartSite. While this method may not return null requests for any of these particular services may return null.

the service locator for this element
See also

◆ SetChecked()

virtual void berry::UIElement::SetChecked ( bool  checked)
pure virtual

Update the checked state on this UI element. For example, if this was a toggle or radio button.

checkedtrue to set toggle on

◆ SetDropDownId()

virtual void berry::UIElement::SetDropDownId ( const QString &  id)

Set the menu contribution id to use. This is only applicable to menu contributions that support a drop-down style menu. The default implementation does nothing.

Example: element.setDropdownId("");

idused to populate the dropdown menu. Must not be null.

◆ SetIcon()

virtual void berry::UIElement::SetIcon ( const QIcon &  icon)
pure virtual

Update the icon on this UI element.

iconThe new icon to display.

◆ SetText()

virtual void berry::UIElement::SetText ( const QString &  text)
pure virtual

Update the label on this UI element.

textThe new label to display.

◆ SetToolTip()

virtual void berry::UIElement::SetToolTip ( const QString &  text)
pure virtual

Update the tooltip on this UI element. Tooltips are currently only valid for toolbar contributions.

textThe new tooltip to display.

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