libpromeki main
PROfessional MEdia toolKIt
 
Loading...
Searching...
No Matches
TimerEvent Class Reference

Event delivered when a timer fires. More...

#include <timerevent.h>

Inheritance diagram for TimerEvent:
Collaboration diagram for TimerEvent:

Public Member Functions

 TimerEvent (int timerId)
 Constructs a TimerEvent for the given timer.
 
int timerId () const
 Returns the ID of the timer that fired.
 
- Public Member Functions inherited from Event
 Event (Type type)
 Constructs an Event with the given type.
 
virtual ~Event ()=default
 Virtual destructor.
 
Type type () const
 Returns the type identifier for this event.
 
bool isAccepted () const
 Returns whether this event has been accepted.
 
void accept ()
 Marks the event as accepted.
 
void ignore ()
 Marks the event as ignored (not accepted).
 

Additional Inherited Members

- Public Types inherited from Event
using Type = uint32_t
 Integer type used to identify event kinds.
 
- Static Public Member Functions inherited from Event
static Type registerType ()
 Allocates and returns a unique event type ID.
 
- Static Public Attributes inherited from Event
static constexpr Type InvalidType = 0
 Sentinel value representing an invalid or unset event type.
 
static const Type Timer
 Event type for TimerEvent.
 
static const Type DeferredCall
 Event type for deferred callable delivery.
 
static const Type SignalEvent
 Event type for cross-thread signal dispatch.
 
static const Type Quit
 Event type requesting an EventLoop to quit.
 

Detailed Description

Event delivered when a timer fires.

Carries the timer ID so that the receiver can identify which timer triggered the event. Delivered to ObjectBase::timerEvent() by the EventLoop.

Constructor & Destructor Documentation

◆ TimerEvent()

TimerEvent::TimerEvent ( int  timerId)
inline

Constructs a TimerEvent for the given timer.

Parameters
timerIdThe ID of the timer that fired.

Member Function Documentation

◆ timerId()

int TimerEvent::timerId ( ) const
inline

Returns the ID of the timer that fired.

Returns
The timer ID.

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