QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
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.
 

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

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 23 of file qgssensorguiregistry.cpp.

◆ ~QgsSensorGuiRegistry()

QgsSensorGuiRegistry::~QgsSensorGuiRegistry ( )
override

Definition at line 28 of file qgssensorguiregistry.cpp.

◆ QgsSensorGuiRegistry() [2/2]

QgsSensorGuiRegistry::QgsSensorGuiRegistry ( const QgsSensorGuiRegistry rh)
delete

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 75 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 85 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 97 of file qgssensorguiregistry.cpp.

◆ operator=()

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

◆ 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 33 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 70 of file qgssensorguiregistry.cpp.

◆ sensorTypes()

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

Returns a list of sensor types handled by the registry.

Definition at line 105 of file qgssensorguiregistry.cpp.


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