mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-15 00:02:52 -04:00
152 lines
4.7 KiB
Plaintext
152 lines
4.7 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/gui/sensor/qgssensorguiregistry.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.py again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
class QgsSensorAbstractGuiMetadata
|
|
{
|
|
%Docstring(signature="appended")
|
|
Stores GUI metadata about one sensor class.
|
|
|
|
This is a companion to :py:class:`QgsSensorAbstractMetadata`, storing only
|
|
the components related to the GUI behavior of sensor.
|
|
|
|
.. note::
|
|
|
|
In C++ you can use :py:class:`QgsSensorGuiMetadata` convenience class.
|
|
|
|
.. versionadded:: 3.32
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgssensorguiregistry.h"
|
|
%End
|
|
public:
|
|
QgsSensorAbstractGuiMetadata( const QString &type, const QString &visibleName );
|
|
%Docstring
|
|
Constructor for QgsSensorAbstractGuiMetadata with the specified class ``type``.
|
|
|
|
``visibleName`` should be set to a translated, user visible name identifying the corresponding sensor type.
|
|
%End
|
|
|
|
virtual ~QgsSensorAbstractGuiMetadata();
|
|
|
|
QString type() const;
|
|
%Docstring
|
|
Returns the unique type code for the sensor class.
|
|
%End
|
|
|
|
QString visibleName() const;
|
|
%Docstring
|
|
Returns a translated, user visible name identifying the corresponding sensor.
|
|
%End
|
|
|
|
virtual QIcon creationIcon() const;
|
|
%Docstring
|
|
Returns an icon representing creation of the sensor type.
|
|
%End
|
|
|
|
|
|
virtual QgsAbstractSensorWidget *createSensorWidget( QgsAbstractSensor *sensor ) /TransferBack/;
|
|
%Docstring
|
|
Creates a configuration widget for an ``sensor`` of this type. Can return ``None`` if no configuration GUI is required.
|
|
%End
|
|
|
|
virtual QgsAbstractSensor *createSensor( QObject *parent ) /TransferBack/;
|
|
%Docstring
|
|
Creates an instance of the corresponding sensor type.
|
|
%End
|
|
|
|
};
|
|
|
|
|
|
|
|
class QgsSensorGuiRegistry : QObject
|
|
{
|
|
%Docstring(signature="appended")
|
|
Registry of available sensor GUI behavior.
|
|
|
|
:py:class:`QgsSensorGuiRegistry` is not usually directly created, but rather accessed through
|
|
:py:func:`QgsGui.sensorGuiRegistry()`.
|
|
|
|
This acts as a companion to :py:class:`QgsSensorRegistry`, handling only
|
|
the components related to the GUI behavior of sensors.
|
|
|
|
.. versionadded:: 3.32
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgssensorguiregistry.h"
|
|
%End
|
|
public:
|
|
QgsSensorGuiRegistry( QObject *parent = 0 );
|
|
%Docstring
|
|
Creates a new empty sensor GUI registry.
|
|
|
|
QgsSensorGuiRegistry is not usually directly created, but rather accessed through
|
|
:py:func:`QgsGui.sensorGuiRegistry()`.
|
|
%End
|
|
~QgsSensorGuiRegistry();
|
|
|
|
|
|
bool populate();
|
|
%Docstring
|
|
Populates the registry with standard sensor types. If called on a non-empty registry
|
|
then this will have no effect and will return ``False``.
|
|
%End
|
|
|
|
QgsSensorAbstractGuiMetadata *sensorMetadata( const QString &type ) const;
|
|
%Docstring
|
|
Returns the metadata for the specified sensor ``type``. Returns ``None`` if
|
|
a corresponding sensor type was not found in the registry.
|
|
%End
|
|
|
|
bool addSensorGuiMetadata( QgsSensorAbstractGuiMetadata *metadata /Transfer/ );
|
|
%Docstring
|
|
Registers the GUI metadata for a new sensor type. Takes ownership of the metadata instance.
|
|
%End
|
|
|
|
|
|
QgsAbstractSensor *createSensor( const QString &type, QObject *parent = 0 ) const /TransferBack/;
|
|
%Docstring
|
|
Creates a new instance of a sensor given the ``type``.
|
|
%End
|
|
|
|
QgsAbstractSensorWidget *createSensorWidget( QgsAbstractSensor *sensor ) const /TransferBack/;
|
|
%Docstring
|
|
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.
|
|
%End
|
|
|
|
QMap<QString, QString> sensorTypes() const;
|
|
%Docstring
|
|
Returns a list of sensor types handled by the registry.
|
|
%End
|
|
|
|
signals:
|
|
|
|
void sensorAdded( const QString &type, const QString &name );
|
|
%Docstring
|
|
Emitted whenever a new sensor type is added to the registry, with the specified
|
|
``type``.
|
|
%End
|
|
|
|
private:
|
|
QgsSensorGuiRegistry( const QgsSensorGuiRegistry &rh );
|
|
};
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/gui/sensor/qgssensorguiregistry.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.py again *
|
|
************************************************************************/
|