Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berry::PropertyChangeEvent Class Reference

#include <berryPropertyChangeEvent.h>

Inheritance diagram for berry::PropertyChangeEvent:
Collaboration diagram for berry::PropertyChangeEvent:

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::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
 

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< 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

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.

See also
IPropertyChangeListener

Definition at line 45 of file berryPropertyChangeEvent.h.

Constructor & Destructor Documentation

berry::PropertyChangeEvent::PropertyChangeEvent ( Object::Pointer  source,
const QString &  property,
Object::Pointer  oldValue,
Object::Pointer  newValue 
)

Creates a new property change event.

Parameters
sourcethe object whose property has changed
propertythe property that has changed (must not be null)
oldValuethe old value of the property, or null if none
newValuethe new value of the property, or null if none

Definition at line 22 of file berryPropertyChangeEvent.cpp.

References newValue, oldValue, and source.

Member Function Documentation

Object::Pointer berry::PropertyChangeEvent::GetNewValue ( )

Returns the new value of the property.

Returns
the new value, or 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.

Returns
the old value, or 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 ==.

Returns
the name of the property that changed

Definition at line 42 of file berryPropertyChangeEvent.cpp.

Object::Pointer berry::PropertyChangeEvent::GetSource ( )

Returns the object whose property has changed

Returns
the object whose property has changed

Definition at line 47 of file berryPropertyChangeEvent.cpp.

References source.

Member Data Documentation

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().


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