C
QSafeEvent Class
(SafeRenderer::QSafeEvent)The QSafeEvent class provides a base class for the Qt Safe Renderer events. More...
Header: | #include <QSafeEvent> |
Since: | QtSafeRenderer 1.0 |
Inherited By: | SafeRenderer::QSafeEventChangeLayout, SafeRenderer::QSafeEventConnection, SafeRenderer::QSafeEventHeartbeat, SafeRenderer::QSafeEventHeartbeatTimeout, SafeRenderer::QSafeEventPosition, SafeRenderer::QSafeEventSystem, and SafeRenderer::QSafeEventVisibility |
Public Types
enum | Exception { OutOfBounds } |
Public Functions
QSafeEvent(const EventId eventType = EventUndefined) | |
QSafeEvent(const QSafeEvent &other) | |
QSafeEvent(const quchar *eventData) | |
void | add(const quint32 value, const quint32 offset) |
const quchar * | data() const |
quint32 | get(const quint32 offset) const |
EventId | type() const |
Static Public Members
const quint32 | messageLength = 128U |
Detailed Description
The QSafeEvent class provides a base class for the Qt Safe Renderer events.
All the Qt Safe Renderer events are inherited from QSafeEvent. The QSafeEvent class packs the event parameters to the char
array.
Member Type Documentation
enum QSafeEvent::Exception
This enum describes the exception for the QSafeEvent
Constant | Value | Description |
---|---|---|
SafeRenderer::QSafeEvent::OutOfBounds | 0 | The offset of the data goes out of the reserved memory area. |
Member Function Documentation
QSafeEvent::QSafeEvent(const EventId eventType = EventUndefined)
Constructs a QSafeEvent object.
By default eventType is set to undefined.
This function was introduced in QtSafeRenderer 1.0.
QSafeEvent::QSafeEvent(const QSafeEvent &other)
Constructs a copy of other. The event's type and data are copied.
QSafeEvent::QSafeEvent(const quchar *eventData)
Constructs QSafeEvent and copies the type and event data from eventData, an array of length messageLength.
void QSafeEvent::add(const quint32 value, const quint32 offset)
Adds the quint32 value to the data container.
value is a quint32 value. offset is the position in the data structure.
The data is packed in bigEndian format to the char array. The maximum data length is 128 bytes.
In case of a failure, the following exception will be thrown:
Constant | Description |
---|---|
SafeRenderer::QSafeEvent::OutOfBounds | The offset of the data goes out of the reserved memory area. |
const quchar *QSafeEvent::data() const
Returns the pointer to the raw data.
quint32 QSafeEvent::get(const quint32 offset) const
Reads the quint32 value from the data container.
offset is the position in the data structure. The maximum offset value is 124.
EventId QSafeEvent::type() const
Returns the type of the event.
Member Variable Documentation
const quint32 QSafeEvent::messageLength = 128U
Length of the event parameter array.
Available under certain Qt licenses.
Find out more.