CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Public Member Functions | List of all members
ctkBusEvent Class Reference

#include <Plugins/org.commontk.eventbus/ctkBusEvent.h>

Inheritance diagram for ctkBusEvent:
Inheritance graph
[legend]
Collaboration diagram for ctkBusEvent:
Collaboration graph
[legend]

Public Member Functions

 ctkBusEvent ()
 
 ctkBusEvent (const ctkBusEvent &event)
 
 ctkBusEvent (const QString &topic, const ctkDictionary &properties=ctkDictionary())
 
 ctkBusEvent (QString topic, int event_type, int signature_type, QObject *objectPointer, QString signature)
 
QString eventTopic () const
 
int eventType () const
 
bool isEventLocal () const
 
ctkBusEventoperator= (const ctkBusEvent &event)
 
QVariant & operator[] (QString key)
 
void setEventTopic (QString topic)
 
void setEventType (int et)
 
 ~ctkBusEvent ()
 
- Public Member Functions inherited from ctkEvent
bool containsProperty (const QString &name) const
 
 ctkEvent ()
 
 ctkEvent (const ctkEvent &event)
 
 ctkEvent (const QString &topic, const ctkDictionary &properties=ctkDictionary())
 
QVariant getProperty (const QString &name) const
 
QStringList getPropertyNames () const
 
const QString & getTopic () const
 
bool isNull () const
 
bool matches (const ctkLDAPSearchFilter &filter) const
 
ctkEventoperator= (const ctkEvent &other)
 
bool operator== (const ctkEvent &other) const
 
 ~ctkEvent ()
 

Detailed Description

A CTK event.

ctkEvent objects are delivered to ctkEventHandler or Qt slots which subscribe to the topic of the event.

Definition at line 40 of file ctkBusEvent.h.

Constructor & Destructor Documentation

◆ ctkBusEvent() [1/4]

ctkBusEvent::ctkBusEvent ( )

Default constructor for use with the Qt meta object system.

◆ ~ctkBusEvent()

ctkBusEvent::~ctkBusEvent ( )

◆ ctkBusEvent() [2/4]

ctkBusEvent::ctkBusEvent ( const QString &  topic,
const ctkDictionary properties = ctkDictionary() 
)

Constructs an event.

Parameters
topicThe topic of the event.
propertiesThe event's properties (may be empty).
Exceptions
ctkInvalidArgumentExceptionIf topic is not a valid topic name.

◆ ctkBusEvent() [3/4]

ctkBusEvent::ctkBusEvent ( const ctkBusEvent event)

◆ ctkBusEvent() [4/4]

ctkBusEvent::ctkBusEvent ( QString  topic,
int  event_type,
int  signature_type,
QObject *  objectPointer,
QString  signature 
)

Member Function Documentation

◆ eventTopic()

QString ctkBusEvent::eventTopic ( ) const

◆ eventType()

int ctkBusEvent::eventType ( ) const

◆ isEventLocal()

bool ctkBusEvent::isEventLocal ( ) const

◆ operator=()

ctkBusEvent& ctkBusEvent::operator= ( const ctkBusEvent event)

◆ operator[]()

QVariant& ctkBusEvent::operator[] ( QString  key)

quick accessor for all the items

Parameters
keyRepresents the key associated to the value

◆ setEventTopic()

void ctkBusEvent::setEventTopic ( QString  topic)

accessor for topic

Parameters
topicRepresents the topic of the message

◆ setEventType()

void ctkBusEvent::setEventType ( int  et)

accessor for eventtype

Parameters
etThe eventtype can be local(ctkEventTypeLocal) or remote(ctkEventTypeRemote)

The documentation for this class was generated from the following file: