CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
ctkServiceEvent.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  Library: CTK
4 
5  Copyright (c) German Cancer Research Center,
6  Division of Medical and Biological Informatics
7 
8  Licensed under the Apache License, Version 2.0 (the "License");
9  you may not use this file except in compliance with the License.
10  You may obtain a copy of the License at
11 
12  http://www.apache.org/licenses/LICENSE-2.0
13 
14  Unless required by applicable law or agreed to in writing, software
15  distributed under the License is distributed on an "AS IS" BASIS,
16  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  See the License for the specific language governing permissions and
18  limitations under the License.
19 
20 =============================================================================*/
21 
22 #ifndef CTKSERVICEEVENT_H
23 #define CTKSERVICEEVENT_H
24 
25 #ifdef REGISTERED
26 #error Try to reorder include files (this one first)\
27  or write #undef REGISTERED before including this header.\
28  Cause of this problem may be dcmimage.h, which indirectly\
29  includes windows.h.
30 #endif
31 
32 #include <QSharedDataPointer>
33 #include <QDebug>
34 #include <QMetaType>
35 
36 #include "ctkPluginFrameworkExport.h"
37 #include "ctkServiceReference.h"
38 
39 class ctkServiceEventData;
40 
51 class CTK_PLUGINFW_EXPORT ctkServiceEvent
52 {
53 
54  QSharedDataPointer<ctkServiceEventData> d;
55 
56 public:
57 
58  enum Type {
59 
68  REGISTERED = 0x00000001,
69 
78  MODIFIED = 0x00000002,
79 
96  UNREGISTERING = 0x00000004,
97 
110  MODIFIED_ENDMATCH = 0x00000008
111 
112  };
113 
117  ctkServiceEvent();
118 
119  ~ctkServiceEvent();
120 
128  bool isNull() const;
129 
137  ctkServiceEvent(Type type, const ctkServiceReference& reference);
138 
139  ctkServiceEvent(const ctkServiceEvent& other);
140 
141  ctkServiceEvent& operator=(const ctkServiceEvent& other);
142 
151  ctkServiceReference getServiceReference() const;
152 
164  Type getType() const;
165 
166 };
167 
169 
170 
174 CTK_PLUGINFW_EXPORT QDebug operator<<(QDebug dbg, ctkServiceEvent::Type type);
175 CTK_PLUGINFW_EXPORT QDebug operator<<(QDebug dbg, const ctkServiceEvent& event);
178 #endif // CTKSERVICEEVENT_H
operator<<
CTK_PLUGINFW_EXPORT QDebug operator<<(QDebug dbg, ctkServiceEvent::Type type)
ctkServiceReference.h
ctkServiceReference
Definition: ctkServiceReference.h:68
ctkServiceEvent
Definition: ctkServiceEvent.h:51
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(ctkDICOMPersonName)
ctkWrapPythonQt.type
type
Definition: ctkWrapPythonQt.py:214
ctkServiceEvent::Type
Type
Definition: ctkServiceEvent.h:58