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>
This commit is contained in:
Tomaz Canabrava 2014-02-12 14:12:56 -02:00 committed by Dirk Hohndel
parent 49642cacbc
commit 8041a2ed85

View file

@ -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);