#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.
◆ ctkEvent() [1/3]
Default constructor for use with the Qt meta object system.
◆ ~ctkEvent()
◆ ctkEvent() [2/3]
Constructs an event.
- Parameters
-
topic | The topic of the event. |
properties | The event's properties (may be empty). |
- Exceptions
-
◆ ctkEvent() [3/3]
ctkEvent::ctkEvent |
( |
const ctkEvent & |
event | ) |
|
◆ containsProperty()
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.
◆ getProperty()
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.
◆ getPropertyNames()
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.
◆ getTopic()
const QString& ctkEvent::getTopic |
( |
| ) |
const |
Returns the topic of this event.
- Returns
- The topic of this event.
◆ isNull()
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.
◆ matches()
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.
◆ operator=()
◆ operator==()
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: