Kstars

deviceorientation.h
1 /*
2  SPDX-FileCopyrightText: 2017 Artem Fedoskin <[email protected]>
3  SPDX-License-Identifier: GPL-2.0-or-later
4 */
5 #pragma once
6 
7 #include <QObject>
8 
9 class DeviceOrientation : public QObject
10 {
11  Q_OBJECT
12 
13  // Q_PROPERTY(int azimuth MEMBER m_Azimuth NOTIFY azimuthChanged)
14  // Q_PROPERTY(int pitch MEMBER m_Pitch NOTIFY pitchChanged)
15  // Q_PROPERTY(int roll MEMBER m_Roll NOTIFY rollChanged)
16  public:
17  explicit DeviceOrientation(QObject *parent = nullptr);
18  void getOrientation();
19 
20  float getAzimuth() { return m_Azimuth; }
21  float getAltitude() { return m_Altitude; }
22  float getRoll() { return m_Roll; }
23  void stopSensors();
24  void startSensors();
25  signals:
26  // void pitchChanged(int pitch);
27  // void azimuthChanged(int Azimuth);
28  // void rollChanged(int roll);
29 
30  private:
31  float m_Azimuth { 0 };
32  float m_Altitude { 0 };
33  float m_Roll { 0 };
34 };
Q_OBJECTQ_OBJECT
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Aug 11 2022 03:59:57 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.