16#ifndef QGSSENSORREGISTRY_H
17#define QGSSENSORREGISTRY_H
48 QString
type()
const {
return mType; }
213 QMap<QString, QgsSensorAbstractMetadata *> mMetadata;
An abstract base class for sensors.
QgsSensorRegistry & operator=(const QgsSensorRegistry &rh)=delete
QgsSensorRegistry(const QgsSensorRegistry &rh)=delete
bool addSensorType(QgsSensorAbstractMetadata *metadata)
Registers a new sensor type.
bool populate()
Populates the registry with standard sensor types.
QgsSensorRegistry(QObject *parent=nullptr)
Creates a new empty item registry.
void sensorAdded(const QString &type, const QString &name)
Emitted whenever a new sensor type is added to the registry, with the specified type and visible name...
bool removeSensorType(const QString &type)
Removes a new a sensor type from the registry.
QgsSensorAbstractMetadata * sensorMetadata(const QString &type) const
Returns the metadata for the specified sensor type.
QgsAbstractSensor * createSensor(const QString &type, QObject *parent=nullptr) const
Creates a new instance of a sensor given the type.
QMap< QString, QString > sensorTypes() const
Returns a map of available sensor types to translated name.
std::function< QgsAbstractSensor *(QObject *parent)> QgsSensorCreateFunc
Sensor creation function.