KWin
Loading...
Searching...
No Matches
orientationsensor.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2019 Roman Gilg <subdiff@gmail.com>
3 SPDX-FileCopyrightText: 2023 Xaver Hugl <xaver.hugl@gmail.com>
4
5 SPDX-License-Identifier: GPL-2.0-or-later
6*/
7#pragma once
8
9#include <QObject>
10#include <memory>
11
12class QOrientationSensor;
13class QOrientationReading;
14
15namespace KWin
16{
17
18class OrientationSensor : public QObject
19{
20 Q_OBJECT
21public:
22 explicit OrientationSensor();
24
25 void setEnabled(bool enable);
26 QOrientationReading *reading() const;
27
28Q_SIGNALS:
30
31private:
32 void update();
33
34 const std::unique_ptr<QOrientationSensor> m_sensor;
35 const std::unique_ptr<QOrientationReading> m_reading;
36};
37
38}
QOrientationReading * reading() const