Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
berry::PropertyChangeEvent Class Reference

#include <berryPropertyChangeEvent.h>

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

Public Member Functions

 berryObjectMacro (PropertyChangeEvent)
 
 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
 

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 41 of file berryPropertyChangeEvent.h.

Constructor & Destructor Documentation

◆ PropertyChangeEvent()

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

Member Function Documentation

◆ berryObjectMacro()

berry::PropertyChangeEvent::berryObjectMacro ( PropertyChangeEvent  )

◆ GetNewValue()

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

◆ GetOldValue()

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

◆ GetProperty()

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

◆ GetSource()

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

Returns the object whose property has changed

Returns
the object whose property has changed

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