From 8041a2ed856f88345032cda7d8b309c52910ed47 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Wed, 12 Feb 2014 14:12:56 -0200 Subject: Added cylinder pressure shrinking on show/hide partial pressure. Same as the last commit, but for cylinder pressure. Another bug was spotted, where the mean depth line does not move to the correct location after a axis-size-changed - fixing that on next commit. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/profile/profilewidget2.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'qt-ui/profile') diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index e44895e4a..71fa6512a 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -225,6 +225,8 @@ void ProfileWidget2::setupItemSizes() itemPos.cylinder.pos.off.setY(20); itemPos.cylinder.expanded.setP1(QPointF(0,0)); itemPos.cylinder.expanded.setP2(QPointF(0,20)); + itemPos.cylinder.shrinked.setP1(QPointF(0,0)); + itemPos.cylinder.shrinked.setP2(QPointF(0,10)); // Temperature axis config itemPos.temperature.pos.on.setX(3); @@ -368,9 +370,11 @@ void ProfileWidget2::settingsChanged() if(s.value("phegraph").toBool()|| s.value("po2graph").toBool()|| s.value("pn2graph").toBool()){ profileYAxis->animateChangeLine(itemPos.depth.shrinked); temperatureAxis->animateChangeLine(itemPos.temperature.shrinked); + cylinderPressureAxis->animateChangeLine(itemPos.cylinder.shrinked); }else{ profileYAxis->animateChangeLine(itemPos.depth.expanded); temperatureAxis->animateChangeLine(itemPos.temperature.expanded); + cylinderPressureAxis->animateChangeLine(itemPos.cylinder.expanded); } } @@ -497,9 +501,11 @@ void ProfileWidget2::setProfileState() if(s.value("phegraph").toBool()|| s.value("po2graph").toBool()|| s.value("pn2graph").toBool()){ profileYAxis->setLine(itemPos.depth.shrinked); temperatureAxis->setLine(itemPos.temperature.shrinked); + cylinderPressureAxis->setLine(itemPos.cylinder.shrinked); }else{ profileYAxis->setLine(itemPos.depth.expanded); temperatureAxis->setLine(itemPos.temperature.expanded); + cylinderPressureAxis->setLine(itemPos.cylinder.expanded); } gasYAxis->setPos(itemPos.partialPressure.pos.on); @@ -509,7 +515,7 @@ void ProfileWidget2::setProfileState() timeAxis->setLine(itemPos.time.expanded); cylinderPressureAxis->setPos(itemPos.cylinder.pos.on); - cylinderPressureAxis->setLine(itemPos.cylinder.expanded); + temperatureAxis->setPos(itemPos.temperature.pos.on); -- cgit v1.2.3-70-g09d2