| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601 |
- # The PEP 484 type hints stub file for the QtSensors module.
- #
- # Generated by SIP 6.15.3
- #
- # Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
- #
- # This file is part of PyQt6.
- #
- # This file may be used under the terms of the GNU General Public License
- # version 3.0 as published by the Free Software Foundation and appearing in
- # the file LICENSE included in the packaging of this file. Please review the
- # following information to ensure the GNU General Public License version 3.0
- # requirements will be met: http://www.gnu.org/copyleft/gpl.html.
- #
- # If you do not wish to use this file under the terms of the GPL version 3.0
- # then you may purchase a commercial license. For more information contact
- # info@riverbankcomputing.com.
- #
- # This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- # WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- import collections, re, typing, enum
- try:
- from warnings import deprecated
- except ImportError:
- pass
- import PyQt6.sip
- from PyQt6 import QtCore
- # Support for QDate, QDateTime and QTime.
- import datetime
- # Convenient type aliases.
- PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal]
- PYQT_SLOT = typing.Union[collections.abc.Callable[..., Any], QtCore.pyqtBoundSignal]
- class QSensorReading(QtCore.QObject):
- def value(self, index: int) -> typing.Any: ...
- def valueCount(self) -> int: ...
- def setTimestamp(self, timestamp: int) -> None: ...
- def timestamp(self) -> int: ...
- class QAccelerometerReading(QSensorReading):
- def setZ(self, z: float) -> None: ...
- def z(self) -> float: ...
- def setY(self, y: float) -> None: ...
- def y(self) -> float: ...
- def setX(self, x: float) -> None: ...
- def x(self) -> float: ...
- class QSensorFilter(PyQt6.sip.simplewrapper):
- @typing.overload
- def __init__(self) -> None: ...
- @typing.overload
- def __init__(self, a0: 'QSensorFilter') -> None: ...
- def filter(self, reading: QSensorReading|None) -> bool: ...
- class QAccelerometerFilter(QSensorFilter):
- @typing.overload
- def __init__(self) -> None: ...
- @typing.overload
- def __init__(self, a0: 'QAccelerometerFilter') -> None: ...
- def filter(self, reading: QAccelerometerReading|None) -> bool: ...
- class QSensor(QtCore.QObject):
- class AxesOrientationMode(enum.Enum):
- FixedOrientation = ... # type: QSensor.AxesOrientationMode
- AutomaticOrientation = ... # type: QSensor.AxesOrientationMode
- UserOrientation = ... # type: QSensor.AxesOrientationMode
- class Feature(enum.Enum):
- Buffering = ... # type: QSensor.Feature
- AlwaysOn = ... # type: QSensor.Feature
- GeoValues = ... # type: QSensor.Feature
- FieldOfView = ... # type: QSensor.Feature
- AccelerationMode = ... # type: QSensor.Feature
- SkipDuplicates = ... # type: QSensor.Feature
- AxesOrientation = ... # type: QSensor.Feature
- PressureSensorTemperature = ... # type: QSensor.Feature
- def __init__(self, type: QtCore.QByteArray|bytes|bytearray|memoryview, parent: QtCore.QObject|None = ...) -> None: ...
- identifierChanged: typing.ClassVar[QtCore.pyqtSignal]
- bufferSizeChanged: typing.ClassVar[QtCore.pyqtSignal]
- efficientBufferSizeChanged: typing.ClassVar[QtCore.pyqtSignal]
- maxBufferSizeChanged: typing.ClassVar[QtCore.pyqtSignal]
- userOrientationChanged: typing.ClassVar[QtCore.pyqtSignal]
- currentOrientationChanged: typing.ClassVar[QtCore.pyqtSignal]
- axesOrientationModeChanged: typing.ClassVar[QtCore.pyqtSignal]
- skipDuplicatesChanged: typing.ClassVar[QtCore.pyqtSignal]
- dataRateChanged: typing.ClassVar[QtCore.pyqtSignal]
- alwaysOnChanged: typing.ClassVar[QtCore.pyqtSignal]
- availableSensorsChanged: typing.ClassVar[QtCore.pyqtSignal]
- sensorError: typing.ClassVar[QtCore.pyqtSignal]
- readingChanged: typing.ClassVar[QtCore.pyqtSignal]
- activeChanged: typing.ClassVar[QtCore.pyqtSignal]
- busyChanged: typing.ClassVar[QtCore.pyqtSignal]
- def stop(self) -> None: ...
- def start(self) -> bool: ...
- def setBufferSize(self, bufferSize: int) -> None: ...
- def bufferSize(self) -> int: ...
- def setEfficientBufferSize(self, efficientBufferSize: int) -> None: ...
- def efficientBufferSize(self) -> int: ...
- def setMaxBufferSize(self, maxBufferSize: int) -> None: ...
- def maxBufferSize(self) -> int: ...
- def setUserOrientation(self, userOrientation: int) -> None: ...
- def userOrientation(self) -> int: ...
- def setCurrentOrientation(self, currentOrientation: int) -> None: ...
- def currentOrientation(self) -> int: ...
- def setAxesOrientationMode(self, axesOrientationMode: 'QSensor.AxesOrientationMode') -> None: ...
- def axesOrientationMode(self) -> 'QSensor.AxesOrientationMode': ...
- def isFeatureSupported(self, feature: 'QSensor.Feature') -> bool: ...
- @staticmethod
- def defaultSensorForType(type: QtCore.QByteArray|bytes|bytearray|memoryview) -> QtCore.QByteArray: ...
- @staticmethod
- def sensorsForType(type: QtCore.QByteArray|bytes|bytearray|memoryview) -> list[QtCore.QByteArray]: ...
- @staticmethod
- def sensorTypes() -> list[QtCore.QByteArray]: ...
- def reading(self) -> QSensorReading|None: ...
- def filters(self) -> list[QSensorFilter]: ...
- def removeFilter(self, filter: QSensorFilter|None) -> None: ...
- def addFilter(self, filter: QSensorFilter|None) -> None: ...
- def error(self) -> int: ...
- def description(self) -> str: ...
- def setOutputRange(self, index: int) -> None: ...
- def outputRange(self) -> int: ...
- def outputRanges(self) -> list['qoutputrange']: ...
- def setDataRate(self, rate: int) -> None: ...
- def dataRate(self) -> int: ...
- def availableDataRates(self) -> list[tuple[int, int]]: ...
- def setSkipDuplicates(self, skipDuplicates: bool) -> None: ...
- def skipDuplicates(self) -> bool: ...
- def setAlwaysOn(self, alwaysOn: bool) -> None: ...
- def isAlwaysOn(self) -> bool: ...
- def isActive(self) -> bool: ...
- def setActive(self, active: bool) -> None: ...
- def isBusy(self) -> bool: ...
- def isConnectedToBackend(self) -> bool: ...
- def connectToBackend(self) -> bool: ...
- def type(self) -> QtCore.QByteArray: ...
- def setIdentifier(self, identifier: QtCore.QByteArray|bytes|bytearray|memoryview) -> None: ...
- def identifier(self) -> QtCore.QByteArray: ...
- class QAccelerometer(QSensor):
- class AccelerationMode(enum.Enum):
- Combined = ... # type: QAccelerometer.AccelerationMode
- Gravity = ... # type: QAccelerometer.AccelerationMode
- User = ... # type: QAccelerometer.AccelerationMode
- def __init__(self, parent: QtCore.QObject|None = ...) -> None: ...
- accelerationModeChanged: typing.ClassVar[QtCore.pyqtSignal]
- def reading(self) -> QAccelerometerReading|None: ...
- def setAccelerationMode(self, accelerationMode: 'QAccelerometer.AccelerationMode') -> None: ...
- def accelerationMode(self) -> 'QAccelerometer.AccelerationMode': ...
- class QAmbientLightReading(QSensorReading):
- class LightLevel(enum.Enum):
- Undefined = ... # type: QAmbientLightReading.LightLevel
- Dark = ... # type: QAmbientLightReading.LightLevel
- Twilight = ... # type: QAmbientLightReading.LightLevel
- Light = ... # type: QAmbientLightReading.LightLevel
- Bright = ... # type: QAmbientLightReading.LightLevel
- Sunny = ... # type: QAmbientLightReading.LightLevel
- def setLightLevel(self, lightLevel: 'QAmbientLightReading.LightLevel') -> None: ...
- def lightLevel(self) -> 'QAmbientLightReading.LightLevel': ...
- class QAmbientLightFilter(QSensorFilter):
- @typing.overload
- def __init__(self) -> None: ...
- @typing.overload
- def __init__(self, a0: 'QAmbientLightFilter') -> None: ...
- def filter(self, reading: QAmbientLightReading|None) -> bool: ...
- class QAmbientLightSensor(QSensor):
- def __init__(self, parent: QtCore.QObject|None = ...) -> None: ...
- def reading(self) -> QAmbientLightReading|None: ...
- class QAmbientTemperatureReading(QSensorReading):
- def setTemperature(self, temperature: float) -> None: ...
- def temperature(self) -> float: ...
- class QAmbientTemperatureFilter(QSensorFilter):
- @typing.overload
- def __init__(self) -> None: ...
- @typing.overload
- def __init__(self, a0: 'QAmbientTemperatureFilter') -> None: ...
- def filter(self, reading: QAmbientTemperatureReading|None) -> bool: ...
- class QAmbientTemperatureSensor(QSensor):
- def __init__(self, parent: QtCore.QObject|None = ...) -> None: ...
- def reading(self) -> QAmbientTemperatureReading|None: ...
- class QCompassReading(QSensorReading):
- def setCalibrationLevel(self, calibrationLevel: float) -> None: ...
- def calibrationLevel(self) -> float: ...
- def setAzimuth(self, azimuth: float) -> None: ...
- def azimuth(self) -> float: ...
- class QCompassFilter(QSensorFilter):
- @typing.overload
- def __init__(self) -> None: ...
- @typing.overload
- def __init__(self, a0: 'QCompassFilter') -> None: ...
- def filter(self, reading: QCompassReading|None) -> bool: ...
- class QCompass(QSensor):
- def __init__(self, parent: QtCore.QObject|None = ...) -> None: ...
- def reading(self) -> QCompassReading|None: ...
- class QGyroscopeReading(QSensorReading):
- def setZ(self, z: float) -> None: ...
- def z(self) -> float: ...
- def setY(self, y: float) -> None: ...
- def y(self) -> float: ...
- def setX(self, x: float) -> None: ...
- def x(self) -> float: ...
- class QGyroscopeFilter(QSensorFilter):
- @typing.overload
- def __init__(self) -> None: ...
- @typing.overload
- def __init__(self, a0: 'QGyroscopeFilter') -> None: ...
- def filter(self, reading: QGyroscopeReading|None) -> bool: ...
- class QGyroscope(QSensor):
- def __init__(self, parent: QtCore.QObject|None = ...) -> None: ...
- def reading(self) -> QGyroscopeReading|None: ...
- class QHumidityReading(QSensorReading):
- def setAbsoluteHumidity(self, value: float) -> None: ...
- def absoluteHumidity(self) -> float: ...
- def setRelativeHumidity(self, percent: float) -> None: ...
- def relativeHumidity(self) -> float: ...
- class QHumidityFilter(QSensorFilter):
- @typing.overload
- def __init__(self) -> None: ...
- @typing.overload
- def __init__(self, a0: 'QHumidityFilter') -> None: ...
- def filter(self, reading: QHumidityReading|None) -> bool: ...
- class QHumiditySensor(QSensor):
- def __init__(self, parent: QtCore.QObject|None = ...) -> None: ...
- def reading(self) -> QHumidityReading|None: ...
- class QIRProximityReading(QSensorReading):
- def setReflectance(self, reflectance: float) -> None: ...
- def reflectance(self) -> float: ...
- class QIRProximityFilter(QSensorFilter):
- @typing.overload
- def __init__(self) -> None: ...
- @typing.overload
- def __init__(self, a0: 'QIRProximityFilter') -> None: ...
- def filter(self, reading: QIRProximityReading|None) -> bool: ...
- class QIRProximitySensor(QSensor):
- def __init__(self, parent: QtCore.QObject|None = ...) -> None: ...
- def reading(self) -> QIRProximityReading|None: ...
- class QLidReading(QSensorReading):
- frontLidChanged: typing.ClassVar[QtCore.pyqtSignal]
- backLidChanged: typing.ClassVar[QtCore.pyqtSignal]
- def setFrontLidClosed(self, closed: bool) -> None: ...
- def frontLidClosed(self) -> bool: ...
- def setBackLidClosed(self, closed: bool) -> None: ...
- def backLidClosed(self) -> bool: ...
- class QLidFilter(QSensorFilter):
- @typing.overload
- def __init__(self) -> None: ...
- @typing.overload
- def __init__(self, a0: 'QLidFilter') -> None: ...
- def filter(self, reading: QLidReading|None) -> bool: ...
- class QLidSensor(QSensor):
- def __init__(self, parent: QtCore.QObject|None = ...) -> None: ...
- def reading(self) -> QLidReading|None: ...
- class QLightReading(QSensorReading):
- def setLux(self, lux: float) -> None: ...
- def lux(self) -> float: ...
- class QLightFilter(QSensorFilter):
- @typing.overload
- def __init__(self) -> None: ...
- @typing.overload
- def __init__(self, a0: 'QLightFilter') -> None: ...
- def filter(self, reading: QLightReading|None) -> bool: ...
- class QLightSensor(QSensor):
- def __init__(self, parent: QtCore.QObject|None = ...) -> None: ...
- fieldOfViewChanged: typing.ClassVar[QtCore.pyqtSignal]
- def setFieldOfView(self, fieldOfView: float) -> None: ...
- def fieldOfView(self) -> float: ...
- def reading(self) -> QLightReading|None: ...
- class QMagnetometerReading(QSensorReading):
- def setCalibrationLevel(self, calibrationLevel: float) -> None: ...
- def calibrationLevel(self) -> float: ...
- def setZ(self, z: float) -> None: ...
- def z(self) -> float: ...
- def setY(self, y: float) -> None: ...
- def y(self) -> float: ...
- def setX(self, x: float) -> None: ...
- def x(self) -> float: ...
- class QMagnetometerFilter(QSensorFilter):
- @typing.overload
- def __init__(self) -> None: ...
- @typing.overload
- def __init__(self, a0: 'QMagnetometerFilter') -> None: ...
- def filter(self, reading: QMagnetometerReading|None) -> bool: ...
- class QMagnetometer(QSensor):
- def __init__(self, parent: QtCore.QObject|None = ...) -> None: ...
- returnGeoValuesChanged: typing.ClassVar[QtCore.pyqtSignal]
- def setReturnGeoValues(self, returnGeoValues: bool) -> None: ...
- def returnGeoValues(self) -> bool: ...
- def reading(self) -> QMagnetometerReading|None: ...
- class QOrientationReading(QSensorReading):
- class Orientation(enum.Enum):
- Undefined = ... # type: QOrientationReading.Orientation
- TopUp = ... # type: QOrientationReading.Orientation
- TopDown = ... # type: QOrientationReading.Orientation
- LeftUp = ... # type: QOrientationReading.Orientation
- RightUp = ... # type: QOrientationReading.Orientation
- FaceUp = ... # type: QOrientationReading.Orientation
- FaceDown = ... # type: QOrientationReading.Orientation
- def setOrientation(self, orientation: 'QOrientationReading.Orientation') -> None: ...
- def orientation(self) -> 'QOrientationReading.Orientation': ...
- class QOrientationFilter(QSensorFilter):
- @typing.overload
- def __init__(self) -> None: ...
- @typing.overload
- def __init__(self, a0: 'QOrientationFilter') -> None: ...
- def filter(self, reading: QOrientationReading|None) -> bool: ...
- class QOrientationSensor(QSensor):
- def __init__(self, parent: QtCore.QObject|None = ...) -> None: ...
- def reading(self) -> QOrientationReading|None: ...
- class QPressureReading(QSensorReading):
- def setTemperature(self, temperature: float) -> None: ...
- def temperature(self) -> float: ...
- def setPressure(self, pressure: float) -> None: ...
- def pressure(self) -> float: ...
- class QPressureFilter(QSensorFilter):
- @typing.overload
- def __init__(self) -> None: ...
- @typing.overload
- def __init__(self, a0: 'QPressureFilter') -> None: ...
- def filter(self, reading: QPressureReading|None) -> bool: ...
- class QPressureSensor(QSensor):
- def __init__(self, parent: QtCore.QObject|None = ...) -> None: ...
- def reading(self) -> QPressureReading|None: ...
- class QProximityReading(QSensorReading):
- def setClose(self, close: bool) -> None: ...
- def close(self) -> bool: ...
- class QProximityFilter(QSensorFilter):
- @typing.overload
- def __init__(self) -> None: ...
- @typing.overload
- def __init__(self, a0: 'QProximityFilter') -> None: ...
- def filter(self, reading: QProximityReading|None) -> bool: ...
- class QProximitySensor(QSensor):
- def __init__(self, parent: QtCore.QObject|None = ...) -> None: ...
- def reading(self) -> QProximityReading|None: ...
- class QRotationReading(QSensorReading):
- def setFromEuler(self, x: float, y: float, z: float) -> None: ...
- def z(self) -> float: ...
- def y(self) -> float: ...
- def x(self) -> float: ...
- class QRotationFilter(QSensorFilter):
- @typing.overload
- def __init__(self) -> None: ...
- @typing.overload
- def __init__(self, a0: 'QRotationFilter') -> None: ...
- def filter(self, reading: QRotationReading|None) -> bool: ...
- class QRotationSensor(QSensor):
- def __init__(self, parent: QtCore.QObject|None = ...) -> None: ...
- hasZChanged: typing.ClassVar[QtCore.pyqtSignal]
- def setHasZ(self, hasZ: bool) -> None: ...
- def hasZ(self) -> bool: ...
- def reading(self) -> QRotationReading|None: ...
- class qoutputrange(PyQt6.sip.simplewrapper):
- accuracy = ... # type: float
- maximum = ... # type: float
- minimum = ... # type: float
- @typing.overload
- def __init__(self) -> None: ...
- @typing.overload
- def __init__(self, a0: 'qoutputrange') -> None: ...
- class QTapReading(QSensorReading):
- class TapDirection(enum.Enum):
- Undefined = ... # type: QTapReading.TapDirection
- X = ... # type: QTapReading.TapDirection
- Y = ... # type: QTapReading.TapDirection
- Z = ... # type: QTapReading.TapDirection
- X_Pos = ... # type: QTapReading.TapDirection
- Y_Pos = ... # type: QTapReading.TapDirection
- Z_Pos = ... # type: QTapReading.TapDirection
- X_Neg = ... # type: QTapReading.TapDirection
- Y_Neg = ... # type: QTapReading.TapDirection
- Z_Neg = ... # type: QTapReading.TapDirection
- X_Both = ... # type: QTapReading.TapDirection
- Y_Both = ... # type: QTapReading.TapDirection
- Z_Both = ... # type: QTapReading.TapDirection
- def setDoubleTap(self, doubleTap: bool) -> None: ...
- def isDoubleTap(self) -> bool: ...
- def setTapDirection(self, tapDirection: 'QTapReading.TapDirection') -> None: ...
- def tapDirection(self) -> 'QTapReading.TapDirection': ...
- class QTapFilter(QSensorFilter):
- @typing.overload
- def __init__(self) -> None: ...
- @typing.overload
- def __init__(self, a0: 'QTapFilter') -> None: ...
- def filter(self, reading: QTapReading|None) -> bool: ...
- class QTapSensor(QSensor):
- def __init__(self, parent: QtCore.QObject|None = ...) -> None: ...
- returnDoubleTapEventsChanged: typing.ClassVar[QtCore.pyqtSignal]
- def setReturnDoubleTapEvents(self, returnDoubleTapEvents: bool) -> None: ...
- def returnDoubleTapEvents(self) -> bool: ...
- def reading(self) -> QTapReading|None: ...
- class QTiltReading(QSensorReading):
- def setXRotation(self, x: float) -> None: ...
- def xRotation(self) -> float: ...
- def setYRotation(self, y: float) -> None: ...
- def yRotation(self) -> float: ...
- class QTiltFilter(QSensorFilter):
- @typing.overload
- def __init__(self) -> None: ...
- @typing.overload
- def __init__(self, a0: 'QTiltFilter') -> None: ...
- def filter(self, reading: QTiltReading|None) -> bool: ...
- class QTiltSensor(QSensor):
- def __init__(self, parent: QtCore.QObject|None = ...) -> None: ...
- def calibrate(self) -> None: ...
- def reading(self) -> QTiltReading|None: ...
|