QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
|
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. More... | |
Public Member Functions | |
QgsSensorGuiRegistry (const QgsSensorGuiRegistry &rh)=delete | |
QgsSensorGuiRegistry cannot be copied. More... | |
QgsSensorGuiRegistry (QObject *parent=nullptr) | |
Creates a new empty sensor GUI registry. More... | |
~QgsSensorGuiRegistry () override | |
bool | addSensorGuiMetadata (QgsSensorAbstractGuiMetadata *metadata) |
Registers the GUI metadata for a new sensor type. More... | |
QgsAbstractSensor * | createSensor (const QString &type, QObject *parent=nullptr) const |
Creates a new instance of a sensor given the type. More... | |
QgsAbstractSensorWidget * | createSensorWidget (QgsAbstractSensor *sensor) const |
Creates a new instance of a sensor configuration widget for the specified sensor. More... | |
QgsSensorGuiRegistry & | operator= (const QgsSensorGuiRegistry &rh)=delete |
QgsSensorGuiRegistry cannot be copied. More... | |
bool | populate () |
Populates the registry with standard sensor types. More... | |
QgsSensorAbstractGuiMetadata * | sensorMetadata (const QString &type) const |
Returns the metadata for the specified sensor type. More... | |
QMap< QString, QString > | sensorTypes () const |
Returns a list of sensor types handled by the registry. More... | |
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 181 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.