QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
|
An abstract class QIODevice-based sensor classes. More...
#include <qgsiodevicesensor.h>
Public Member Functions | |
QgsIODeviceSensor (QObject *parent=nullptr) | |
Constructor for a abstract QIODevice-based sensor, bound to the specified parent. More... | |
~QgsIODeviceSensor () override | |
QIODevice * | iODevice () const |
Returns the I/O device. More... | |
Public Member Functions inherited from QgsAbstractSensor | |
QgsAbstractSensor (QObject *parent=nullptr) | |
Constructor for an abstract sensor, bound to the specified parent. More... | |
virtual | ~QgsAbstractSensor ()=default |
void | connectSensor () |
Connects the sensor to its source. More... | |
QgsAbstractSensor::SensorData | data () const |
Returns the latest captured data from the sensor. More... | |
void | disconnectSensor () |
Disconnects the sensor from its source. More... | |
QString | errorString () const |
Returns the last error message. More... | |
QString | id () const |
Returns the sensor ID. More... | |
QString | name () const |
Returns the user-friendly name identifying the sensor. More... | |
virtual bool | readPropertiesFromElement (const QDomElement &element, const QDomDocument &document) |
Restores specific sensor type properties from a DOM element. More... | |
bool | readXml (const QDomElement &element, const QDomDocument &document) |
Restores generic sensor details from a DOM element. More... | |
void | setData (const QgsAbstractSensor::SensorData &data) |
Sets the latest captured data from the sensor. More... | |
void | setName (const QString &name) |
Sets the user-friendly name identfying the sensor. More... | |
void | setStatus (Qgis::DeviceConnectionStatus status) |
Sets the current sensor status. More... | |
Qgis::DeviceConnectionStatus | status () const |
Returns the current sensor status. More... | |
virtual QString | type () const |
Returns the sensor type. More... | |
virtual bool | writePropertiesToElement (QDomElement &element, QDomDocument &document) const |
Write specific sensor type properties into a DOM element. More... | |
bool | writeXml (QDomElement &parentElement, QDomDocument &document) const |
Write generic sensor properties into a DOM element. More... | |
Protected Slots | |
virtual void | parseData () |
Parses the data read from the device when available. More... | |
Protected Member Functions | |
void | initIODevice (QIODevice *device) |
Initiates the I/O device. More... | |
Protected Member Functions inherited from QgsAbstractSensor | |
virtual void | handleConnect ()=0 |
Handles the connection to the sensor. More... | |
virtual void | handleDisconnect ()=0 |
Handles the disconnection from the sensor. More... | |
Additional Inherited Members | |
Signals inherited from QgsAbstractSensor | |
void | dataChanged () |
Emitted when the captured sensor data has changed. More... | |
void | errorOccurred (const QString &errorString) |
Emitted when an error has occurred. The errorString describes the error. More... | |
void | nameChanged () |
Emitted when the sensor name has changed. More... | |
void | statusChanged () |
Emitted when the sensor status has changed. More... | |
Protected Attributes inherited from QgsAbstractSensor | |
QgsAbstractSensor::SensorData | mData |
QString | mErrorString |
An abstract class QIODevice-based sensor classes.
Definition at line 40 of file qgsiodevicesensor.h.
|
inlineexplicit |
Constructor for a abstract QIODevice-based sensor, bound to the specified parent.
Definition at line 50 of file qgsiodevicesensor.h.
|
override |
Definition at line 26 of file qgsiodevicesensor.cpp.
|
protected |
Initiates the I/O device.
Definition at line 30 of file qgsiodevicesensor.cpp.
QIODevice * QgsIODeviceSensor::iODevice | ( | ) | const |
Returns the I/O device.
Definition at line 40 of file qgsiodevicesensor.cpp.
|
protectedvirtualslot |
Parses the data read from the device when available.
Definition at line 45 of file qgsiodevicesensor.cpp.