Class: QgsIODeviceSensor

class qgis.core.QgsIODeviceSensor

Bases: QgsAbstractSensor

An abstract class QIODevice-based sensor classes

Added in version 3.32.

QgsIODeviceSensor(parent: Optional[QObject] = None) Constructor for a abstract QIODevice-based sensor, bound to the specified parent.

Methods

childEvent

connectNotify

customEvent

disconnectNotify

handleConnect

Handles the connection to the sensor.

handleDisconnect

Handles the disconnection from the sensor.

iODevice

Returns the I/O device.

initIODevice

Initiates the I/O device.

isSignalConnected

parseData

Parses the data read from the device when available.

receivers

sender

senderSignalIndex

timerEvent

childEvent(self, a0: QChildEvent | None)
connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent | None)
disconnectNotify(self, signal: QMetaMethod)
handleConnect(self)

Handles the connection to the sensor.

Note

Triggered by calling connectSensor()

handleDisconnect(self)

Handles the disconnection from the sensor.

Note

Triggered by calling disconnectSensor()

iODevice(self) QIODevice | None

Returns the I/O device.

Return type:

Optional[QIODevice]

initIODevice(self, device: QIODevice | None)

Initiates the I/O device.

Note

Takes ownership of the device.

Parameters:

device (Optional[QIODevice])

isSignalConnected(self, signal: QMetaMethod) bool
parseData(self)

Parses the data read from the device when available.

receivers(self, signal: PYQT_SIGNAL) int
sender(self) QObject | None
senderSignalIndex(self) int
timerEvent(self, a0: QTimerEvent | None)