16#ifndef QGSSENSORMODEL_H
17#define QGSSENSORMODEL_H
22#include <QAbstractItemModel>
48 SensorType = Qt::UserRole + 1,
62 QVariant data(
const QModelIndex &index,
int role )
const override;
63 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole )
override;
64 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
65 QVariant headerData(
int section, Qt::Orientation orientation,
66 int role = Qt::DisplayRole )
const override;
67 QModelIndex index(
int row,
int column,
68 const QModelIndex &parent = QModelIndex() )
const override;
69 QModelIndex parent(
const QModelIndex &index )
const override;
70 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
71 int columnCount(
const QModelIndex &parent = QModelIndex() )
const override;
75 void sensorAdded(
const QString &
id );
76 void sensorRemoved(
const QString &
id );
77 void sensorNameChanged(
const QString &
id );
78 void sensorStatusChanged(
const QString &
id );
79 void sensorDataCaptured(
const QString &
id );
84 QStringList mSensorIds;
A QAbstractItemModel subclass for showing sensors within a QgsSensorManager.
@ SensorStatus
Sensor status (disconnected, connected, etc.)
@ SensorLastValue
Sensor last captured value.
@ Sensor
Sensor object pointer.
@ SensorLastTimestamp
Sensor timestamp of last captured value.