mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 18:13:24 +00:00
Re-enable more items on the new profile.
Temperature and DC Label. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4882336315
commit
c05575e103
2 changed files with 26 additions and 7 deletions
|
@ -365,7 +365,8 @@ void DiveCartesianPlane::setup()
|
|||
if (!leftAxis || !bottomAxis || !scene())
|
||||
return;
|
||||
|
||||
// This creates a Grid around the axis, creating the cartesian plane.
|
||||
setPen(gridPen());
|
||||
// This creates a Grid around the axis, creating the cartesian plane.
|
||||
const int top = leftAxis->posAtValue(leftAxis->minimum());
|
||||
// unused for now:
|
||||
// const int bottom = leftAxis->posAtValue(leftAxis->maximum());
|
||||
|
|
|
@ -43,6 +43,7 @@ static struct _ItemPos{
|
|||
QLineF expanded;
|
||||
};
|
||||
_Pos background;
|
||||
_Pos dcLabel;
|
||||
_Axis depth;
|
||||
_Axis partialgas;
|
||||
_Axis time;
|
||||
|
@ -221,6 +222,19 @@ void ProfileWidget2::setupItemSizes()
|
|||
itemPos.cylinder.pos.off.setY(20);
|
||||
itemPos.cylinder.expanded.setP1(QPointF(0,0));
|
||||
itemPos.cylinder.expanded.setP2(QPointF(0,20));
|
||||
|
||||
// Temperature axis config
|
||||
itemPos.temperature.pos.on.setX(3);
|
||||
itemPos.temperature.pos.on.setY(40);
|
||||
itemPos.temperature.pos.off.setX(-10);
|
||||
itemPos.temperature.pos.off.setY(40);
|
||||
itemPos.temperature.expanded.setP1(QPointF(0,0));
|
||||
itemPos.temperature.expanded.setP2(QPointF(0,20));
|
||||
|
||||
itemPos.dcLabel.on.setX(3);
|
||||
itemPos.dcLabel.on.setY(97);
|
||||
itemPos.dcLabel.off.setX(-10);
|
||||
itemPos.dcLabel.off.setY(97);
|
||||
}
|
||||
|
||||
void ProfileWidget2::setupItem(AbstractProfilePolygonItem* item, DiveCartesianAxis* hAxis, DiveCartesianAxis* vAxis, DivePlotDataModel* model, int vData, int hData, int zValue)
|
||||
|
@ -311,6 +325,7 @@ void ProfileWidget2::plotDives(QList<dive*> dives)
|
|||
meanDepth->animateMoveTo(3, profileYAxis->posAtValue(pInfo.meandepth));
|
||||
|
||||
dataModel->emitDataChanged();
|
||||
cartesianPlane->setup();
|
||||
// The event items are a bit special since we don't know how many events are going to
|
||||
// exist on a dive, so I cant create cache items for that. that's why they are here
|
||||
// while all other items are up there on the constructor.
|
||||
|
@ -425,9 +440,8 @@ void ProfileWidget2::setEmptyState()
|
|||
timeAxis->setPos(itemPos.time.pos.off);
|
||||
background->setY( itemPos.background.on.y());
|
||||
toolTipItem->setVisible(false);
|
||||
temperatureAxis->setVisible(false);
|
||||
temperatureAxis->setPos(itemPos.temperature.pos.off);
|
||||
cylinderPressureAxis->setPos(itemPos.cylinder.pos.off);
|
||||
temperatureItem->setVisible(false);
|
||||
cartesianPlane->setVisible(false);
|
||||
meanDepth->setVisible(false);
|
||||
diveComputerText->setVisible(false);
|
||||
|
@ -471,10 +485,14 @@ void ProfileWidget2::setProfileState()
|
|||
cylinderPressureAxis->setPos(itemPos.cylinder.pos.on);
|
||||
cylinderPressureAxis->setLine(itemPos.cylinder.expanded);
|
||||
|
||||
// temperatureItem->setVisible(true);
|
||||
// cartesianPlane->setVisible(true);
|
||||
// meanDepth->setVisible(true);
|
||||
// diveComputerText->setVisible(true);
|
||||
temperatureAxis->setPos(itemPos.temperature.pos.on);
|
||||
temperatureAxis->setLine(itemPos.temperature.expanded);
|
||||
|
||||
cartesianPlane->setVisible(true);
|
||||
meanDepth->setVisible(true);
|
||||
diveComputerText->setVisible(true);
|
||||
cartesianPlane->setHorizontalLine( timeAxis->line() );
|
||||
cartesianPlane->setVerticalLine( profileYAxis->line() );
|
||||
// diveCeiling->setVisible(true);
|
||||
// reportedCeiling->setVisible(true);
|
||||
// Q_FOREACH(DiveCalculatedTissue *tissue, allTissues){
|
||||
|
|
Loading…
Add table
Reference in a new issue