Medical Imaging Interaction Toolkit
2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
|
#include <berrySaveablesLifecycleEvent.h>
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::Pointer > | GetSaveables () |
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::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 |
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< 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 |
Event object describing a change to a set of Saveable objects.
Definition at line 29 of file berrySaveablesLifecycleEvent.h.
berry::SaveablesLifecycleEvent::SaveablesLifecycleEvent | ( | Object::Pointer | source, |
int | eventType, | ||
const QList< Saveable::Pointer > & | saveables, | ||
bool | force | ||
) |
Creates a new SaveablesLifecycleEvent.
source | The source of the event. If an ISaveablesSource notifies about changes to the saveables returned by ISaveablesSource::getSaveables() , the source must be the ISaveablesSource object. |
eventType | the event type, currently one of POST_OPEN, PRE_CLOSE, POST_CLOSE, DIRTY_CHANGED |
saveables | The affected saveables |
force | true if the event type is PRE_CLOSE and this is a closed force that cannot be canceled. |
berry::SaveablesLifecycleEvent::berryObjectMacro | ( | SaveablesLifecycleEvent | ) |
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.
QList<Saveable::Pointer> berry::SaveablesLifecycleEvent::GetSaveables | ( | ) |
Returns the affected saveables.
Object::Pointer berry::SaveablesLifecycleEvent::GetSource | ( | ) |
bool berry::SaveablesLifecycleEvent::IsForce | ( | ) |
Sets the force flag. This value is ignored for POST_OPEN, POST_CLOSE, and DIRTY_CHANGED.
bool berry::SaveablesLifecycleEvent::IsVeto | ( | ) |
Returns the veto. This value is ignored for POST_OPEN,POST_CLOSE, and DIRTY_CHANGED.
void berry::SaveablesLifecycleEvent::SetVeto | ( | bool | veto | ) |
veto | The veto to set. |
|
static |
Event type constant specifying that the dirty state of the given saveables has changed.
Definition at line 56 of file berrySaveablesLifecycleEvent.h.
|
static |
Event type constant specifying that the given saveables have been closed.
Definition at line 50 of file berrySaveablesLifecycleEvent.h.
|
static |
Event type constant specifying that the given saveables have been opened.
Definition at line 39 of file berrySaveablesLifecycleEvent.h.
|
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.