From 4005ee2ae88000f60839ffead6cdcf07bb598cb5 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Wed, 22 Jan 2014 15:29:25 -0200 Subject: Fix the ZLevel value of some items. Almost all of the items on the new profile were being painted on the same ZLevel, so the level of awesomeness was a bit random. This puts things on the correct spots, events on top of everything, profile at the bottom, things in the middle. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/profile/profilewidget2.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'qt-ui/profile') diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 4b19af1ba..fa41da9f6 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -90,6 +90,7 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) : meanDepth->setLine(0,0,96,0); meanDepth->setX(3); meanDepth->setPen(QPen(QBrush(Qt::red), 0, Qt::SolidLine)); + meanDepth->setZValue(1); cartesianPlane->setBottomAxis(timeAxis); cartesianPlane->setLeftAxis(profileYAxis); @@ -319,6 +320,7 @@ void ProfileWidget2::plotDives(QList dives) diveProfileItem->setModel(dataModel); diveProfileItem->setVerticalDataColumn(DivePlotDataModel::DEPTH); diveProfileItem->setHorizontalDataColumn(DivePlotDataModel::TIME); + diveProfileItem->setZValue(0); scene()->addItem(diveProfileItem); qDeleteAll(eventItems); @@ -347,6 +349,7 @@ void ProfileWidget2::plotDives(QList dives) temperatureItem->setModel(dataModel); temperatureItem->setVerticalDataColumn(DivePlotDataModel::TEMPERATURE); temperatureItem->setHorizontalDataColumn(DivePlotDataModel::TIME); + temperatureItem->setZValue(1); scene()->addItem(temperatureItem); if(gasPressureItem){ @@ -359,6 +362,7 @@ void ProfileWidget2::plotDives(QList dives) gasPressureItem->setModel(dataModel); gasPressureItem->setVerticalDataColumn(DivePlotDataModel::TEMPERATURE); gasPressureItem->setHorizontalDataColumn(DivePlotDataModel::TIME); + gasPressureItem->setZValue(1); scene()->addItem(gasPressureItem); if(diveCeiling){ @@ -371,6 +375,7 @@ void ProfileWidget2::plotDives(QList dives) diveCeiling->setModel(dataModel); diveCeiling->setVerticalDataColumn(DivePlotDataModel::CEILING); diveCeiling->setHorizontalDataColumn(DivePlotDataModel::TIME); + diveCeiling->setZValue(1); scene()->addItem(diveCeiling); diveComputerText->setText(currentdc->model); @@ -385,6 +390,7 @@ void ProfileWidget2::plotDives(QList dives) tissueItem->setModel(dataModel); tissueItem->setVerticalDataColumn(DivePlotDataModel::TISSUE_1 + i); tissueItem->setHorizontalDataColumn(DivePlotDataModel::TIME); + tissueItem->setZValue(1); allTissues.append(tissueItem); scene()->addItem(tissueItem); } @@ -399,6 +405,7 @@ void ProfileWidget2::plotDives(QList dives) reportedCeiling->setModel(dataModel); reportedCeiling->setVerticalDataColumn(DivePlotDataModel::CEILING); reportedCeiling->setHorizontalDataColumn(DivePlotDataModel::TIME); + reportedCeiling->setZValue(1); scene()->addItem(reportedCeiling); emit startProfileState(); } -- cgit v1.2.3-70-g09d2