summaryrefslogtreecommitdiffstats
path: root/tradeshow/iot-sensortag/sensortagdataprovider.h
diff options
context:
space:
mode:
authorKari Hautamäki <kari.hautamaki@qt.io>2017-02-06 17:39:54 +0200
committerTitta Heikkala <titta.heikkala@qt.io>2017-02-08 10:16:14 +0000
commiteaec031cc108dd37d9506eb1eda45c42b639c982 (patch)
tree98acdcc192b9a4ac54cf38956ac78c7810443896 /tradeshow/iot-sensortag/sensortagdataprovider.h
parent0ad8e201e428f237a5e25d63a70b28041653a3b8 (diff)
iot-sensortag: Visual style updated for most of the charts
- Updated appearance and graphics of ambient and object temperature, air pressure, humidity and light charts. - Removed AirPressure chart - Added Altitude chart - Added altitude information to SensorTagData and derived classes Change-Id: Ief8eb9dd4f87f967b037eed3e9a4dd12c3c6efc9 Reviewed-by: Titta Heikkala <titta.heikkala@qt.io>
Diffstat (limited to 'tradeshow/iot-sensortag/sensortagdataprovider.h')
-rw-r--r--tradeshow/iot-sensortag/sensortagdataprovider.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/tradeshow/iot-sensortag/sensortagdataprovider.h b/tradeshow/iot-sensortag/sensortagdataprovider.h
index a3cebd0..c3006e5 100644
--- a/tradeshow/iot-sensortag/sensortagdataprovider.h
+++ b/tradeshow/iot-sensortag/sensortagdataprovider.h
@@ -86,6 +86,7 @@ class SensorTagDataProvider : public QObject
Q_PROPERTY(float rotationY READ getRotationY NOTIFY rotationYChanged)
Q_PROPERTY(float rotationZ READ getRotationZ NOTIFY rotationZChanged)
Q_PROPERTY(int rotationUpdateInterval READ getRotationUpdateInterval NOTIFY rotationUpdateIntervalChanged)
+ Q_PROPERTY(float altitude READ getAltitude NOTIFY altitudeChanged)
public:
enum TagType {AmbientTemperature = 1 << 0,
@@ -95,7 +96,8 @@ public:
Light = 1 << 3,
Magnetometer = 1 << 4,
Rotation = 1 << 5,
- Accelometer = 1 << 6};
+ Accelometer = 1 << 6,
+ Altitude = 1 << 7};
enum ProviderState {Disconnected = 0, Scanning, Connected, Error};
explicit SensorTagDataProvider(QObject *parent = 0);
@@ -127,6 +129,7 @@ public:
float getRotationY();
float getRotationZ();
int getRotationUpdateInterval();
+ float getAltitude();
Q_INVOKABLE int tagType() const;
QString id() const;
@@ -157,9 +160,12 @@ signals:
void rotationZChanged();
void rotationValuesChanged();
void rotationUpdateIntervalChanged();
+ void altitudeChanged();
protected:
virtual void reset();
+ virtual void calculateZeroAltitude();
+
double humidity;
double irAmbientTemperature;
double irObjectTemperature;
@@ -181,6 +187,8 @@ protected:
float rotation_y;
float rotation_z;
int intervalRotation;
+ float pressureAtZeroAltitude;
+ float altitude;
int m_tagType;
QString m_id;
QString m_name;