Medical Imaging Interaction Toolkit  2016.11.0
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) static const int POST_OPEN
 
 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 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 33 of file berrySaveablesLifecycleEvent.h.

Constructor & Destructor Documentation

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.

Definition at line 27 of file berrySaveablesLifecycleEvent.cpp.

Member Function Documentation

berry::SaveablesLifecycleEvent::berryObjectMacro ( SaveablesLifecycleEvent  ) const

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

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

Definition at line 36 of file berrySaveablesLifecycleEvent.cpp.

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

Returns the affected saveables.

Returns
the saveables

Definition at line 46 of file berrySaveablesLifecycleEvent.cpp.

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

Definition at line 41 of file berrySaveablesLifecycleEvent.cpp.

bool berry::SaveablesLifecycleEvent::IsForce ( )

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

Returns
Returns the force.

Definition at line 61 of file berrySaveablesLifecycleEvent.cpp.

bool berry::SaveablesLifecycleEvent::IsVeto ( )

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

Returns
Returns the veto.

Definition at line 51 of file berrySaveablesLifecycleEvent.cpp.

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

Definition at line 56 of file berrySaveablesLifecycleEvent.cpp.

Member Data Documentation

const int berry::SaveablesLifecycleEvent::DIRTY_CHANGED
static

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

Definition at line 60 of file berrySaveablesLifecycleEvent.h.

const int berry::SaveablesLifecycleEvent::POST_CLOSE
static

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

Definition at line 54 of file berrySaveablesLifecycleEvent.h.

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 49 of file berrySaveablesLifecycleEvent.h.


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