Medical Imaging Interaction Toolkit  2024.06.99-5f7b36e7
Medical Imaging Interaction Toolkit
berry::CommandCategory Class Reference

#include <berryCommandCategory.h>

Inheritance diagram for berry::CommandCategory:
Collaboration diagram for berry::CommandCategory:

Public Member Functions

 berryObjectMacro (CommandCategory)
void AddCategoryListener (ICommandCategoryListener *categoryListener)
void Define (const QString &name, const QString &description)
void RemoveCategoryListener (ICommandCategoryListener *categoryListener)
QString ToString () const override
void Undefine () override
- Public Member Functions inherited from berry::NamedHandleObject
 berryObjectMacro (NamedHandleObject)
virtual QString GetDescription () const
virtual QString GetName () const
- Public Member Functions inherited from berry::HandleObject
 berryObjectMacro (HandleObject)
bool operator== (const Object *object) const override
QString GetId () const
uint HashCode () const override
bool IsDefined () const
- 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 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

 CommandCategory (const QString &id)
- Protected Member Functions inherited from berry::NamedHandleObject
 NamedHandleObject (const QString &id)
- Protected Member Functions inherited from berry::HandleObject
 HandleObject (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::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::NamedHandleObject
QString description
QString name
- Protected Attributes inherited from berry::HandleObject
bool defined
const QString id
QString str
- Protected Attributes inherited from berry::Object
QAtomicInt m_ReferenceCount
QMutex m_ReferenceCountLock

Detailed Description

A logical group for a set of commands. A command belongs to exactly one category. The category has no functional effect, but may be used in graphical tools that want to group the set of commands somehow.

Definition at line 31 of file berryCommandCategory.h.

Constructor & Destructor Documentation

◆ CommandCategory()

berry::CommandCategory::CommandCategory ( const QString &  id)

Constructs a new instance of Category based on the given identifier. When a category is first constructed, it is undefined. Category should only be constructed by the CommandManager to ensure that identifier remain unique.

idThe identifier for the category. This value must not be null, and must be unique amongst all categories.

Member Function Documentation

◆ AddCategoryListener()

void berry::CommandCategory::AddCategoryListener ( ICommandCategoryListener categoryListener)

Adds a listener to this category that will be notified when this category's state changes.

categoryListenerThe listener to be added; must not be null.

◆ berryObjectMacro()

berry::CommandCategory::berryObjectMacro ( CommandCategory  )

◆ Define()

void berry::CommandCategory::Define ( const QString &  name,
const QString &  description 

Defines this category by giving it a name, and possibly a description as well. The defined property automatically becomes true.

Notification is sent to all listeners that something has changed.

nameThe name of this command; must not be null.
descriptionThe description for this command; may be null.

◆ RemoveCategoryListener()

void berry::CommandCategory::RemoveCategoryListener ( ICommandCategoryListener categoryListener)

Removes a listener from this category.

categoryListenerThe listener to be removed; must not be null.

◆ ToString()

QString berry::CommandCategory::ToString ( ) const

Returns a string representation of this object. The default implementation returns an empty string.

Reimplemented from berry::Object.

◆ Undefine()

void berry::CommandCategory::Undefine ( )

Makes this object becomes undefined. This method should make any defined properties null. It should also send notification to any listeners that these properties have changed.

Implements berry::HandleObject.

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