File: qgssensormanager.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 (149 lines) | stat: -rw-r--r-- 4,228 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
144
145
146
147
148
149
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/sensor/qgssensormanager.h                                   *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 ************************************************************************/





class QgsSensorManager : QObject
{
%Docstring(signature="appended")

Manages sensors.

:py:class:`QgsSensorManager` handles the storage, serializing and deserializing
of sensors. Usually this class is not constructed directly, but
rather accessed through a :py:class:`QgsProject` via :py:func:`QgsProject.sensorManager()`.

.. versionadded:: 3.32
%End

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

    explicit QgsSensorManager( QObject *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsSensorManager, with the specified ``parent`` object.
%End

    ~QgsSensorManager();

    void clear();
%Docstring
Deregisters and removes all sensors from the manager.
%End

    QList<QgsAbstractSensor *> sensors() const;
%Docstring
Returns a list of pointers to all registered sensors.
%End

    QgsAbstractSensor *sensor( const QString &id ) const;
%Docstring
Returns a registered sensor pointer matching a given ``id``. If not
matching sensor is found, a ``None`` will be returned.
%End

    void addSensor( QgsAbstractSensor *sensor /Transfer/ );
%Docstring
Registers a new ``sensor``.
The sensor name does not require uniqueness; sensors will the same
name will store their data in the same sensor name key, allowing for
registration of sensors to cover multiple devices (e.g. two serial port
sensors with alternative port name to cover two machines).

.. note::

   Takes ownership of the sensor.
%End

    bool removeSensor( const QString &id );
%Docstring
Removes a registered sensor matching a given ``id``.

:return: ``True`` if a sensor was removed.
%End

    QStringList sensorNames() const;
%Docstring
Returns a list of registered sensor names.
%End

    QgsAbstractSensor::SensorData sensorData( const QString &name ) const;
%Docstring
Returns the last captured data from a registered sensor matching a given ``name``.
%End

    QMap<QString, QgsAbstractSensor::SensorData> sensorsData() const;
%Docstring
Returns the last captured data of all registered sensors.
%End

    bool readXml( const QDomElement &element, const QDomDocument &document );
%Docstring
Reads the manager's state from a DOM element, restoring all sensors
present in the XML document.

.. seealso:: :py:func:`writeXml`
%End

    QDomElement writeXml( QDomDocument &document ) const;
%Docstring
Returns a DOM element representing the state of the manager.

.. seealso:: :py:func:`readXml`
%End

  signals:

    void sensorAdded( const QString &id );
%Docstring
Emitted when a sensor has been registered.
%End

    void sensorAboutToBeRemoved( const QString &id );
%Docstring
Emitted when a sensor is about to be removed.
%End

    void sensorRemoved( const QString &id );
%Docstring
Emitted when a sensor has been removed.
%End

    void sensorNameChanged( const QString &id );
%Docstring
Emitted when a sensor name has changed.
%End

    void sensorStatusChanged( const QString &id );
%Docstring
Emitted when a sensor status has changed.
%End

    void sensorDataCaptured( const QString &id );
%Docstring
Emitted when newly captured data from a sensor has occurred.
%End

    void sensorErrorOccurred( const QString &id );
%Docstring
Emitted when a sensor error has occurred.
%End

};

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