1#ifndef XF_EVENT_QUEUE_DEFAULT_QT_H
2#define XF_EVENT_QUEUE_DEFAULT_QT_H
4#include "config/xf-config.h"
6#if (USE_XF_IDF_QT_EVENT_QUEUE_CLASS != 0)
10#include <QWaitCondition>
12#include "xf/interface/eventqueue.h"
29 bool empty()
const override;
30 bool push(
const XFEvent * pEvent,
bool fromISR =
false)
override;
Base class for all types of events and timeouts.
Definition: event.h:23
Default Qt implementation for the XFEventQueue interface.
Definition: eventqueue.h:22
bool empty() const override
Returns true if no event is in the queue.
Definition: eventqueue.cpp:19
QWaitCondition newEvents_
Wait condition to let thread wait until a new event arrives.
Definition: eventqueue.h:39
EventQueue queue_
Internal queue holding the events.
Definition: eventqueue.h:40
void pop() override
Pops the next event from the queue.
Definition: eventqueue.cpp:39
bool pend() override
Wait for the next event to arrive. Returns true if an event is in the queue.
Definition: eventqueue.cpp:45
QMutex mutex_
Mutex (non-recursive) protecting access to _queue.
Definition: eventqueue.h:38
const XFEvent * front() override
Returns pointer to next event to pop.
Definition: eventqueue.cpp:34
bool push(const XFEvent *pEvent, bool fromISR=false) override
Pushes the given event onto the queue. Returns false if the event could not be pushed.
Definition: eventqueue.cpp:24
QQueue< const XFEvent * > EventQueue
Type of the event queue.
Definition: eventqueue.h:36
Interface to be implemented by the event queue.
Definition: eventqueue.h:12