Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
berry::ICommandImageService Struct Referenceabstract

#include <berryICommandImageService.h>

Inheritance diagram for berry::ICommandImageService:
Collaboration diagram for berry::ICommandImageService:

Public Member Functions

 berryObjectMacro (berry::ICommandImageService)
 
virtual QIcon GetImage (const QString &commandId)=0
 
virtual QIcon GetImage (const QString &commandId, const QString &style)=0
 
- Public Member Functions inherited from berry::IDisposable
 berryObjectMacro (berry::IDisposable)
 
 ~IDisposable () override
 
virtual void Dispose ()=0
 
- 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
 

Static Public Attributes

static const QString IMAGE_STYLE_DEFAULT
 
static const QString IMAGE_STYLE_TOOLBAR
 

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

Detailed Description

Provides a look-up facility for images associated with commands.

The type of an image indicates the state of the associated command within the user interface. The supported types are: TYPE_DEFAULT (to be used for an enabled command), TYPE_DISABLED (to be used for a disabled command) and TYPE_HOVER (to be used for an enabled command over which the mouse is hovering).

The style of an image is an arbitrary string used to distinguish between sets of images associated with a command. For example, a command may appear in the menus as the default style. However, in the toolbar, the command is simply the default action for a toolbar drop down item. As such, perhaps a different image style is appropriate. The classic case is the "Run Last Launched" command, which appears in the menu and the toolbar, but with different icons in each location.

We currently support a default image style (none) and an image style of IMAGE_STYLE_TOOLBAR.

Note
This interface is not intended to be implemented by clients.
This interface is not intended to be extended by clients.

Definition at line 52 of file berryICommandImageService.h.

Member Function Documentation

◆ berryObjectMacro()

berry::ICommandImageService::berryObjectMacro ( berry::ICommandImageService  )

◆ GetImage() [1/2]

virtual QIcon berry::ICommandImageService::GetImage ( const QString &  commandId)
pure virtual

Retrieves the image associated with the given command in the default style.

Parameters
commandIdThe identifier to find; must not be null.
Returns
An image appropriate for the given command; may be null.

◆ GetImage() [2/2]

virtual QIcon berry::ICommandImageService::GetImage ( const QString &  commandId,
const QString &  style 
)
pure virtual

Retrieves the image associated with the given command in the given style.

Parameters
commandIdThe identifier to find; must not be null.
styleThe style of the image to retrieve; may be null.
Returns
An image appropriate for the given command; A null QIcon if the given image style cannot be found.

Member Data Documentation

◆ IMAGE_STYLE_DEFAULT

const QString berry::ICommandImageService::IMAGE_STYLE_DEFAULT
static

The default image style. This is provided when no style is requested or when the requested style is unavailable. (Value is null)

Definition at line 61 of file berryICommandImageService.h.

◆ IMAGE_STYLE_TOOLBAR

const QString berry::ICommandImageService::IMAGE_STYLE_TOOLBAR
static

The image style used for commands in a toolbar. This is useful if you want the icon for the command in the toolbar to be different than the one that is displayed with menu items. (Value is toolbar)

Definition at line 68 of file berryICommandImageService.h.


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