Medical Imaging Interaction Toolkit  2018.4.99-6aa36ba9
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 
36 
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_ */
Light weight base class for most BlueBerry classes.
Definition: berryObject.h:72
#define berryObjectMacro(...)
Definition: berryMacros.h:33
#define BERRY_UI_QT