CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
ctkBusEvent.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 #ifndef CTKBUSEVENT_H
22 #define CTKBUSEVENT_H
23 
24 #include "org_commontk_eventbus_Export.h"
25 #include "ctkPluginFrameworkExport.h"
26 #include <service/event/ctkEvent.h>
27 
28 #include <QMap>
29 #include <QVariant>
30 #include <QStringList>
31 
32 class ctkBusEventData;
33 
40 class org_commontk_eventbus_EXPORT ctkBusEvent : public ctkEvent
41 {
42  QSharedDataPointer<ctkBusEventData> d;
43 
44 public:
45 
50 
52 
60  ctkBusEvent(const QString& topic, const ctkDictionary& properties = ctkDictionary());
61  ctkBusEvent(const ctkBusEvent& event);
62  ctkBusEvent(QString topic, int event_type, int signature_type, QObject *objectPointer, QString signature);
63 
65 
71  void setEventType(int et);
72  int eventType() const;
73  bool isEventLocal() const;
74 
81  void setEventTopic(QString topic);
82 
83  QString eventTopic() const;
84 
90  QVariant &operator[](QString key);
91 };
92 
93 #endif // CTKBUSEVENT_H
ctkBusEvent::setEventTopic
void setEventTopic(QString topic)
ctkDictionary
QHash< QString, QVariant > ctkDictionary
Definition: ctkDictionary.h:37
ctkBusEvent::ctkBusEvent
ctkBusEvent()
ctkBusEvent::ctkBusEvent
ctkBusEvent(const QString &topic, const ctkDictionary &properties=ctkDictionary())
ctkEvent.h
ctkBusEvent::ctkBusEvent
ctkBusEvent(const ctkBusEvent &event)
ctkBusEvent::setEventType
void setEventType(int et)
ctkBusEvent::isEventLocal
bool isEventLocal() const
ctkEvent
Definition: ctkEvent.h:45
ctkBusEvent::~ctkBusEvent
~ctkBusEvent()
QHash
Definition: ctkCmdLineModuleFrontend.h:29
ctkBusEvent::operator[]
QVariant & operator[](QString key)
ctkBusEvent::operator=
ctkBusEvent & operator=(const ctkBusEvent &event)
ctkBusEvent
Definition: ctkBusEvent.h:41
ctkBusEvent::eventTopic
QString eventTopic() const
ctkBusEvent::eventType
int eventType() const
ctkBusEvent::ctkBusEvent
ctkBusEvent(QString topic, int event_type, int signature_type, QObject *objectPointer, QString signature)