From 49642cacbce7f7174fb75be011ddf01db912f9bd Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Wed, 12 Feb 2014 14:08:01 -0200 Subject: Shrink temperature axis when partial pressures are shown. This patch adds shrinking of the Temperature axis when partial pressures are shown. This adds an unwanted side effect however, the axis started showing it's values - and we didn't do that on the gtk version or on the old profile. While this is good for debugging, it's not wanted for the software if it's on release mode. I'll fix that in due time. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/profile/profilewidget2.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index b0c985653..e44895e4a 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -233,6 +233,8 @@ void ProfileWidget2::setupItemSizes() itemPos.temperature.pos.off.setY(40); itemPos.temperature.expanded.setP1(QPointF(0,0)); itemPos.temperature.expanded.setP2(QPointF(0,20)); + itemPos.temperature.shrinked.setP1(QPointF(0,0)); + itemPos.temperature.shrinked.setP2(QPointF(0,10)); itemPos.dcLabel.on.setX(3); itemPos.dcLabel.on.setY(97); @@ -365,8 +367,10 @@ void ProfileWidget2::settingsChanged() s.beginGroup("TecDetails"); if(s.value("phegraph").toBool()|| s.value("po2graph").toBool()|| s.value("pn2graph").toBool()){ profileYAxis->animateChangeLine(itemPos.depth.shrinked); + temperatureAxis->animateChangeLine(itemPos.temperature.shrinked); }else{ profileYAxis->animateChangeLine(itemPos.depth.expanded); + temperatureAxis->animateChangeLine(itemPos.temperature.expanded); } } @@ -492,8 +496,10 @@ void ProfileWidget2::setProfileState() s.beginGroup("TecDetails"); if(s.value("phegraph").toBool()|| s.value("po2graph").toBool()|| s.value("pn2graph").toBool()){ profileYAxis->setLine(itemPos.depth.shrinked); + temperatureAxis->setLine(itemPos.temperature.shrinked); }else{ profileYAxis->setLine(itemPos.depth.expanded); + temperatureAxis->setLine(itemPos.temperature.expanded); } gasYAxis->setPos(itemPos.partialPressure.pos.on); @@ -506,7 +512,6 @@ void ProfileWidget2::setProfileState() cylinderPressureAxis->setLine(itemPos.cylinder.expanded); temperatureAxis->setPos(itemPos.temperature.pos.on); - temperatureAxis->setLine(itemPos.temperature.expanded); cartesianPlane->setVisible(true); meanDepth->setVisible(true); -- cgit v1.2.3-70-g09d2