File: qgssensorregistry.sip.in

package info (click to toggle)
qgis 3.34.7%2Bdfsg-1~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 1,087,388 kB
  • sloc: cpp: 1,440,033; python: 234,418; xml: 23,096; perl: 3,499; sh: 3,364; ansic: 2,219; sql: 2,130; yacc: 1,063; lex: 577; javascript: 540; lisp: 411; makefile: 155
file content (143 lines) | stat: -rw-r--r-- 3,871 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/sensor/qgssensorregistry.h                                  *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 ************************************************************************/


class QgsSensorAbstractMetadata
{
%Docstring(signature="appended")
Stores metadata about a sensor class.

.. note::

   In C++ you can use :py:class:`QgsSensorAbstractMetadata` convenience class.

.. versionadded:: 3.32
%End

%TypeHeaderCode
#include "qgssensorregistry.h"
%End
  public:

    QgsSensorAbstractMetadata( const QString &type, const QString &visibleName );
%Docstring
Constructor for QgsSensorAbstractMetadata with the specified class ``type``.
%End

    virtual ~QgsSensorAbstractMetadata();

    QString type() const;
%Docstring
Returns the unique type code for the sensor class.
%End

    QString visibleName() const;
%Docstring
Returns a translated, user visible name for the sensor class.
%End


    virtual QgsAbstractSensor *createSensor( QObject *parent ) = 0 /TransferBack/;
%Docstring
Creates a sensor of this class.
%End

};



class QgsSensorRegistry : QObject
{
%Docstring(signature="appended")
Registry of available sensor types.

:py:class:`QgsSensorRegistry` is not usually directly created, but rather accessed through
:py:func:`QgsApplication.sensorRegistry()`.

A companion class, :py:class:`QgsSensorGuiRegistry`, handles the GUI behavior
of sensors.

.. versionadded:: 3.32
%End

%TypeHeaderCode
#include "qgssensorregistry.h"
%End
  public:

    QgsSensorRegistry( QObject *parent = 0 );
%Docstring
Creates a new empty item registry.

QgsSensorRegistry is not usually directly created, but rather accessed through
:py:func:`QgsApplication.sensorRegistry()`.

.. seealso:: :py:func:`populate`
%End
    ~QgsSensorRegistry();

    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


    QgsSensorAbstractMetadata *sensorMetadata( const QString &type ) const;
%Docstring
Returns the metadata for the specified sensor ``type``. Returns ``None`` if
a corresponding type was not found in the registry.
%End


    bool addSensorType( QgsSensorAbstractMetadata *metadata /Transfer/ );
%Docstring
Registers a new sensor type.

.. note::

   Takes ownership of the metadata instance.
%End

    bool removeSensorType( const QString &type );
%Docstring
Removes a new a sensor type from the registry.
%End

    QgsAbstractSensor *createSensor( const QString &type, QObject *parent = 0 ) const /TransferBack/;
%Docstring
Creates a new instance of a sensor given the ``type``.
%End

    QMap<QString, QString> sensorTypes() const;
%Docstring
Returns a map of available sensor types to translated name.
%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`` and visible ``name``.
%End

  private:
    QgsSensorRegistry( const QgsSensorRegistry &rh );
};




/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/sensor/qgssensorregistry.h                                  *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 ************************************************************************/