#include <Libs/PluginFramework/service/event/ctkEvent.h>
A CTK event.
ctkEvent
objects are delivered to ctkEventHandler
or Qt slots which subscribe to the topic of the event.
Definition at line 44 of file ctkEvent.h.
Default constructor for use with the Qt meta object system.
Constructs an event.
- Parameters
-
topic | The topic of the event. |
properties | The event's properties (may be empty). |
- Exceptions
-
ctkEvent::ctkEvent |
( |
const ctkEvent & |
event | ) |
|
bool ctkEvent::containsProperty |
( |
const QString & |
name | ) |
const |
Indicate the presence of an event property. The event topic is present using the property name "event.topics".
- Parameters
-
name | The name of the property. |
- Returns
true
if a property with the specified name is in the event. This property may have an invalid QVariant value. false
otherwise.
QVariant ctkEvent::getProperty |
( |
const QString & |
name | ) |
const |
Retrieve the value of an event property. The event topic may be retrieved with the property name "event.topics".
- Parameters
-
name | the name of the property to retrieve |
- Returns
- The value of the property, or an invalid QVariant if not found.
QStringList ctkEvent::getPropertyNames |
( |
| ) |
const |
Returns a list of this event's property names. The list will include the event topic property name "event.topics".
- Returns
- A non-empty list with one element per property.
const QString& ctkEvent::getTopic |
( |
| ) |
const |
Returns the topic of this event.
- Returns
- The topic of this event.
bool ctkEvent::isNull |
( |
| ) |
const |
Can be used to check if this ctkEvent instance is valid, or if it has been constructed using the default constructor.
- Returns
true
if this event object is valid, false
otherwise.
Tests this event's properties against the given filter using a case sensitive match.
- Parameters
-
filter | The filter to test. |
- Returns
- true If this event's properties match the filter, false otherwise.
bool ctkEvent::operator== |
( |
const ctkEvent & |
other | ) |
const |
Compares this ctkEvent
object to another object.
An event is considered to be equal to another event if the topic is equal and the properties are equal.
- Parameters
-
other | The ctkEvent object to be compared. |
- Returns
true
if other
is equal to this object; false
otherwise.
The documentation for this class was generated from the following file: