aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/profile
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2014-02-12 14:12:56 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-12 10:30:45 -0800
commit8041a2ed856f88345032cda7d8b309c52910ed47 (patch)
tree1bccd8179a316315fbb15478767af3043d62455e /qt-ui/profile
parent49642cacbce7f7174fb75be011ddf01db912f9bd (diff)
downloadsubsurface-8041a2ed856f88345032cda7d8b309c52910ed47.tar.gz
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 <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile')
-rw-r--r--qt-ui/profile/profilewidget2.cpp8
1 files changed, 7 insertions, 1 deletions
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);