| 
    QGIS API Documentation 3.38.0-Grenoble (exported)
    
   | 
 
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 cannot be copied.   | |
| 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 | 
| QgsSensorGuiRegistry cannot be copied.   | |
| 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 22 of file qgssensorguiregistry.cpp.
      
  | 
  override | 
Definition at line 27 of file qgssensorguiregistry.cpp.
      
  | 
  delete | 
QgsSensorGuiRegistry cannot be copied.
| bool QgsSensorGuiRegistry::addSensorGuiMetadata | ( | QgsSensorAbstractGuiMetadata * | metadata | ) | 
Registers the GUI metadata for a new sensor type.
Takes ownership of the metadata instance.
Definition at line 74 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 84 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 96 of file qgssensorguiregistry.cpp.
      
  | 
  delete | 
QgsSensorGuiRegistry cannot be copied.
| 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 32 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 69 of file qgssensorguiregistry.cpp.
| QMap< QString, QString > QgsSensorGuiRegistry::sensorTypes | ( | ) | const | 
Returns a list of sensor types handled by the registry.
Definition at line 104 of file qgssensorguiregistry.cpp.