QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
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.
 
QgsAbstractSensorcreateSensor (QObject *parent) override
 Creates an instance of the corresponding sensor type.
 
QgsAbstractSensorWidgetcreateSensorWidget (QgsAbstractSensor *sensor) override
 Creates a configuration widget for an sensor of this type.
 
QIcon creationIcon () const override
 Returns an icon representing creation of the sensor type.
 
QgsSensorCreateFunc sensorCreationFunction () const
 Returns the classes' sensor creation function.
 
void setSensorCreationFunction (const QgsSensorCreateFunc &function)
 Sets the classes' sensor creation function.
 
void setWidgetFunction (const QgsSensorWidgetFunc &function)
 Sets the classes' sensor configuration widget creation function.
 
QgsSensorWidgetFunc widgetFunction () const
 Returns the classes' configuration widget creation function.
 

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

Definition at line 115 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 124 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 157 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 156 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 155 of file qgssensorguiregistry.h.

◆ sensorCreationFunction()

QgsSensorCreateFunc QgsSensorGuiMetadata::sensorCreationFunction ( ) const
inline

Returns the classes' sensor creation function.

See also
setSensorCreationFunction()

Definition at line 147 of file qgssensorguiregistry.h.

◆ setSensorCreationFunction()

void QgsSensorGuiMetadata::setSensorCreationFunction ( const QgsSensorCreateFunc function)
inline

Sets the classes' sensor creation function.

See also
sensorCreationFunction()

Definition at line 153 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 141 of file qgssensorguiregistry.h.

◆ widgetFunction()

QgsSensorWidgetFunc QgsSensorGuiMetadata::widgetFunction ( ) const
inline

Returns the classes' configuration widget creation function.

See also
setWidgetFunction()

Definition at line 135 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: