QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
Signals | Public Member Functions | List of all members
QgsSensorGuiRegistry Class Reference

Registry of available sensor GUI behavior. More...

#include <qgssensorguiregistry.h>

Inheritance diagram for QgsSensorGuiRegistry:
Inheritance graph
[legend]

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...
 
QgsAbstractSensorcreateSensor (const QString &type, QObject *parent=nullptr) const
 Creates a new instance of a sensor given the type. More...
 
QgsAbstractSensorWidgetcreateSensorWidget (QgsAbstractSensor *sensor) const
 Creates a new instance of a sensor configuration widget for the specified sensor. More...
 
QgsSensorGuiRegistryoperator= (const QgsSensorGuiRegistry &rh)=delete
 QgsSensorGuiRegistry cannot be copied. More...
 
bool populate ()
 Populates the registry with standard sensor types. More...
 
QgsSensorAbstractGuiMetadatasensorMetadata (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...
 

Detailed Description

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.

Since
QGIS 3.32

Definition at line 180 of file qgssensorguiregistry.h.

Constructor & Destructor Documentation

◆ QgsSensorGuiRegistry() [1/2]

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.

◆ ~QgsSensorGuiRegistry()

QgsSensorGuiRegistry::~QgsSensorGuiRegistry ( )
override

Definition at line 27 of file qgssensorguiregistry.cpp.

◆ QgsSensorGuiRegistry() [2/2]

QgsSensorGuiRegistry::QgsSensorGuiRegistry ( const QgsSensorGuiRegistry rh)
delete

QgsSensorGuiRegistry cannot be copied.

Member Function Documentation

◆ addSensorGuiMetadata()

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.

◆ createSensor()

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.

◆ createSensorWidget()

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.

◆ operator=()

QgsSensorGuiRegistry & QgsSensorGuiRegistry::operator= ( const QgsSensorGuiRegistry rh)
delete

QgsSensorGuiRegistry cannot be copied.

◆ populate()

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.

◆ sensorAdded

void QgsSensorGuiRegistry::sensorAdded ( const QString &  type,
const QString &  name 
)
signal

Emitted whenever a new sensor type is added to the registry, with the specified type.

◆ sensorMetadata()

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.

◆ sensorTypes()

QMap< QString, QString > QgsSensorGuiRegistry::sensorTypes ( ) const

Returns a list of sensor types handled by the registry.

Definition at line 104 of file qgssensorguiregistry.cpp.


The documentation for this class was generated from the following files: