QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
Registry of available sensor GUI behavior. More...
#include <qgssensorguiregistry.h>
Signals | |
void | sensorAdded (const QString &type, const QString &name) |
Emitted whenever a new sensor type is added to the registry, with the specified type. | |
Public Member Functions | |
QgsSensorGuiRegistry (const QgsSensorGuiRegistry &rh)=delete | |
QgsSensorGuiRegistry (QObject *parent=nullptr) | |
Creates a new empty sensor GUI registry. | |
~QgsSensorGuiRegistry () override | |
bool | addSensorGuiMetadata (QgsSensorAbstractGuiMetadata *metadata) |
Registers the GUI metadata for a new sensor type. | |
QgsAbstractSensor * | createSensor (const QString &type, QObject *parent=nullptr) const |
Creates a new instance of a sensor given the type. | |
QgsAbstractSensorWidget * | createSensorWidget (QgsAbstractSensor *sensor) const |
Creates a new instance of a sensor configuration widget for the specified sensor. | |
QgsSensorGuiRegistry & | operator= (const QgsSensorGuiRegistry &rh)=delete |
bool | populate () |
Populates the registry with standard sensor types. | |
QgsSensorAbstractGuiMetadata * | sensorMetadata (const QString &type) const |
Returns the metadata for the specified sensor type. | |
QMap< QString, QString > | sensorTypes () const |
Returns a list of sensor types handled by the registry. | |
Registry of available sensor GUI behavior.
QgsSensorGuiRegistry is not usually directly created, but rather accessed through QgsGui::sensorGuiRegistry().
This acts as a companion to QgsSensorRegistry, handling only the components related to the GUI behavior of sensors.
Definition at line 180 of file qgssensorguiregistry.h.
QgsSensorGuiRegistry::QgsSensorGuiRegistry | ( | QObject * | parent = nullptr | ) |
Creates a new empty sensor GUI registry.
QgsSensorGuiRegistry is not usually directly created, but rather accessed through QgsGui::sensorGuiRegistry().
Definition at line 23 of file qgssensorguiregistry.cpp.
|
override |
Definition at line 28 of file qgssensorguiregistry.cpp.
|
delete |
bool QgsSensorGuiRegistry::addSensorGuiMetadata | ( | QgsSensorAbstractGuiMetadata * | metadata | ) |
Registers the GUI metadata for a new sensor type.
Takes ownership of the metadata instance.
Definition at line 60 of file qgssensorguiregistry.cpp.
QgsAbstractSensor * QgsSensorGuiRegistry::createSensor | ( | const QString & | type, |
QObject * | parent = nullptr |
||
) | const |
Creates a new instance of a sensor given the type.
Definition at line 70 of file qgssensorguiregistry.cpp.
QgsAbstractSensorWidget * QgsSensorGuiRegistry::createSensorWidget | ( | QgsAbstractSensor * | sensor | ) | const |
Creates a new instance of a sensor configuration widget for the specified sensor.
The sensor doesn't need to live for the duration of the widget, it is only used when creating the configuration widget to match a sensor type and initiate the widget to match the sensor settings.
Definition at line 82 of file qgssensorguiregistry.cpp.
|
delete |
bool QgsSensorGuiRegistry::populate | ( | ) |
Populates the registry with standard sensor types.
If called on a non-empty registry then this will have no effect and will return false
.
Definition at line 33 of file qgssensorguiregistry.cpp.
|
signal |
Emitted whenever a new sensor type is added to the registry, with the specified type.
QgsSensorAbstractGuiMetadata * QgsSensorGuiRegistry::sensorMetadata | ( | const QString & | type | ) | const |
Returns the metadata for the specified sensor type.
Returns nullptr
if a corresponding sensor type was not found in the registry.
Definition at line 55 of file qgssensorguiregistry.cpp.
QMap< QString, QString > QgsSensorGuiRegistry::sensorTypes | ( | ) | const |
Returns a list of sensor types handled by the registry.
Definition at line 90 of file qgssensorguiregistry.cpp.