Add backing stores for Suunto Vyper configurations

This adds varables to store all the settings for the Suunto Vyper
family.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Anton Lundin 2014-10-12 16:51:26 +02:00 committed by Dirk Hohndel
parent 60d0b622a9
commit d85508b25c
2 changed files with 196 additions and 1 deletions

View file

@ -10,6 +10,7 @@ DeviceDetails::DeviceDetails(QObject *parent) :
m_serialNo(""),
m_firmwareVersion(""),
m_customText(""),
m_model(""),
m_syncTime(false),
m_gas1(zero_gas),
m_gas2(zero_gas),
@ -48,7 +49,19 @@ DeviceDetails::DeviceDetails(QObject *parent) :
m_language(0),
m_dateFormat(0),
m_compassGain(0),
m_pressureSensorOffset(0)
m_pressureSensorOffset(0),
m_maxDepth(0),
m_totalTime(0),
m_numberOfDives(0),
m_altitude(0),
m_personalSafety(0),
m_timeFormat(0),
m_lightEnabled(false),
m_light(0),
m_alarmTimeEnabled(false),
m_alarmTime(0),
m_alarmDepthEnabled(false),
m_alarmDepth(0)
{
}
@ -92,6 +105,16 @@ void DeviceDetails::setCustomText(const QString &customText)
m_customText = customText;
}
QString DeviceDetails::model() const
{
return m_model;
}
void DeviceDetails::setModel(const QString &model)
{
m_model = model;
}
int DeviceDetails::brightness() const
{
return m_brightness;
@ -481,3 +504,123 @@ void DeviceDetails::setPressureSensorOffset(int pressureSensorOffset)
{
m_pressureSensorOffset = pressureSensorOffset;
}
int DeviceDetails::maxDepth() const
{
return m_maxDepth;
}
void DeviceDetails::setMaxDepth(int maxDepth)
{
m_maxDepth = maxDepth;
}
int DeviceDetails::totalTime() const
{
return m_totalTime;
}
void DeviceDetails::setTotalTime(int totalTime)
{
m_totalTime = totalTime;
}
int DeviceDetails::numberOfDives() const
{
return m_numberOfDives;
}
void DeviceDetails::setNumberOfDives(int numberOfDives)
{
m_numberOfDives = numberOfDives;
}
int DeviceDetails::altitude() const
{
return m_altitude;
}
void DeviceDetails::setAltitude(int altitude)
{
m_altitude = altitude;
}
int DeviceDetails::personalSafety() const
{
return m_personalSafety;
}
void DeviceDetails::setPersonalSafety(int personalSafety)
{
m_personalSafety = personalSafety;
}
int DeviceDetails::timeFormat() const
{
return m_timeFormat;
}
void DeviceDetails::setTimeFormat(int timeFormat)
{
m_timeFormat = timeFormat;
}
bool DeviceDetails::lightEnabled() const
{
return m_lightEnabled;
}
void DeviceDetails::setLightEnabled(bool lightEnabled)
{
m_lightEnabled = lightEnabled;
}
int DeviceDetails::light() const
{
return m_light;
}
void DeviceDetails::setLight(int light)
{
m_light = light;
}
bool DeviceDetails::alarmTimeEnabled() const
{
return m_alarmTimeEnabled;
}
void DeviceDetails::setAlarmTimeEnabled(bool alarmTimeEnabled)
{
m_alarmTimeEnabled = alarmTimeEnabled;
}
int DeviceDetails::alarmTime() const
{
return m_alarmTime;
}
void DeviceDetails::setAlarmTime(int alarmTime)
{
m_alarmTime = alarmTime;
}
bool DeviceDetails::alarmDepthEnabled() const
{
return m_alarmDepthEnabled;
}
void DeviceDetails::setAlarmDepthEnabled(bool alarmDepthEnabled)
{
m_alarmDepthEnabled = alarmDepthEnabled;
}
int DeviceDetails::alarmDepth() const
{
return m_alarmDepth;
}
void DeviceDetails::setAlarmDepth(int alarmDepth)
{
m_alarmDepth = alarmDepth;
}

View file

@ -35,6 +35,9 @@ public:
QString customText() const;
void setCustomText(const QString &customText);
QString model() const;
void setModel(const QString &model);
int brightness() const;
void setBrightness(int brightness);
@ -152,11 +155,48 @@ public:
int pressureSensorOffset() const;
void setPressureSensorOffset(int pressureSensorOffset);
int maxDepth() const;
void setMaxDepth(int maxDepth);
int totalTime() const;
void setTotalTime(int totalTime);
int numberOfDives() const;
void setNumberOfDives(int numberOfDives);
int altitude() const;
void setAltitude(int altitude);
int personalSafety() const;
void setPersonalSafety(int personalSafety);
int timeFormat() const;
void setTimeFormat(int timeFormat);
bool lightEnabled() const;
void setLightEnabled(bool lightEnabled);
int light() const;
void setLight(int light);
bool alarmTimeEnabled() const;
void setAlarmTimeEnabled(bool alarmTimeEnabled);
int alarmTime() const;
void setAlarmTime(int alarmTime);
bool alarmDepthEnabled() const;
void setAlarmDepthEnabled(bool alarmDepthEnabled);
int alarmDepth() const;
void setAlarmDepth(int alarmDepth);
private:
device_data_t *m_data;
QString m_serialNo;
QString m_firmwareVersion;
QString m_customText;
QString m_model;
bool m_syncTime;
gas m_gas1;
gas m_gas2;
@ -196,6 +236,18 @@ private:
int m_dateFormat;
int m_compassGain;
int m_pressureSensorOffset;
int m_maxDepth;
int m_totalTime;
int m_numberOfDives;
int m_altitude;
int m_personalSafety;
int m_timeFormat;
bool m_lightEnabled;
int m_light;
bool m_alarmTimeEnabled;
int m_alarmTime;
bool m_alarmDepthEnabled;
int m_alarmDepth;
};