Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berrySaveablesLifecycleEvent.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 BlueBerry Platform
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 
18 #ifndef BERRYSAVEABLESLIFECYCLEEVENT_H_
19 #define BERRYSAVEABLESLIFECYCLEEVENT_H_
20 
21 #include <berryMacros.h>
23 
24 #include "berrySaveable.h"
25 
26 #include <vector>
27 
28 namespace berry {
29 
34 {
35 
36 public:
37 
39 
40 
43  static const int POST_OPEN; // = 1;
44 
49  static const int PRE_CLOSE; // = 2;
50 
54  static const int POST_CLOSE; // = 3;
55 
60  static const int DIRTY_CHANGED; // = 4;
61 
62 
63 private:
64 
65  int eventType;
66 
67  QList<Saveable::Pointer> saveables;
68 
69  bool force;
70 
71  bool veto;
72 
73  Object::Pointer source;
74 
75 
76 public:
77 
95  SaveablesLifecycleEvent(Object::Pointer source_, int eventType_,
96  const QList<Saveable::Pointer>& saveables_, bool force_);
97 
105  int GetEventType();
106 
107  Object::Pointer GetSource();
108 
114  QList<Saveable::Pointer> GetSaveables();
115 
122  bool IsVeto();
123 
128  void SetVeto(bool veto);
129 
136  bool IsForce();
137 
138 };
139 
140 }
141 
142 #endif /* BERRYSAVEABLESLIFECYCLEEVENT_H_ */
Light weight base class for most BlueBerry classes.
Definition: berryObject.h:78
#define berryObjectMacro(...)
Definition: berryMacros.h:37
#define BERRY_UI_QT