summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Joakim Bygdell <j.bygdell@gmail.com>2015-01-17 19:54:10 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-18 21:26:06 +1200
commit76e3a10f08f20c447c0d93df9a1cc48cb9288c55 (patch)
treedcd7530b7a0140697ecb0fc5db249fc95aa30d03 /qt-ui
parent9bdff95a35b4274bdf5e3bfcba119d494056457c (diff)
downloadsubsurface-76e3a10f08f20c447c0d93df9a1cc48cb9288c55.tar.gz
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>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/profile/profilewidget2.cpp60
1 files changed, 28 insertions, 32 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index 516b14c2f..a390ae6a5 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -55,7 +55,7 @@ static struct _ItemPos {
_Axis temperature;
_Axis temperatureAll;
_Axis heartBeat;
- _Axis heartBeatAll;
+ _Axis heartBeatWithTankBar;
} itemPos;
ProfileWidget2::ProfileWidget2(QWidget *parent) : QGraphicsView(parent),
@@ -396,13 +396,11 @@ void ProfileWidget2::setupItemSizes()
// Heartbeat axis config
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.setP2(QPointF(0, 10));
- itemPos.heartBeatAll = itemPos.heartBeat;
- itemPos.heartBeatAll.pos.on.setX(3);
- itemPos.heartBeatAll.pos.on.setY(55);
- itemPos.heartBeatAll.expanded.setP2(QPointF(0, 7));
+ itemPos.heartBeatWithTankBar = itemPos.heartBeat;
+ itemPos.heartBeatWithTankBar.expanded.setP2(QPointF(0, 7));
// Percentage axis config
itemPos.percentage.pos.on.setX(3);
@@ -635,7 +633,7 @@ void ProfileWidget2::settingsChanged()
// if we are showing calculated ceilings then we have to replot()
// because the GF could have changed; otherwise we try to avoid replot()
bool needReplot = prefs.calcceiling;
- if (prefs.percentagegraph && PP_GRAPHS_ENABLED) {
+ if ((prefs.percentagegraph||prefs.hrgraph) && PP_GRAPHS_ENABLED) {
profileYAxis->animateChangeLine(itemPos.depth.shrinked);
temperatureAxis->setPos(itemPos.temperatureAll.pos.on);
temperatureAxis->animateChangeLine(itemPos.temperature.shrinked);
@@ -644,37 +642,36 @@ void ProfileWidget2::settingsChanged()
if (prefs.tankbar) {
percentageAxis->setPos(itemPos.percentageWithTankBar.pos.on);
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->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->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) {
profileYAxis->animateChangeLine(itemPos.depth.intermediate);
temperatureAxis->setPos(itemPos.temperature.pos.on);
temperatureAxis->animateChangeLine(itemPos.temperature.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) {
percentageAxis->setPos(itemPos.percentageWithTankBar.pos.on);
percentageAxis->animateChangeLine(itemPos.percentageWithTankBar.expanded);
gasYAxis->setPos(itemPos.partialPressureWithTankBar.pos.on);
gasYAxis->setLine(itemPos.partialPressureWithTankBar.expanded);
+ heartBeatAxis->setPos(itemPos.heartBeatWithTankBar.pos.on);
+ heartBeatAxis->animateChangeLine(itemPos.heartBeatWithTankBar.expanded);
} else {
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->animateChangeLine(itemPos.heartBeat.expanded);
}
} else {
profileYAxis->animateChangeLine(itemPos.depth.expanded);
@@ -907,7 +904,7 @@ void ProfileWidget2::setProfileState()
cylinderPressureAxis->setVisible(true);
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);
temperatureAxis->setPos(itemPos.temperatureAll.pos.on);
temperatureAxis->animateChangeLine(itemPos.temperature.shrinked);
@@ -916,37 +913,36 @@ void ProfileWidget2::setProfileState()
if (prefs.tankbar) {
percentageAxis->setPos(itemPos.percentageWithTankBar.pos.on);
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->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->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) {
profileYAxis->animateChangeLine(itemPos.depth.intermediate);
temperatureAxis->setPos(itemPos.temperature.pos.on);
temperatureAxis->animateChangeLine(itemPos.temperature.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) {
percentageAxis->setPos(itemPos.percentageWithTankBar.pos.on);
percentageAxis->animateChangeLine(itemPos.percentageWithTankBar.expanded);
gasYAxis->setPos(itemPos.partialPressureWithTankBar.pos.on);
gasYAxis->setLine(itemPos.partialPressureWithTankBar.expanded);
+ heartBeatAxis->setPos(itemPos.heartBeatWithTankBar.pos.on);
+ heartBeatAxis->animateChangeLine(itemPos.heartBeatWithTankBar.expanded);
} else {
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->animateChangeLine(itemPos.heartBeat.expanded);
}
} else {
profileYAxis->animateChangeLine(itemPos.depth.expanded);