A QAbstractItemModel subclass for showing sensors within a QgsSensorManager.
More...
#include <qgssensormodel.h>
|
| | QgsSensorModel (QgsSensorManager *manager, QObject *parent=nullptr) |
| | Constructor for QgsSensorModel, for the specified manager and parent object.
|
| |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
| |
| QVariant | data (const QModelIndex &index, int role) const override |
| |
| Qt::ItemFlags | flags (const QModelIndex &index) const override |
| |
| QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
| |
| QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const override |
| |
| QModelIndex | parent (const QModelIndex &index) const override |
| |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
| |
| bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override |
| |
A QAbstractItemModel subclass for showing sensors within a QgsSensorManager.
- Since
- QGIS 3.32
Definition at line 32 of file qgssensormodel.h.
◆ Column
Model columns.
| Enumerator |
|---|
| Name | Name.
|
| LastValue | Last value.
|
Definition at line 39 of file qgssensormodel.h.
◆ CustomRole
Custom model roles.
- Note
- Prior to QGIS 3.36 this was available as QgsSensorModel::Role
- Since
- QGIS 3.36
| Enumerator |
|---|
| SensorType | Sensor type.
|
| SensorId | Sensor id.
|
| SensorName | Sensor name.
|
| SensorStatus | Sensor status (disconnected, connected, etc.)
|
| SensorLastValue | Sensor last captured value.
|
| SensorLastTimestamp | Sensor timestamp of last captured value.
|
| Sensor | Sensor object pointer.
|
Definition at line 53 of file qgssensormodel.h.
◆ QgsSensorModel()
| QgsSensorModel::QgsSensorModel |
( |
QgsSensorManager * |
manager, |
|
|
QObject * |
parent = nullptr |
|
) |
| |
|
explicit |
◆ columnCount()
| int QgsSensorModel::columnCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
override |
◆ data()
| QVariant QgsSensorModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role |
|
) |
| const |
|
override |
◆ flags()
| Qt::ItemFlags QgsSensorModel::flags |
( |
const QModelIndex & |
index | ) |
const |
|
override |
◆ headerData()
| QVariant QgsSensorModel::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
override |
◆ index()
| QModelIndex QgsSensorModel::index |
( |
int |
row, |
|
|
int |
column, |
|
|
const QModelIndex & |
parent = QModelIndex() |
|
) |
| const |
|
override |
◆ parent()
| QModelIndex QgsSensorModel::parent |
( |
const QModelIndex & |
index | ) |
const |
|
override |
◆ rowCount()
| int QgsSensorModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
override |
◆ setData()
| bool QgsSensorModel::setData |
( |
const QModelIndex & |
index, |
|
|
const QVariant & |
value, |
|
|
int |
role = Qt::EditRole |
|
) |
| |
|
override |
The documentation for this class was generated from the following files: