QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
Public Member Functions | Protected Attributes | List of all members
QgsSensorGuiMetadata Class Reference

Convenience metadata class that uses static functions to handle sensor GUI behavior. More...

#include <qgssensorguiregistry.h>

Inheritance diagram for QgsSensorGuiMetadata:
Inheritance graph
[legend]

Public Member Functions

 QgsSensorGuiMetadata (const QString &type, const QString &visibleName, const QIcon &creationIcon, const QgsSensorWidgetFunc &pfWidget=nullptr, const QgsSensorCreateFunc &pfCreateFunc=nullptr)
 Constructor for QgsSensorGuiMetadata with the specified class type and creationIcon, and function pointers for the configuration widget creation function. More...
 
QgsAbstractSensorcreateSensor (QObject *parent) override
 Creates an instance of the corresponding sensor type. More...
 
QgsAbstractSensorWidgetcreateSensorWidget (QgsAbstractSensor *sensor) override
 Creates a configuration widget for an sensor of this type. More...
 
QIcon creationIcon () const override
 Returns an icon representing creation of the sensor type. More...
 
QgsSensorCreateFunc sensorCreationFunction () const
 Returns the classes' sensor creation function. More...
 
void setSensorCreationFunction (const QgsSensorCreateFunc &function)
 Sets the classes' sensor creation function. More...
 
void setWidgetFunction (const QgsSensorWidgetFunc &function)
 Sets the classes' sensor configuration widget creation function. More...
 
QgsSensorWidgetFunc widgetFunction () const
 Returns the classes' configuration widget creation function. More...
 

Protected Attributes

QgsSensorCreateFunc mCreateFunc = nullptr
 
QIcon mIcon
 
QgsSensorWidgetFunc mWidgetFunc = nullptr
 

Detailed Description

Convenience metadata class that uses static functions to handle sensor GUI behavior.

Note
not available in Python bindings
Since
QGIS 3.0

Definition at line 111 of file qgssensorguiregistry.h.

Constructor & Destructor Documentation

◆ QgsSensorGuiMetadata()

QgsSensorGuiMetadata::QgsSensorGuiMetadata ( const QString &  type,
const QString &  visibleName,
const QIcon &  creationIcon,
const QgsSensorWidgetFunc pfWidget = nullptr,
const QgsSensorCreateFunc pfCreateFunc = nullptr 
)
inline

Constructor for QgsSensorGuiMetadata with the specified class type and creationIcon, and function pointers for the configuration widget creation function.

visibleName should be set to a translated, user visible name identifying the corresponding sensor.

Definition at line 121 of file qgssensorguiregistry.h.

Member Function Documentation

◆ createSensor()

QgsAbstractSensor * QgsSensorGuiMetadata::createSensor ( QObject *  parent)
inlineoverridevirtual

Creates an instance of the corresponding sensor type.

Reimplemented from QgsSensorAbstractGuiMetadata.

Definition at line 156 of file qgssensorguiregistry.h.

◆ createSensorWidget()

QgsAbstractSensorWidget * QgsSensorGuiMetadata::createSensorWidget ( QgsAbstractSensor sensor)
inlineoverridevirtual

Creates a configuration widget for an sensor of this type.

Can return nullptr if no configuration GUI is required.

Reimplemented from QgsSensorAbstractGuiMetadata.

Definition at line 155 of file qgssensorguiregistry.h.

◆ creationIcon()

QIcon QgsSensorGuiMetadata::creationIcon ( ) const
inlineoverridevirtual

Returns an icon representing creation of the sensor type.

Reimplemented from QgsSensorAbstractGuiMetadata.

Definition at line 154 of file qgssensorguiregistry.h.

◆ sensorCreationFunction()

QgsSensorCreateFunc QgsSensorGuiMetadata::sensorCreationFunction ( ) const
inline

Returns the classes' sensor creation function.

See also
setSensorCreationFunction()

Definition at line 146 of file qgssensorguiregistry.h.

◆ setSensorCreationFunction()

void QgsSensorGuiMetadata::setSensorCreationFunction ( const QgsSensorCreateFunc function)
inline

Sets the classes' sensor creation function.

See also
sensorCreationFunction()

Definition at line 152 of file qgssensorguiregistry.h.

◆ setWidgetFunction()

void QgsSensorGuiMetadata::setWidgetFunction ( const QgsSensorWidgetFunc function)
inline

Sets the classes' sensor configuration widget creation function.

See also
widgetFunction()

Definition at line 140 of file qgssensorguiregistry.h.

◆ widgetFunction()

QgsSensorWidgetFunc QgsSensorGuiMetadata::widgetFunction ( ) const
inline

Returns the classes' configuration widget creation function.

See also
setWidgetFunction()

Definition at line 134 of file qgssensorguiregistry.h.

Member Data Documentation

◆ mCreateFunc

QgsSensorCreateFunc QgsSensorGuiMetadata::mCreateFunc = nullptr
protected

Definition at line 162 of file qgssensorguiregistry.h.

◆ mIcon

QIcon QgsSensorGuiMetadata::mIcon
protected

Definition at line 160 of file qgssensorguiregistry.h.

◆ mWidgetFunc

QgsSensorWidgetFunc QgsSensorGuiMetadata::mWidgetFunc = nullptr
protected

Definition at line 161 of file qgssensorguiregistry.h.


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