blob: f765a57dfb0024e99168a4bb65a49fad577eb3e0 (
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
|
// Copyright (C) 2016 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 IOSGYROSCOPE_H
#define IOSGYROSCOPE_H
#include <qsensorbackend.h>
#include <qgyroscope.h>
@class CMMotionManager;
QT_BEGIN_NAMESPACE
class IOSGyroscope : public QSensorBackend
{
public:
static char const * const id;
explicit IOSGyroscope(QSensor *sensor);
void timerEvent(QTimerEvent *) override;
void start() override;
void stop() override;
private:
CMMotionManager *m_motionManager;
QGyroscopeReading m_reading;
int m_timer;
static int s_startCount;
};
QT_END_NAMESPACE
#endif // IOSGYROSCOPE_H
|