aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2014-02-12 14:08:01 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-12 10:29:57 -0800
commit49642cacbce7f7174fb75be011ddf01db912f9bd (patch)
tree2387ddf2fbf24e4d7ebeab1ce220fa36242f78b3
parentb08c38da3330b5dcbefe2a88ef60df27e5bf20a3 (diff)
downloadsubsurface-49642cacbce7f7174fb75be011ddf01db912f9bd.tar.gz
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 <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/profile/profilewidget2.cpp7
1 files changed, 6 insertions, 1 deletions
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);