mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Changed quite a few shorts to bool on the c++ implementtion
The shorts where being used on the preferences since a long while and we cannot just simply change them to bool since this could break the preferences files, so work around that by changing them to booleans, since it's the correct type for a true / false answer. Also, move some plot curves to the new settings style Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2c5fad73e8
commit
2d96139566
5 changed files with 130 additions and 139 deletions
|
@ -1,6 +1,7 @@
|
||||||
#include "divecartesianaxis.h"
|
#include "divecartesianaxis.h"
|
||||||
#include "divetextitem.h"
|
#include "divetextitem.h"
|
||||||
#include "helpers.h"
|
#include "helpers.h"
|
||||||
|
#include <subsurface-qt/SettingsObjectWrapper.h>
|
||||||
#ifndef SUBSURFACE_MOBILE
|
#ifndef SUBSURFACE_MOBILE
|
||||||
#include "preferences/preferencesdialog.h"
|
#include "preferences/preferencesdialog.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#endif
|
#endif
|
||||||
#include "diveplannermodel.h"
|
#include "diveplannermodel.h"
|
||||||
#include "helpers.h"
|
#include "helpers.h"
|
||||||
|
#include <subsurface-qt/SettingsObjectWrapper.h>
|
||||||
#include "libdivecomputer/parser.h"
|
#include "libdivecomputer/parser.h"
|
||||||
#include "profilewidget2.h"
|
#include "profilewidget2.h"
|
||||||
|
|
||||||
|
@ -27,6 +28,11 @@ void AbstractProfilePolygonItem::settingsChanged()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AbstractProfilePolygonItem::setVisible(bool visible)
|
||||||
|
{
|
||||||
|
QGraphicsPolygonItem::setVisible(visible);
|
||||||
|
}
|
||||||
|
|
||||||
void AbstractProfilePolygonItem::setHorizontalAxis(DiveCartesianAxis *horizontal)
|
void AbstractProfilePolygonItem::setHorizontalAxis(DiveCartesianAxis *horizontal)
|
||||||
{
|
{
|
||||||
hAxis = horizontal;
|
hAxis = horizontal;
|
||||||
|
@ -255,7 +261,7 @@ DiveHeartrateItem::DiveHeartrateItem()
|
||||||
pen.setCosmetic(true);
|
pen.setCosmetic(true);
|
||||||
pen.setWidth(1);
|
pen.setWidth(1);
|
||||||
setPen(pen);
|
setPen(pen);
|
||||||
settingsChanged();
|
connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::hrgraphChanged, this, &DiveHeartrateItem::setVisible);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiveHeartrateItem::modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
|
void DiveHeartrateItem::modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
|
||||||
|
@ -334,11 +340,6 @@ void DiveHeartrateItem::paint(QPainter *painter, const QStyleOptionGraphicsItem
|
||||||
painter->restore();
|
painter->restore();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiveHeartrateItem::settingsChanged()
|
|
||||||
{
|
|
||||||
setVisible(prefs.hrgraph);
|
|
||||||
}
|
|
||||||
|
|
||||||
DivePercentageItem::DivePercentageItem(int i)
|
DivePercentageItem::DivePercentageItem(int i)
|
||||||
{
|
{
|
||||||
QPen pen;
|
QPen pen;
|
||||||
|
@ -383,11 +384,7 @@ void DivePercentageItem::paint(QPainter *painter, const QStyleOptionGraphicsItem
|
||||||
painter->setPen(pen());
|
painter->setPen(pen());
|
||||||
painter->drawPolyline(polygon());
|
painter->drawPolyline(polygon());
|
||||||
painter->restore();
|
painter->restore();
|
||||||
}
|
connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::percentageGraphChanged, this, &DivePercentageItem::setVisible);
|
||||||
|
|
||||||
void DivePercentageItem::settingsChanged()
|
|
||||||
{
|
|
||||||
setVisible(prefs.percentagegraph);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DiveAmbPressureItem::DiveAmbPressureItem()
|
DiveAmbPressureItem::DiveAmbPressureItem()
|
||||||
|
@ -432,11 +429,7 @@ void DiveAmbPressureItem::paint(QPainter *painter, const QStyleOptionGraphicsIte
|
||||||
painter->setPen(pen());
|
painter->setPen(pen());
|
||||||
painter->drawPolyline(polygon());
|
painter->drawPolyline(polygon());
|
||||||
painter->restore();
|
painter->restore();
|
||||||
}
|
connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::percentageGraphChanged, this, &DiveAmbPressureItem::setVisible);
|
||||||
|
|
||||||
void DiveAmbPressureItem::settingsChanged()
|
|
||||||
{
|
|
||||||
setVisible(prefs.percentagegraph);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DiveGFLineItem::DiveGFLineItem()
|
DiveGFLineItem::DiveGFLineItem()
|
||||||
|
@ -481,11 +474,7 @@ void DiveGFLineItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *op
|
||||||
painter->setPen(pen());
|
painter->setPen(pen());
|
||||||
painter->drawPolyline(polygon());
|
painter->drawPolyline(polygon());
|
||||||
painter->restore();
|
painter->restore();
|
||||||
}
|
connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::percentageGraphChanged, this, &DiveAmbPressureItem::setVisible);
|
||||||
|
|
||||||
void DiveGFLineItem::settingsChanged()
|
|
||||||
{
|
|
||||||
setVisible(prefs.percentagegraph);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DiveTemperatureItem::DiveTemperatureItem()
|
DiveTemperatureItem::DiveTemperatureItem()
|
||||||
|
@ -610,11 +599,7 @@ void DiveMeanDepthItem::paint(QPainter *painter, const QStyleOptionGraphicsItem
|
||||||
painter->setPen(pen());
|
painter->setPen(pen());
|
||||||
painter->drawPolyline(polygon());
|
painter->drawPolyline(polygon());
|
||||||
painter->restore();
|
painter->restore();
|
||||||
}
|
connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::showAverageDepthChanged, this, &DiveAmbPressureItem::setVisible);
|
||||||
|
|
||||||
void DiveMeanDepthItem::settingsChanged()
|
|
||||||
{
|
|
||||||
setVisible(prefs.show_average_depth);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiveMeanDepthItem::createTextItem() {
|
void DiveMeanDepthItem::createTextItem() {
|
||||||
|
@ -838,6 +823,14 @@ void DiveCalculatedCeiling::paint(QPainter *painter, const QStyleOptionGraphicsI
|
||||||
DiveCalculatedTissue::DiveCalculatedTissue(ProfileWidget2 *widget) : DiveCalculatedCeiling(widget)
|
DiveCalculatedTissue::DiveCalculatedTissue(ProfileWidget2 *widget) : DiveCalculatedCeiling(widget)
|
||||||
{
|
{
|
||||||
settingsChanged();
|
settingsChanged();
|
||||||
|
connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::calcalltissuesChanged, this, &DiveCalculatedTissue::setVisible);
|
||||||
|
connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::calcceilingChanged, this, &DiveCalculatedTissue::setVisible);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DiveCalculatedTissue::setVisible(bool visible)
|
||||||
|
{
|
||||||
|
Q_UNUSED(visible);
|
||||||
|
settingsChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiveCalculatedTissue::settingsChanged()
|
void DiveCalculatedTissue::settingsChanged()
|
||||||
|
|
|
@ -49,6 +49,7 @@ slots:
|
||||||
virtual void settingsChanged();
|
virtual void settingsChanged();
|
||||||
virtual void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex());
|
virtual void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex());
|
||||||
virtual void modelDataRemoved(const QModelIndex &parent, int from, int to);
|
virtual void modelDataRemoved(const QModelIndex &parent, int from, int to);
|
||||||
|
void setVisible(bool visible);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/* when the model emits a 'datachanged' signal, this method below should be used to check if the
|
/* when the model emits a 'datachanged' signal, this method below should be used to check if the
|
||||||
|
@ -91,7 +92,6 @@ public:
|
||||||
DiveMeanDepthItem();
|
DiveMeanDepthItem();
|
||||||
virtual void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex());
|
virtual void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex());
|
||||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
||||||
virtual void settingsChanged();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void createTextItem();
|
void createTextItem();
|
||||||
|
@ -116,7 +116,6 @@ public:
|
||||||
DiveHeartrateItem();
|
DiveHeartrateItem();
|
||||||
virtual void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
|
virtual void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
|
||||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||||
virtual void settingsChanged();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void createTextItem(int seconds, int hr);
|
void createTextItem(int seconds, int hr);
|
||||||
|
@ -129,7 +128,6 @@ public:
|
||||||
DivePercentageItem(int i);
|
DivePercentageItem(int i);
|
||||||
virtual void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
|
virtual void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
|
||||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||||
virtual void settingsChanged();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString visibilityKey;
|
QString visibilityKey;
|
||||||
|
@ -141,7 +139,6 @@ public:
|
||||||
DiveAmbPressureItem();
|
DiveAmbPressureItem();
|
||||||
virtual void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
|
virtual void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
|
||||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||||
virtual void settingsChanged();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString visibilityKey;
|
QString visibilityKey;
|
||||||
|
@ -153,7 +150,6 @@ public:
|
||||||
DiveGFLineItem();
|
DiveGFLineItem();
|
||||||
virtual void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
|
virtual void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
|
||||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||||
virtual void settingsChanged();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString visibilityKey;
|
QString visibilityKey;
|
||||||
|
@ -205,6 +201,7 @@ class DiveCalculatedTissue : public DiveCalculatedCeiling {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
DiveCalculatedTissue(ProfileWidget2 *profileWidget);
|
DiveCalculatedTissue(ProfileWidget2 *profileWidget);
|
||||||
|
void setVisible(bool visible);
|
||||||
virtual void settingsChanged();
|
virtual void settingsChanged();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -110,67 +110,67 @@ double TechnicalDetailsSettings:: modp02() const
|
||||||
return prefs.modpO2;
|
return prefs.modpO2;
|
||||||
}
|
}
|
||||||
|
|
||||||
short TechnicalDetailsSettings::ead() const
|
bool TechnicalDetailsSettings::ead() const
|
||||||
{
|
{
|
||||||
return prefs.ead;
|
return prefs.ead;
|
||||||
}
|
}
|
||||||
|
|
||||||
short TechnicalDetailsSettings::dcceiling() const
|
bool TechnicalDetailsSettings::dcceiling() const
|
||||||
{
|
{
|
||||||
return prefs.dcceiling;
|
return prefs.dcceiling;
|
||||||
}
|
}
|
||||||
|
|
||||||
short TechnicalDetailsSettings::redceiling() const
|
bool TechnicalDetailsSettings::redceiling() const
|
||||||
{
|
{
|
||||||
return prefs.redceiling;
|
return prefs.redceiling;
|
||||||
}
|
}
|
||||||
|
|
||||||
short TechnicalDetailsSettings::calcceiling() const
|
bool TechnicalDetailsSettings::calcceiling() const
|
||||||
{
|
{
|
||||||
return prefs.calcceiling;
|
return prefs.calcceiling;
|
||||||
}
|
}
|
||||||
|
|
||||||
short TechnicalDetailsSettings::calcceiling3m() const
|
bool TechnicalDetailsSettings::calcceiling3m() const
|
||||||
{
|
{
|
||||||
return prefs.calcceiling3m;
|
return prefs.calcceiling3m;
|
||||||
}
|
}
|
||||||
|
|
||||||
short TechnicalDetailsSettings::calcalltissues() const
|
bool TechnicalDetailsSettings::calcalltissues() const
|
||||||
{
|
{
|
||||||
return prefs.calcalltissues;
|
return prefs.calcalltissues;
|
||||||
}
|
}
|
||||||
|
|
||||||
short TechnicalDetailsSettings::calcndltts() const
|
bool TechnicalDetailsSettings::calcndltts() const
|
||||||
{
|
{
|
||||||
return prefs.calcndltts;
|
return prefs.calcndltts;
|
||||||
}
|
}
|
||||||
|
|
||||||
short TechnicalDetailsSettings::gflow() const
|
bool TechnicalDetailsSettings::gflow() const
|
||||||
{
|
{
|
||||||
return prefs.gflow;
|
return prefs.gflow;
|
||||||
}
|
}
|
||||||
|
|
||||||
short TechnicalDetailsSettings::gfhigh() const
|
bool TechnicalDetailsSettings::gfhigh() const
|
||||||
{
|
{
|
||||||
return prefs.gfhigh;
|
return prefs.gfhigh;
|
||||||
}
|
}
|
||||||
|
|
||||||
short TechnicalDetailsSettings::hrgraph() const
|
bool TechnicalDetailsSettings::hrgraph() const
|
||||||
{
|
{
|
||||||
return prefs.hrgraph;
|
return prefs.hrgraph;
|
||||||
}
|
}
|
||||||
|
|
||||||
short TechnicalDetailsSettings::tankBar() const
|
bool TechnicalDetailsSettings::tankBar() const
|
||||||
{
|
{
|
||||||
return prefs.tankbar;
|
return prefs.tankbar;
|
||||||
}
|
}
|
||||||
|
|
||||||
short TechnicalDetailsSettings::percentageGraph() const
|
bool TechnicalDetailsSettings::percentageGraph() const
|
||||||
{
|
{
|
||||||
return prefs.percentagegraph;
|
return prefs.percentagegraph;
|
||||||
}
|
}
|
||||||
|
|
||||||
short TechnicalDetailsSettings::rulerGraph() const
|
bool TechnicalDetailsSettings::rulerGraph() const
|
||||||
{
|
{
|
||||||
return prefs.rulergraph;
|
return prefs.rulergraph;
|
||||||
}
|
}
|
||||||
|
@ -185,12 +185,12 @@ bool TechnicalDetailsSettings::showCCRSensors() const
|
||||||
return prefs.show_ccr_sensors;
|
return prefs.show_ccr_sensors;
|
||||||
}
|
}
|
||||||
|
|
||||||
short TechnicalDetailsSettings::zoomedPlot() const
|
bool TechnicalDetailsSettings::zoomedPlot() const
|
||||||
{
|
{
|
||||||
return prefs.zoomed_plot;
|
return prefs.zoomed_plot;
|
||||||
}
|
}
|
||||||
|
|
||||||
short TechnicalDetailsSettings::showSac() const
|
bool TechnicalDetailsSettings::showSac() const
|
||||||
{
|
{
|
||||||
return prefs.show_sac;
|
return prefs.show_sac;
|
||||||
}
|
}
|
||||||
|
@ -200,17 +200,17 @@ bool TechnicalDetailsSettings::gfLowAtMaxDepth() const
|
||||||
return prefs.gf_low_at_maxdepth;
|
return prefs.gf_low_at_maxdepth;
|
||||||
}
|
}
|
||||||
|
|
||||||
short TechnicalDetailsSettings::displayUnusedTanks() const
|
bool TechnicalDetailsSettings::displayUnusedTanks() const
|
||||||
{
|
{
|
||||||
return prefs.display_unused_tanks;
|
return prefs.display_unused_tanks;
|
||||||
}
|
}
|
||||||
|
|
||||||
short TechnicalDetailsSettings::showAverageDepth() const
|
bool TechnicalDetailsSettings::showAverageDepth() const
|
||||||
{
|
{
|
||||||
return prefs.show_average_depth;
|
return prefs.show_average_depth;
|
||||||
}
|
}
|
||||||
|
|
||||||
short int TechnicalDetailsSettings::mod() const
|
bool TechnicalDetailsSettings::mod() const
|
||||||
{
|
{
|
||||||
return prefs.mod;
|
return prefs.mod;
|
||||||
}
|
}
|
||||||
|
@ -238,7 +238,7 @@ void TechnicalDetailsSettings::setShowPicturesInProfile(bool value)
|
||||||
emit showPicturesInProfileChanged(value);
|
emit showPicturesInProfileChanged(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TechnicalDetailsSettings::setEad(short value)
|
void TechnicalDetailsSettings::setEad(bool value)
|
||||||
{
|
{
|
||||||
QSettings s;
|
QSettings s;
|
||||||
s.beginGroup(tecDetails);
|
s.beginGroup(tecDetails);
|
||||||
|
@ -247,7 +247,7 @@ void TechnicalDetailsSettings::setEad(short value)
|
||||||
emit eadChanged(value);
|
emit eadChanged(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TechnicalDetailsSettings::setMod(short value)
|
void TechnicalDetailsSettings::setMod(bool value)
|
||||||
{
|
{
|
||||||
QSettings s;
|
QSettings s;
|
||||||
s.beginGroup(tecDetails);
|
s.beginGroup(tecDetails);
|
||||||
|
@ -256,7 +256,7 @@ void TechnicalDetailsSettings::setMod(short value)
|
||||||
emit modChanged(value);
|
emit modChanged(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TechnicalDetailsSettings::setDCceiling(short value)
|
void TechnicalDetailsSettings::setDCceiling(bool value)
|
||||||
{
|
{
|
||||||
QSettings s;
|
QSettings s;
|
||||||
s.beginGroup(tecDetails);
|
s.beginGroup(tecDetails);
|
||||||
|
@ -265,7 +265,7 @@ void TechnicalDetailsSettings::setDCceiling(short value)
|
||||||
emit dcceilingChanged(value);
|
emit dcceilingChanged(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TechnicalDetailsSettings::setRedceiling(short value)
|
void TechnicalDetailsSettings::setRedceiling(bool value)
|
||||||
{
|
{
|
||||||
QSettings s;
|
QSettings s;
|
||||||
s.beginGroup(tecDetails);
|
s.beginGroup(tecDetails);
|
||||||
|
@ -274,7 +274,7 @@ void TechnicalDetailsSettings::setRedceiling(short value)
|
||||||
emit redceilingChanged(value);
|
emit redceilingChanged(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TechnicalDetailsSettings::setCalcceiling(short value)
|
void TechnicalDetailsSettings::setCalcceiling(bool value)
|
||||||
{
|
{
|
||||||
QSettings s;
|
QSettings s;
|
||||||
s.beginGroup(tecDetails);
|
s.beginGroup(tecDetails);
|
||||||
|
@ -283,7 +283,7 @@ void TechnicalDetailsSettings::setCalcceiling(short value)
|
||||||
emit calcceilingChanged(value);
|
emit calcceilingChanged(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TechnicalDetailsSettings::setCalcceiling3m(short value)
|
void TechnicalDetailsSettings::setCalcceiling3m(bool value)
|
||||||
{
|
{
|
||||||
QSettings s;
|
QSettings s;
|
||||||
s.beginGroup(tecDetails);
|
s.beginGroup(tecDetails);
|
||||||
|
@ -292,7 +292,7 @@ void TechnicalDetailsSettings::setCalcceiling3m(short value)
|
||||||
emit calcceiling3mChanged(value);
|
emit calcceiling3mChanged(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TechnicalDetailsSettings::setCalcalltissues(short value)
|
void TechnicalDetailsSettings::setCalcalltissues(bool value)
|
||||||
{
|
{
|
||||||
QSettings s;
|
QSettings s;
|
||||||
s.beginGroup(tecDetails);
|
s.beginGroup(tecDetails);
|
||||||
|
@ -301,7 +301,7 @@ void TechnicalDetailsSettings::setCalcalltissues(short value)
|
||||||
emit calcalltissuesChanged(value);
|
emit calcalltissuesChanged(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TechnicalDetailsSettings::setCalcndltts(short value)
|
void TechnicalDetailsSettings::setCalcndltts(bool value)
|
||||||
{
|
{
|
||||||
QSettings s;
|
QSettings s;
|
||||||
s.beginGroup(tecDetails);
|
s.beginGroup(tecDetails);
|
||||||
|
@ -310,7 +310,7 @@ void TechnicalDetailsSettings::setCalcndltts(short value)
|
||||||
emit calcndlttsChanged(value);
|
emit calcndlttsChanged(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TechnicalDetailsSettings::setGflow(short value)
|
void TechnicalDetailsSettings::setGflow(bool value)
|
||||||
{
|
{
|
||||||
QSettings s;
|
QSettings s;
|
||||||
s.beginGroup(tecDetails);
|
s.beginGroup(tecDetails);
|
||||||
|
@ -320,7 +320,7 @@ void TechnicalDetailsSettings::setGflow(short value)
|
||||||
emit gflowChanged(value);
|
emit gflowChanged(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TechnicalDetailsSettings::setGfhigh(short value)
|
void TechnicalDetailsSettings::setGfhigh(bool value)
|
||||||
{
|
{
|
||||||
QSettings s;
|
QSettings s;
|
||||||
s.beginGroup(tecDetails);
|
s.beginGroup(tecDetails);
|
||||||
|
@ -330,7 +330,7 @@ void TechnicalDetailsSettings::setGfhigh(short value)
|
||||||
emit gfhighChanged(value);
|
emit gfhighChanged(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TechnicalDetailsSettings::setHRgraph(short value)
|
void TechnicalDetailsSettings::setHRgraph(bool value)
|
||||||
{
|
{
|
||||||
QSettings s;
|
QSettings s;
|
||||||
s.beginGroup(tecDetails);
|
s.beginGroup(tecDetails);
|
||||||
|
@ -339,7 +339,7 @@ void TechnicalDetailsSettings::setHRgraph(short value)
|
||||||
emit hrgraphChanged(value);
|
emit hrgraphChanged(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TechnicalDetailsSettings::setTankBar(short value)
|
void TechnicalDetailsSettings::setTankBar(bool value)
|
||||||
{
|
{
|
||||||
QSettings s;
|
QSettings s;
|
||||||
s.beginGroup(tecDetails);
|
s.beginGroup(tecDetails);
|
||||||
|
@ -348,7 +348,7 @@ void TechnicalDetailsSettings::setTankBar(short value)
|
||||||
emit tankBarChanged(value);
|
emit tankBarChanged(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TechnicalDetailsSettings::setPercentageGraph(short value)
|
void TechnicalDetailsSettings::setPercentageGraph(bool value)
|
||||||
{
|
{
|
||||||
QSettings s;
|
QSettings s;
|
||||||
s.beginGroup(tecDetails);
|
s.beginGroup(tecDetails);
|
||||||
|
@ -357,7 +357,7 @@ void TechnicalDetailsSettings::setPercentageGraph(short value)
|
||||||
emit percentageGraphChanged(value);
|
emit percentageGraphChanged(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TechnicalDetailsSettings::setRulerGraph(short value)
|
void TechnicalDetailsSettings::setRulerGraph(bool value)
|
||||||
{
|
{
|
||||||
/* TODO: search for the QSettings of the RulerBar */
|
/* TODO: search for the QSettings of the RulerBar */
|
||||||
QSettings s;
|
QSettings s;
|
||||||
|
@ -385,7 +385,7 @@ void TechnicalDetailsSettings::setShowCCRSensors(bool value)
|
||||||
emit showCCRSensorsChanged(value);
|
emit showCCRSensorsChanged(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TechnicalDetailsSettings::setZoomedPlot(short value)
|
void TechnicalDetailsSettings::setZoomedPlot(bool value)
|
||||||
{
|
{
|
||||||
QSettings s;
|
QSettings s;
|
||||||
s.beginGroup(tecDetails);
|
s.beginGroup(tecDetails);
|
||||||
|
@ -394,7 +394,7 @@ void TechnicalDetailsSettings::setZoomedPlot(short value)
|
||||||
emit zoomedPlotChanged(value);
|
emit zoomedPlotChanged(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TechnicalDetailsSettings::setShowSac(short value)
|
void TechnicalDetailsSettings::setShowSac(bool value)
|
||||||
{
|
{
|
||||||
QSettings s;
|
QSettings s;
|
||||||
s.beginGroup(tecDetails);
|
s.beginGroup(tecDetails);
|
||||||
|
@ -413,7 +413,7 @@ void TechnicalDetailsSettings::setGfLowAtMaxDepth(bool value)
|
||||||
emit gfLowAtMaxDepthChanged(value);
|
emit gfLowAtMaxDepthChanged(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TechnicalDetailsSettings::setDisplayUnusedTanks(short value)
|
void TechnicalDetailsSettings::setDisplayUnusedTanks(bool value)
|
||||||
{
|
{
|
||||||
QSettings s;
|
QSettings s;
|
||||||
s.beginGroup(tecDetails);
|
s.beginGroup(tecDetails);
|
||||||
|
@ -422,7 +422,7 @@ void TechnicalDetailsSettings::setDisplayUnusedTanks(short value)
|
||||||
emit displayUnusedTanksChanged(value);
|
emit displayUnusedTanksChanged(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TechnicalDetailsSettings::setShowAverageDepth(short value)
|
void TechnicalDetailsSettings::setShowAverageDepth(bool value)
|
||||||
{
|
{
|
||||||
QSettings s;
|
QSettings s;
|
||||||
s.beginGroup(tecDetails);
|
s.beginGroup(tecDetails);
|
||||||
|
|
|
@ -52,103 +52,103 @@ private:
|
||||||
class TechnicalDetailsSettings : public QObject {
|
class TechnicalDetailsSettings : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(double modpO2 READ modp02 WRITE setModp02 NOTIFY modpO2Changed)
|
Q_PROPERTY(double modpO2 READ modp02 WRITE setModp02 NOTIFY modpO2Changed)
|
||||||
Q_PROPERTY(short ead READ ead WRITE setEad NOTIFY eadChanged)
|
Q_PROPERTY(bool ead READ ead WRITE setEad NOTIFY eadChanged)
|
||||||
Q_PROPERTY(short mod READ mod WRITE setMod NOTIFY modChanged);
|
Q_PROPERTY(bool mod READ mod WRITE setMod NOTIFY modChanged);
|
||||||
Q_PROPERTY(short dcceiling READ dcceiling WRITE setDCceiling NOTIFY dcceilingChanged)
|
Q_PROPERTY(bool dcceiling READ dcceiling WRITE setDCceiling NOTIFY dcceilingChanged)
|
||||||
Q_PROPERTY(short redceiling READ redceiling WRITE setRedceiling NOTIFY redceilingChanged)
|
Q_PROPERTY(bool redceiling READ redceiling WRITE setRedceiling NOTIFY redceilingChanged)
|
||||||
Q_PROPERTY(short calcceiling READ calcceiling WRITE setCalcceiling NOTIFY calcceilingChanged)
|
Q_PROPERTY(bool calcceiling READ calcceiling WRITE setCalcceiling NOTIFY calcceilingChanged)
|
||||||
Q_PROPERTY(short calcceiling3m READ calcceiling3m WRITE setCalcceiling3m NOTIFY calcceiling3mChanged)
|
Q_PROPERTY(bool calcceiling3m READ calcceiling3m WRITE setCalcceiling3m NOTIFY calcceiling3mChanged)
|
||||||
Q_PROPERTY(short calcalltissues READ calcalltissues WRITE setCalcalltissues NOTIFY calcalltissuesChanged)
|
Q_PROPERTY(bool calcalltissues READ calcalltissues WRITE setCalcalltissues NOTIFY calcalltissuesChanged)
|
||||||
Q_PROPERTY(short calcndltts READ calcndltts WRITE setCalcndltts NOTIFY calcndlttsChanged)
|
Q_PROPERTY(bool calcndltts READ calcndltts WRITE setCalcndltts NOTIFY calcndlttsChanged)
|
||||||
Q_PROPERTY(short gflow READ gflow WRITE setGflow NOTIFY gflowChanged)
|
Q_PROPERTY(bool gflow READ gflow WRITE setGflow NOTIFY gflowChanged)
|
||||||
Q_PROPERTY(short gfhigh READ gfhigh WRITE setGfhigh NOTIFY gfhighChanged)
|
Q_PROPERTY(bool gfhigh READ gfhigh WRITE setGfhigh NOTIFY gfhighChanged)
|
||||||
Q_PROPERTY(short hrgraph READ hrgraph WRITE setHRgraph NOTIFY hrgraphChanged)
|
Q_PROPERTY(bool hrgraph READ hrgraph WRITE setHRgraph NOTIFY hrgraphChanged)
|
||||||
Q_PROPERTY(short tankbar READ tankBar WRITE setTankBar NOTIFY tankBarChanged)
|
Q_PROPERTY(bool tankbar READ tankBar WRITE setTankBar NOTIFY tankBarChanged)
|
||||||
Q_PROPERTY(short percentagegraph READ percentageGraph WRITE setPercentageGraph NOTIFY percentageGraphChanged)
|
Q_PROPERTY(bool percentagegraph READ percentageGraph WRITE setPercentageGraph NOTIFY percentageGraphChanged)
|
||||||
Q_PROPERTY(short rulergraph READ rulerGraph WRITE setRulerGraph NOTIFY rulerGraphChanged)
|
Q_PROPERTY(bool rulergraph READ rulerGraph WRITE setRulerGraph NOTIFY rulerGraphChanged)
|
||||||
Q_PROPERTY(bool show_ccr_setpoint READ showCCRSetpoint WRITE setShowCCRSetpoint NOTIFY showCCRSetpointChanged)
|
Q_PROPERTY(bool show_ccr_setpoint READ showCCRSetpoint WRITE setShowCCRSetpoint NOTIFY showCCRSetpointChanged)
|
||||||
Q_PROPERTY(bool show_ccr_sensors READ showCCRSensors WRITE setShowCCRSensors NOTIFY showCCRSensorsChanged)
|
Q_PROPERTY(bool show_ccr_sensors READ showCCRSensors WRITE setShowCCRSensors NOTIFY showCCRSensorsChanged)
|
||||||
Q_PROPERTY(short zoomed_plot READ zoomedPlot WRITE setZoomedPlot NOTIFY zoomedPlotChanged)
|
Q_PROPERTY(bool zoomed_plot READ zoomedPlot WRITE setZoomedPlot NOTIFY zoomedPlotChanged)
|
||||||
Q_PROPERTY(short show_sac READ showSac WRITE setShowSac NOTIFY showSacChanged)
|
Q_PROPERTY(bool show_sac READ showSac WRITE setShowSac NOTIFY showSacChanged)
|
||||||
Q_PROPERTY(bool gf_low_at_maxdepth READ gfLowAtMaxDepth WRITE setGfLowAtMaxDepth NOTIFY gfLowAtMaxDepthChanged)
|
Q_PROPERTY(bool gf_low_at_maxdepth READ gfLowAtMaxDepth WRITE setGfLowAtMaxDepth NOTIFY gfLowAtMaxDepthChanged)
|
||||||
Q_PROPERTY(short display_unused_tanks READ displayUnusedTanks WRITE setDisplayUnusedTanks NOTIFY displayUnusedTanksChanged)
|
Q_PROPERTY(bool display_unused_tanks READ displayUnusedTanks WRITE setDisplayUnusedTanks NOTIFY displayUnusedTanksChanged)
|
||||||
Q_PROPERTY(short show_average_depth READ showAverageDepth WRITE setShowAverageDepth NOTIFY showAverageDepthChanged)
|
Q_PROPERTY(bool show_average_depth READ showAverageDepth WRITE setShowAverageDepth NOTIFY showAverageDepthChanged)
|
||||||
Q_PROPERTY(bool show_pictures_in_profile READ showPicturesInProfile WRITE setShowPicturesInProfile NOTIFY showPicturesInProfileChanged)
|
Q_PROPERTY(bool show_pictures_in_profile READ showPicturesInProfile WRITE setShowPicturesInProfile NOTIFY showPicturesInProfileChanged)
|
||||||
public:
|
public:
|
||||||
TechnicalDetailsSettings(QObject *parent);
|
TechnicalDetailsSettings(QObject *parent);
|
||||||
|
|
||||||
double modp02() const;
|
double modp02() const;
|
||||||
short ead() const;
|
bool ead() const;
|
||||||
short mod() const;
|
bool mod() const;
|
||||||
short dcceiling() const;
|
bool dcceiling() const;
|
||||||
short redceiling() const;
|
bool redceiling() const;
|
||||||
short calcceiling() const;
|
bool calcceiling() const;
|
||||||
short calcceiling3m() const;
|
bool calcceiling3m() const;
|
||||||
short calcalltissues() const;
|
bool calcalltissues() const;
|
||||||
short calcndltts() const;
|
bool calcndltts() const;
|
||||||
short gflow() const;
|
bool gflow() const;
|
||||||
short gfhigh() const;
|
bool gfhigh() const;
|
||||||
short hrgraph() const;
|
bool hrgraph() const;
|
||||||
short tankBar() const;
|
bool tankBar() const;
|
||||||
short percentageGraph() const;
|
bool percentageGraph() const;
|
||||||
short rulerGraph() const;
|
bool rulerGraph() const;
|
||||||
bool showCCRSetpoint() const;
|
bool showCCRSetpoint() const;
|
||||||
bool showCCRSensors() const;
|
bool showCCRSensors() const;
|
||||||
short zoomedPlot() const;
|
bool zoomedPlot() const;
|
||||||
short showSac() const;
|
bool showSac() const;
|
||||||
bool gfLowAtMaxDepth() const;
|
bool gfLowAtMaxDepth() const;
|
||||||
short displayUnusedTanks() const;
|
bool displayUnusedTanks() const;
|
||||||
short showAverageDepth() const;
|
bool showAverageDepth() const;
|
||||||
bool showPicturesInProfile() const;
|
bool showPicturesInProfile() const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void setMod(short value);
|
void setMod(bool value);
|
||||||
void setModp02(double value);
|
void setModp02(double value);
|
||||||
void setEad(short value);
|
void setEad(bool value);
|
||||||
void setDCceiling(short value);
|
void setDCceiling(bool value);
|
||||||
void setRedceiling(short value);
|
void setRedceiling(bool value);
|
||||||
void setCalcceiling(short value);
|
void setCalcceiling(bool value);
|
||||||
void setCalcceiling3m(short value);
|
void setCalcceiling3m(bool value);
|
||||||
void setCalcalltissues(short value);
|
void setCalcalltissues(bool value);
|
||||||
void setCalcndltts(short value);
|
void setCalcndltts(bool value);
|
||||||
void setGflow(short value);
|
void setGflow(bool value);
|
||||||
void setGfhigh(short value);
|
void setGfhigh(bool value);
|
||||||
void setHRgraph(short value);
|
void setHRgraph(bool value);
|
||||||
void setTankBar(short value);
|
void setTankBar(bool value);
|
||||||
void setPercentageGraph(short value);
|
void setPercentageGraph(bool value);
|
||||||
void setRulerGraph(short value);
|
void setRulerGraph(bool value);
|
||||||
void setShowCCRSetpoint(bool value);
|
void setShowCCRSetpoint(bool value);
|
||||||
void setShowCCRSensors(bool value);
|
void setShowCCRSensors(bool value);
|
||||||
void setZoomedPlot(short value);
|
void setZoomedPlot(bool value);
|
||||||
void setShowSac(short value);
|
void setShowSac(bool value);
|
||||||
void setGfLowAtMaxDepth(bool value);
|
void setGfLowAtMaxDepth(bool value);
|
||||||
void setDisplayUnusedTanks(short value);
|
void setDisplayUnusedTanks(bool value);
|
||||||
void setShowAverageDepth(short value);
|
void setShowAverageDepth(bool value);
|
||||||
void setShowPicturesInProfile(bool value);
|
void setShowPicturesInProfile(bool value);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void modpO2Changed(double value);
|
void modpO2Changed(double value);
|
||||||
void eadChanged(short value);
|
void eadChanged(bool value);
|
||||||
void modChanged(short value);
|
void modChanged(bool value);
|
||||||
void dcceilingChanged(short value);
|
void dcceilingChanged(bool value);
|
||||||
void redceilingChanged(short value);
|
void redceilingChanged(bool value);
|
||||||
void calcceilingChanged(short value);
|
void calcceilingChanged(bool value);
|
||||||
void calcceiling3mChanged(short value);
|
void calcceiling3mChanged(bool value);
|
||||||
void calcalltissuesChanged(short value);
|
void calcalltissuesChanged(bool value);
|
||||||
void calcndlttsChanged(short value);
|
void calcndlttsChanged(bool value);
|
||||||
void gflowChanged(short value);
|
void gflowChanged(bool value);
|
||||||
void gfhighChanged(short value);
|
void gfhighChanged(bool value);
|
||||||
void hrgraphChanged(short value);
|
void hrgraphChanged(bool value);
|
||||||
void tankBarChanged(short value);
|
void tankBarChanged(bool value);
|
||||||
void percentageGraphChanged(short value);
|
void percentageGraphChanged(bool value);
|
||||||
void rulerGraphChanged(short value);
|
void rulerGraphChanged(bool value);
|
||||||
void showCCRSetpointChanged(bool value);
|
void showCCRSetpointChanged(bool value);
|
||||||
void showCCRSensorsChanged(bool value);
|
void showCCRSensorsChanged(bool value);
|
||||||
void zoomedPlotChanged(short value);
|
void zoomedPlotChanged(bool value);
|
||||||
void showSacChanged(short value);
|
void showSacChanged(bool value);
|
||||||
void gfLowAtMaxDepthChanged(bool value);
|
void gfLowAtMaxDepthChanged(bool value);
|
||||||
void displayUnusedTanksChanged(short value);
|
void displayUnusedTanksChanged(bool value);
|
||||||
void showAverageDepthChanged(short value);
|
void showAverageDepthChanged(bool value);
|
||||||
void showPicturesInProfileChanged(bool value);
|
void showPicturesInProfileChanged(bool value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue