Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <berryCommandCategory.h>
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 |
virtual 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::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 | |
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< 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::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 |
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 35 of file berryCommandCategory.h.
|
protected |
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.
id | The identifier for the category. This value must not be null , and must be unique amongst all categories. |
Definition at line 94 of file berryCommandCategory.cpp.
void berry::CommandCategory::AddCategoryListener | ( | ICommandCategoryListener * | categoryListener | ) |
Adds a listener to this category that will be notified when this category's state changes.
categoryListener | The listener to be added; must not be null . |
Definition at line 25 of file berryCommandCategory.cpp.
References berry::ICommandCategoryListener::Events::AddListener().
berry::CommandCategory::berryObjectMacro | ( | CommandCategory | ) |
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.
name | The name of this command; must not be null . |
description | The description for this command; may be null . |
Definition at line 35 of file berryCommandCategory.cpp.
References berry::HandleObject::defined, berry::NamedHandleObject::description, and berry::NamedHandleObject::name.
void berry::CommandCategory::RemoveCategoryListener | ( | ICommandCategoryListener * | categoryListener | ) |
Removes a listener from this category.
categoryListener | The listener to be removed; must not be null . |
Definition at line 57 of file berryCommandCategory.cpp.
References berry::ICommandCategoryListener::Events::RemoveListener().
|
overridevirtual |
Returns a string representation of this object. The default implementation returns an empty string.
Reimplemented from berry::Object.
Definition at line 67 of file berryCommandCategory.cpp.
References berry::HandleObject::defined, berry::NamedHandleObject::description, berry::NamedHandleObject::name, and berry::HandleObject::str.
|
overridevirtual |
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.
Definition at line 77 of file berryCommandCategory.cpp.
References berry::HandleObject::defined, berry::NamedHandleObject::description, berry::NamedHandleObject::name, and berry::HandleObject::str.