Medical Imaging Interaction Toolkit  2021.10.99-1c4db16f
Medical Imaging Interaction Toolkit
berry::SaveablesLifecycleEvent Class Reference

#include <berrySaveablesLifecycleEvent.h>

Inheritance diagram for berry::SaveablesLifecycleEvent:
Collaboration diagram for berry::SaveablesLifecycleEvent:

Public Member Functions

 berryObjectMacro (SaveablesLifecycleEvent)
 
 SaveablesLifecycleEvent (Object::Pointer source, int eventType, const QList< Saveable::Pointer > &saveables, bool force)
 
int GetEventType ()
 
Object::Pointer GetSource ()
 
QList< Saveable::PointerGetSaveables ()
 
bool IsVeto ()
 
void SetVeto (bool veto)
 
bool IsForce ()
 
- 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
 

Static Public Attributes

static const int POST_OPEN
 
static const int PRE_CLOSE
 
static const int POST_CLOSE
 
static const int DIRTY_CHANGED
 

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

Event object describing a change to a set of Saveable objects.

Definition at line 29 of file berrySaveablesLifecycleEvent.h.

Constructor & Destructor Documentation

◆ SaveablesLifecycleEvent()

berry::SaveablesLifecycleEvent::SaveablesLifecycleEvent ( Object::Pointer  source,
int  eventType,
const QList< Saveable::Pointer > &  saveables,
bool  force 
)

Creates a new SaveablesLifecycleEvent.

Parameters
sourceThe source of the event. If an ISaveablesSource notifies about changes to the saveables returned by ISaveablesSource::getSaveables() , the source must be the ISaveablesSource object.
eventTypethe event type, currently one of POST_OPEN, PRE_CLOSE, POST_CLOSE, DIRTY_CHANGED
saveablesThe affected saveables
forcetrue if the event type is PRE_CLOSE and this is a closed force that cannot be canceled.

Member Function Documentation

◆ berryObjectMacro()

berry::SaveablesLifecycleEvent::berryObjectMacro ( SaveablesLifecycleEvent  )

◆ GetEventType()

int berry::SaveablesLifecycleEvent::GetEventType ( )

Returns the eventType, currently one of POST_OPEN, PRE_CLOSE, POST_CLOSE, DIRTY_CHANGED. Listeners should silently ignore unknown event types since new event types might be added in the future.

Returns
the eventType

◆ GetSaveables()

QList<Saveable::Pointer> berry::SaveablesLifecycleEvent::GetSaveables ( )

Returns the affected saveables.

Returns
the saveables

◆ GetSource()

Object::Pointer berry::SaveablesLifecycleEvent::GetSource ( )

◆ IsForce()

bool berry::SaveablesLifecycleEvent::IsForce ( )

Sets the force flag. This value is ignored for POST_OPEN, POST_CLOSE, and DIRTY_CHANGED.

Returns
Returns the force.

◆ IsVeto()

bool berry::SaveablesLifecycleEvent::IsVeto ( )

Returns the veto. This value is ignored for POST_OPEN,POST_CLOSE, and DIRTY_CHANGED.

Returns
Returns the veto.

◆ SetVeto()

void berry::SaveablesLifecycleEvent::SetVeto ( bool  veto)
Parameters
vetoThe veto to set.

Member Data Documentation

◆ DIRTY_CHANGED

const int berry::SaveablesLifecycleEvent::DIRTY_CHANGED
static

Event type constant specifying that the dirty state of the given saveables has changed.

Definition at line 56 of file berrySaveablesLifecycleEvent.h.

◆ POST_CLOSE

const int berry::SaveablesLifecycleEvent::POST_CLOSE
static

Event type constant specifying that the given saveables have been closed.

Definition at line 50 of file berrySaveablesLifecycleEvent.h.

◆ POST_OPEN

const int berry::SaveablesLifecycleEvent::POST_OPEN
static

Event type constant specifying that the given saveables have been opened.

Definition at line 39 of file berrySaveablesLifecycleEvent.h.

◆ PRE_CLOSE

const int berry::SaveablesLifecycleEvent::PRE_CLOSE
static

Event type constant specifying that the given saveables are about to be closed. Listeners may veto the closing if isForce() is false.

Definition at line 45 of file berrySaveablesLifecycleEvent.h.


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