mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Move the heart rate graph
Move the heart rate graph down to the same space as the tissue saturation graph so that it does not overlap with temperature or partial pressures. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
9bdff95a35
commit
76e3a10f08
1 changed files with 28 additions and 32 deletions
|
@ -55,7 +55,7 @@ static struct _ItemPos {
|
||||||
_Axis temperature;
|
_Axis temperature;
|
||||||
_Axis temperatureAll;
|
_Axis temperatureAll;
|
||||||
_Axis heartBeat;
|
_Axis heartBeat;
|
||||||
_Axis heartBeatAll;
|
_Axis heartBeatWithTankBar;
|
||||||
} itemPos;
|
} itemPos;
|
||||||
|
|
||||||
ProfileWidget2::ProfileWidget2(QWidget *parent) : QGraphicsView(parent),
|
ProfileWidget2::ProfileWidget2(QWidget *parent) : QGraphicsView(parent),
|
||||||
|
@ -396,13 +396,11 @@ void ProfileWidget2::setupItemSizes()
|
||||||
|
|
||||||
// Heartbeat axis config
|
// Heartbeat axis config
|
||||||
itemPos.heartBeat.pos.on.setX(3);
|
itemPos.heartBeat.pos.on.setX(3);
|
||||||
itemPos.heartBeat.pos.on.setY(65);
|
itemPos.heartBeat.pos.on.setY(82);
|
||||||
itemPos.heartBeat.expanded.setP1(QPointF(0, 0));
|
itemPos.heartBeat.expanded.setP1(QPointF(0, 0));
|
||||||
itemPos.heartBeat.expanded.setP2(QPointF(0, 10));
|
itemPos.heartBeat.expanded.setP2(QPointF(0, 10));
|
||||||
itemPos.heartBeatAll = itemPos.heartBeat;
|
itemPos.heartBeatWithTankBar = itemPos.heartBeat;
|
||||||
itemPos.heartBeatAll.pos.on.setX(3);
|
itemPos.heartBeatWithTankBar.expanded.setP2(QPointF(0, 7));
|
||||||
itemPos.heartBeatAll.pos.on.setY(55);
|
|
||||||
itemPos.heartBeatAll.expanded.setP2(QPointF(0, 7));
|
|
||||||
|
|
||||||
// Percentage axis config
|
// Percentage axis config
|
||||||
itemPos.percentage.pos.on.setX(3);
|
itemPos.percentage.pos.on.setX(3);
|
||||||
|
@ -635,7 +633,7 @@ void ProfileWidget2::settingsChanged()
|
||||||
// if we are showing calculated ceilings then we have to replot()
|
// if we are showing calculated ceilings then we have to replot()
|
||||||
// because the GF could have changed; otherwise we try to avoid replot()
|
// because the GF could have changed; otherwise we try to avoid replot()
|
||||||
bool needReplot = prefs.calcceiling;
|
bool needReplot = prefs.calcceiling;
|
||||||
if (prefs.percentagegraph && PP_GRAPHS_ENABLED) {
|
if ((prefs.percentagegraph||prefs.hrgraph) && PP_GRAPHS_ENABLED) {
|
||||||
profileYAxis->animateChangeLine(itemPos.depth.shrinked);
|
profileYAxis->animateChangeLine(itemPos.depth.shrinked);
|
||||||
temperatureAxis->setPos(itemPos.temperatureAll.pos.on);
|
temperatureAxis->setPos(itemPos.temperatureAll.pos.on);
|
||||||
temperatureAxis->animateChangeLine(itemPos.temperature.shrinked);
|
temperatureAxis->animateChangeLine(itemPos.temperature.shrinked);
|
||||||
|
@ -644,37 +642,36 @@ void ProfileWidget2::settingsChanged()
|
||||||
if (prefs.tankbar) {
|
if (prefs.tankbar) {
|
||||||
percentageAxis->setPos(itemPos.percentageWithTankBar.pos.on);
|
percentageAxis->setPos(itemPos.percentageWithTankBar.pos.on);
|
||||||
percentageAxis->animateChangeLine(itemPos.percentageWithTankBar.expanded);
|
percentageAxis->animateChangeLine(itemPos.percentageWithTankBar.expanded);
|
||||||
} else {
|
heartBeatAxis->setPos(itemPos.heartBeatWithTankBar.pos.on);
|
||||||
|
heartBeatAxis->animateChangeLine(itemPos.heartBeatWithTankBar.expanded);
|
||||||
|
}else {
|
||||||
percentageAxis->setPos(itemPos.percentage.pos.on);
|
percentageAxis->setPos(itemPos.percentage.pos.on);
|
||||||
percentageAxis->setLine(itemPos.percentage.expanded);
|
percentageAxis->animateChangeLine(itemPos.percentage.expanded);
|
||||||
|
heartBeatAxis->setPos(itemPos.heartBeat.pos.on);
|
||||||
|
heartBeatAxis->animateChangeLine(itemPos.heartBeat.expanded);
|
||||||
}
|
}
|
||||||
gasYAxis->setPos(itemPos.partialPressureTissue.pos.on);
|
gasYAxis->setPos(itemPos.partialPressureTissue.pos.on);
|
||||||
gasYAxis->animateChangeLine(itemPos.partialPressureTissue.expanded);
|
gasYAxis->animateChangeLine(itemPos.partialPressureTissue.expanded);
|
||||||
if (prefs.hrgraph) {
|
|
||||||
heartBeatAxis->setPos(itemPos.heartBeatAll.pos.on);
|
|
||||||
heartBeatAxis->setLine(itemPos.heartBeatAll.expanded);
|
|
||||||
}
|
|
||||||
} else if (PP_GRAPHS_ENABLED || prefs.hrgraph || prefs.percentagegraph) {
|
} else if (PP_GRAPHS_ENABLED || prefs.hrgraph || prefs.percentagegraph) {
|
||||||
profileYAxis->animateChangeLine(itemPos.depth.intermediate);
|
profileYAxis->animateChangeLine(itemPos.depth.intermediate);
|
||||||
temperatureAxis->setPos(itemPos.temperature.pos.on);
|
temperatureAxis->setPos(itemPos.temperature.pos.on);
|
||||||
temperatureAxis->animateChangeLine(itemPos.temperature.intermediate);
|
temperatureAxis->animateChangeLine(itemPos.temperature.intermediate);
|
||||||
cylinderPressureAxis->animateChangeLine(itemPos.cylinder.intermediate);
|
cylinderPressureAxis->animateChangeLine(itemPos.cylinder.intermediate);
|
||||||
gasYAxis->setPos(itemPos.partialPressure.pos.on);
|
|
||||||
gasYAxis->animateChangeLine(itemPos.partialPressure.expanded);
|
|
||||||
percentageAxis->setPos(itemPos.percentage.pos.on);
|
|
||||||
percentageAxis->setLine(itemPos.percentage.expanded);
|
|
||||||
heartBeatAxis->setPos(itemPos.heartBeat.pos.on);
|
|
||||||
heartBeatAxis->setLine(itemPos.heartBeat.expanded);
|
|
||||||
if (prefs.tankbar) {
|
if (prefs.tankbar) {
|
||||||
percentageAxis->setPos(itemPos.percentageWithTankBar.pos.on);
|
percentageAxis->setPos(itemPos.percentageWithTankBar.pos.on);
|
||||||
percentageAxis->animateChangeLine(itemPos.percentageWithTankBar.expanded);
|
percentageAxis->animateChangeLine(itemPos.percentageWithTankBar.expanded);
|
||||||
gasYAxis->setPos(itemPos.partialPressureWithTankBar.pos.on);
|
gasYAxis->setPos(itemPos.partialPressureWithTankBar.pos.on);
|
||||||
gasYAxis->setLine(itemPos.partialPressureWithTankBar.expanded);
|
gasYAxis->setLine(itemPos.partialPressureWithTankBar.expanded);
|
||||||
|
heartBeatAxis->setPos(itemPos.heartBeatWithTankBar.pos.on);
|
||||||
|
heartBeatAxis->animateChangeLine(itemPos.heartBeatWithTankBar.expanded);
|
||||||
} else {
|
} else {
|
||||||
gasYAxis->setPos(itemPos.partialPressure.pos.on);
|
gasYAxis->setPos(itemPos.partialPressure.pos.on);
|
||||||
gasYAxis->animateChangeLine(itemPos.partialPressure.expanded);
|
gasYAxis->animateChangeLine(itemPos.partialPressure.expanded);
|
||||||
percentageAxis->setPos(itemPos.percentage.pos.on);
|
percentageAxis->setPos(itemPos.percentage.pos.on);
|
||||||
percentageAxis->setLine(itemPos.percentage.expanded);
|
percentageAxis->setLine(itemPos.percentage.expanded);
|
||||||
|
heartBeatAxis->setPos(itemPos.heartBeat.pos.on);
|
||||||
|
heartBeatAxis->animateChangeLine(itemPos.heartBeat.expanded);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
profileYAxis->animateChangeLine(itemPos.depth.expanded);
|
profileYAxis->animateChangeLine(itemPos.depth.expanded);
|
||||||
|
@ -907,7 +904,7 @@ void ProfileWidget2::setProfileState()
|
||||||
cylinderPressureAxis->setVisible(true);
|
cylinderPressureAxis->setVisible(true);
|
||||||
|
|
||||||
profileYAxis->setPos(itemPos.depth.pos.on);
|
profileYAxis->setPos(itemPos.depth.pos.on);
|
||||||
if (prefs.percentagegraph && PP_GRAPHS_ENABLED) {
|
if ((prefs.percentagegraph||prefs.hrgraph) && PP_GRAPHS_ENABLED) {
|
||||||
profileYAxis->animateChangeLine(itemPos.depth.shrinked);
|
profileYAxis->animateChangeLine(itemPos.depth.shrinked);
|
||||||
temperatureAxis->setPos(itemPos.temperatureAll.pos.on);
|
temperatureAxis->setPos(itemPos.temperatureAll.pos.on);
|
||||||
temperatureAxis->animateChangeLine(itemPos.temperature.shrinked);
|
temperatureAxis->animateChangeLine(itemPos.temperature.shrinked);
|
||||||
|
@ -916,37 +913,36 @@ void ProfileWidget2::setProfileState()
|
||||||
if (prefs.tankbar) {
|
if (prefs.tankbar) {
|
||||||
percentageAxis->setPos(itemPos.percentageWithTankBar.pos.on);
|
percentageAxis->setPos(itemPos.percentageWithTankBar.pos.on);
|
||||||
percentageAxis->animateChangeLine(itemPos.percentageWithTankBar.expanded);
|
percentageAxis->animateChangeLine(itemPos.percentageWithTankBar.expanded);
|
||||||
} else {
|
heartBeatAxis->setPos(itemPos.heartBeatWithTankBar.pos.on);
|
||||||
|
heartBeatAxis->animateChangeLine(itemPos.heartBeatWithTankBar.expanded);
|
||||||
|
}else {
|
||||||
percentageAxis->setPos(itemPos.percentage.pos.on);
|
percentageAxis->setPos(itemPos.percentage.pos.on);
|
||||||
percentageAxis->setLine(itemPos.percentage.expanded);
|
percentageAxis->animateChangeLine(itemPos.percentage.expanded);
|
||||||
|
heartBeatAxis->setPos(itemPos.heartBeat.pos.on);
|
||||||
|
heartBeatAxis->animateChangeLine(itemPos.heartBeat.expanded);
|
||||||
}
|
}
|
||||||
gasYAxis->setPos(itemPos.partialPressureTissue.pos.on);
|
gasYAxis->setPos(itemPos.partialPressureTissue.pos.on);
|
||||||
gasYAxis->animateChangeLine(itemPos.partialPressureTissue.expanded);
|
gasYAxis->animateChangeLine(itemPos.partialPressureTissue.expanded);
|
||||||
if (prefs.hrgraph) {
|
|
||||||
heartBeatAxis->setPos(itemPos.heartBeatAll.pos.on);
|
|
||||||
heartBeatAxis->setLine(itemPos.heartBeatAll.expanded);
|
|
||||||
}
|
|
||||||
} else if (PP_GRAPHS_ENABLED || prefs.hrgraph || prefs.percentagegraph) {
|
} else if (PP_GRAPHS_ENABLED || prefs.hrgraph || prefs.percentagegraph) {
|
||||||
profileYAxis->animateChangeLine(itemPos.depth.intermediate);
|
profileYAxis->animateChangeLine(itemPos.depth.intermediate);
|
||||||
temperatureAxis->setPos(itemPos.temperature.pos.on);
|
temperatureAxis->setPos(itemPos.temperature.pos.on);
|
||||||
temperatureAxis->animateChangeLine(itemPos.temperature.intermediate);
|
temperatureAxis->animateChangeLine(itemPos.temperature.intermediate);
|
||||||
cylinderPressureAxis->animateChangeLine(itemPos.cylinder.intermediate);
|
cylinderPressureAxis->animateChangeLine(itemPos.cylinder.intermediate);
|
||||||
gasYAxis->setPos(itemPos.partialPressure.pos.on);
|
|
||||||
gasYAxis->animateChangeLine(itemPos.partialPressure.expanded);
|
|
||||||
percentageAxis->setPos(itemPos.percentage.pos.on);
|
|
||||||
percentageAxis->setLine(itemPos.percentage.expanded);
|
|
||||||
heartBeatAxis->setPos(itemPos.heartBeat.pos.on);
|
|
||||||
heartBeatAxis->setLine(itemPos.heartBeat.expanded);
|
|
||||||
if (prefs.tankbar) {
|
if (prefs.tankbar) {
|
||||||
percentageAxis->setPos(itemPos.percentageWithTankBar.pos.on);
|
percentageAxis->setPos(itemPos.percentageWithTankBar.pos.on);
|
||||||
percentageAxis->animateChangeLine(itemPos.percentageWithTankBar.expanded);
|
percentageAxis->animateChangeLine(itemPos.percentageWithTankBar.expanded);
|
||||||
gasYAxis->setPos(itemPos.partialPressureWithTankBar.pos.on);
|
gasYAxis->setPos(itemPos.partialPressureWithTankBar.pos.on);
|
||||||
gasYAxis->setLine(itemPos.partialPressureWithTankBar.expanded);
|
gasYAxis->setLine(itemPos.partialPressureWithTankBar.expanded);
|
||||||
|
heartBeatAxis->setPos(itemPos.heartBeatWithTankBar.pos.on);
|
||||||
|
heartBeatAxis->animateChangeLine(itemPos.heartBeatWithTankBar.expanded);
|
||||||
} else {
|
} else {
|
||||||
gasYAxis->setPos(itemPos.partialPressure.pos.on);
|
gasYAxis->setPos(itemPos.partialPressure.pos.on);
|
||||||
gasYAxis->animateChangeLine(itemPos.partialPressure.expanded);
|
gasYAxis->animateChangeLine(itemPos.partialPressure.expanded);
|
||||||
percentageAxis->setPos(itemPos.percentage.pos.on);
|
percentageAxis->setPos(itemPos.percentage.pos.on);
|
||||||
percentageAxis->setLine(itemPos.percentage.expanded);
|
percentageAxis->setLine(itemPos.percentage.expanded);
|
||||||
|
heartBeatAxis->setPos(itemPos.heartBeat.pos.on);
|
||||||
|
heartBeatAxis->animateChangeLine(itemPos.heartBeat.expanded);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
profileYAxis->animateChangeLine(itemPos.depth.expanded);
|
profileYAxis->animateChangeLine(itemPos.depth.expanded);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue