sensorfw
hybrisrotationadaptor.h
Go to the documentation of this file.
1
/****************************************************************************
2
**
3
** Copyright (C) 2013 Jolla Ltd
4
**
5
**
6
** $QT_BEGIN_LICENSE:LGPL$
7
**
8
** GNU Lesser General Public License Usage
9
** Alternatively, this file may be used under the terms of the GNU Lesser
10
** General Public License version 2.1 as published by the Free Software
11
** Foundation and appearing in the file LICENSE.LGPL included in the
12
** packaging of this file. Please review the following information to
13
** ensure the GNU Lesser General Public License version 2.1 requirements
14
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
15
**
16
** $QT_END_LICENSE$
17
**
18
****************************************************************************/
19
20
#ifndef HYBRISROTATIONADAPTOR_H
21
#define HYBRISROTATIONADAPTOR_H
22
#include "hybrisadaptor.h"
23
24
#include <QString>
25
#include <QStringList>
26
#include "deviceadaptorringbuffer.h"
27
#include "
datatypes/orientationdata.h
"
28
36
class
HybrisRotationAdaptor
:
public
HybrisAdaptor
37
{
38
Q_OBJECT
39
40
public
:
41
static
DeviceAdaptor*
factoryMethod
(
const
QString&
id
) {
42
return
new
HybrisRotationAdaptor
(
id
);
43
}
44
HybrisRotationAdaptor
(
const
QString&
id
);
45
~HybrisRotationAdaptor
();
46
47
bool
startSensor
();
48
void
stopSensor
();
49
50
protected
:
51
void
processSample
(
const
sensors_event_t& data);
52
53
private
:
54
DeviceAdaptorRingBuffer<CompassData>* m_buffer;
55
QByteArray m_powerStatePath;
56
57
};
58
#endif
HybrisRotationAdaptor
Adaptor for hybris compass.
Definition
hybrisrotationadaptor.h:37
HybrisRotationAdaptor::HybrisRotationAdaptor
HybrisRotationAdaptor(const QString &id)
HybrisRotationAdaptor::processSample
void processSample(const sensors_event_t &data)
HybrisRotationAdaptor::stopSensor
void stopSensor()
HybrisRotationAdaptor::startSensor
bool startSensor()
HybrisRotationAdaptor::~HybrisRotationAdaptor
~HybrisRotationAdaptor()
HybrisRotationAdaptor::factoryMethod
static DeviceAdaptor * factoryMethod(const QString &id)
Definition
hybrisrotationadaptor.h:41
orientationdata.h
Datatypes for different filters.
adaptors
hybrisrotationadaptor
hybrisrotationadaptor.h
Generated by
1.12.0