CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
ctkEvent.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 CTKEVENT_H
23 #define CTKEVENT_H
24 
25 #include "ctkPluginFrameworkExport.h"
26 
27 #include <QMap>
28 #include <QVariant>
29 #include <QStringList>
30 
31 #include <ctkLDAPSearchFilter.h>
32 
33 
34 class ctkEventData;
35 
44 class CTK_PLUGINFW_EXPORT ctkEvent
45 {
46 
47  QSharedDataPointer<ctkEventData> d;
48 
49 public:
50 
54  ctkEvent();
55 
56  ~ctkEvent();
57 
65  bool isNull() const;
66 
74  ctkEvent(const QString& topic, const ctkDictionary& properties = ctkDictionary());
75  ctkEvent(const ctkEvent& event);
76 
77  ctkEvent& operator=(const ctkEvent& other);
78 
90  bool operator==(const ctkEvent& other) const;
91 
99  QVariant getProperty(const QString& name) const;
100 
110  bool containsProperty(const QString& name) const;
111 
118  QStringList getPropertyNames() const;
119 
125  const QString& getTopic() const;
126 
135  bool matches(const ctkLDAPSearchFilter& filter) const;
136 
137 };
138 
140 
141 #endif // CTKEVENT_H
Q_DECLARE_METATYPE(ctkDICOMPersonName)
QHash< QString, QVariant > ctkDictionary
Definition: ctkDictionary.h:37
bool CTK_PLUGINFW_EXPORT operator==(const ctkConfigurationPtr &c1, const ctkConfigurationPtr c2)