Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
berrySaveablesLifecycleEvent.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 
14 #ifndef BERRYSAVEABLESLIFECYCLEEVENT_H_
15 #define BERRYSAVEABLESLIFECYCLEEVENT_H_
16 
17 #include <berryMacros.h>
19 
20 #include "berrySaveable.h"
21 
22 #include <vector>
23 
24 namespace berry {
25 
30 {
31 
32 public:
33 
35 
39  static const int POST_OPEN; // = 1;
40 
45  static const int PRE_CLOSE; // = 2;
46 
50  static const int POST_CLOSE; // = 3;
51 
56  static const int DIRTY_CHANGED; // = 4;
57 
58 
59 private:
60 
61  int eventType;
62 
63  QList<Saveable::Pointer> saveables;
64 
65  bool force;
66 
67  bool veto;
68 
69  Object::Pointer source;
70 
71 
72 public:
73 
91  SaveablesLifecycleEvent(Object::Pointer source, int eventType,
92  const QList<Saveable::Pointer>& saveables, bool force);
93 
101  int GetEventType();
102 
103  Object::Pointer GetSource();
104 
110  QList<Saveable::Pointer> GetSaveables();
111 
118  bool IsVeto();
119 
124  void SetVeto(bool veto);
125 
132  bool IsForce();
133 
134 };
135 
136 }
137 
138 #endif /* BERRYSAVEABLESLIFECYCLEEVENT_H_ */
org_blueberry_ui_qt_Export.h
berry::SaveablesLifecycleEvent::DIRTY_CHANGED
static const int DIRTY_CHANGED
Definition: berrySaveablesLifecycleEvent.h:56
berrySaveable.h
berryMacros.h
berry::SmartPointer< Self >
berry::Object
Light weight base class for most BlueBerry classes.
Definition: berryObject.h:72
berry::SaveablesLifecycleEvent::POST_CLOSE
static const int POST_CLOSE
Definition: berrySaveablesLifecycleEvent.h:50
berry::SaveablesLifecycleEvent
Definition: berrySaveablesLifecycleEvent.h:29
BERRY_UI_QT
#define BERRY_UI_QT
Definition: org_blueberry_ui_qt_Export.h:26
berry::SaveablesLifecycleEvent::POST_OPEN
static const int POST_OPEN
Definition: berrySaveablesLifecycleEvent.h:39
berryObjectMacro
#define berryObjectMacro(...)
Definition: berryMacros.h:33
berry
Definition: QmitkPropertyItemModel.h:24
berry::SaveablesLifecycleEvent::PRE_CLOSE
static const int PRE_CLOSE
Definition: berrySaveablesLifecycleEvent.h:45