Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <berryPropertyChangeEvent.h>
Public Member Functions | |
PropertyChangeEvent (Object::Pointer source, const QString &property, Object::Pointer oldValue, Object::Pointer newValue) | |
Object::Pointer | GetNewValue () |
Object::Pointer | GetOldValue () |
QString | GetProperty () |
Object::Pointer | GetSource () |
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 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 |
Public Attributes | |
berryObjectMacro(PropertyChangeEvent) private Object::Pointer | oldValue |
Object::Pointer | newValue |
Object::Pointer | source |
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 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 |
An event object describing a change to a named property.
This concrete class was designed to be instantiated, but may also be subclassed if required.
The JFace frameworks contain classes that report property change events for internal state changes that may be of interest to external parties. A special listener interface (IPropertyChangeListener
) is defined for this purpose, and a typical class allow listeners to be registered via an addPropertyChangeListener
method.
Definition at line 45 of file berryPropertyChangeEvent.h.
berry::PropertyChangeEvent::PropertyChangeEvent | ( | Object::Pointer | source, |
const QString & | property, | ||
Object::Pointer | oldValue, | ||
Object::Pointer | newValue | ||
) |
Creates a new property change event.
source | the object whose property has changed |
property | the property that has changed (must not be null ) |
oldValue | the old value of the property, or null if none |
newValue | the new value of the property, or null if none |
Definition at line 22 of file berryPropertyChangeEvent.cpp.
Object::Pointer berry::PropertyChangeEvent::GetNewValue | ( | ) |
Returns the new value of the property.
null
if not known or not relevant (for instance if the property was removed). Definition at line 32 of file berryPropertyChangeEvent.cpp.
References newValue.
Object::Pointer berry::PropertyChangeEvent::GetOldValue | ( | ) |
Returns the old value of the property.
null
if not known or not relevant (for instance if the property was just added and there was no old value). Definition at line 37 of file berryPropertyChangeEvent.cpp.
References oldValue.
QString berry::PropertyChangeEvent::GetProperty | ( | ) |
Returns the name of the property that changed.
Warning: there is no guarantee that the property name returned is a constant string. Callers must compare property names using equals, not ==.
Definition at line 42 of file berryPropertyChangeEvent.cpp.
Object::Pointer berry::PropertyChangeEvent::GetSource | ( | ) |
Returns the object whose property has changed
Definition at line 47 of file berryPropertyChangeEvent.cpp.
References source.
Object::Pointer berry::PropertyChangeEvent::newValue |
The new value of the changed property, or null
if not known or not relevant.
Definition at line 69 of file berryPropertyChangeEvent.h.
Referenced by GetNewValue(), and PropertyChangeEvent().
berryObjectMacro (PropertyChangeEvent) private Object::Pointer berry::PropertyChangeEvent::oldValue |
The name of the changed property. The old value of the changed property, or null
if not known or not relevant.
Definition at line 50 of file berryPropertyChangeEvent.h.
Referenced by GetOldValue(), and PropertyChangeEvent().
Object::Pointer berry::PropertyChangeEvent::source |
The object on which the property change occured
Definition at line 74 of file berryPropertyChangeEvent.h.
Referenced by GetSource(), and PropertyChangeEvent().