blob: f95b9bc451df01bea5979f3704e52a0aacfa3547 (
plain)
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
|
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef IOSPRESSURE_H
#define IOSPRESSURE_H
#include <qsensorbackend.h>
#include <qpressuresensor.h>
@class CMAltimeter;
QT_BEGIN_NAMESPACE
class IOSPressure : public QSensorBackend
{
public:
static char const * const id;
explicit IOSPressure(QSensor *sensor);
~IOSPressure();
void timerEvent(QTimerEvent *) override;
void start() override;
void stop() override;
private:
Q_DISABLE_COPY_MOVE(IOSPressure)
CMAltimeter *m_altimeter = nullptr;
QPressureReading m_reading;
int m_timer = 0;
static int s_startCount;
};
QT_END_NAMESPACE
#endif // IOSPRESSURE_H
|