diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2014-01-22 15:29:25 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-01-22 12:30:23 -0800 |
commit | 4005ee2ae88000f60839ffead6cdcf07bb598cb5 (patch) | |
tree | 16ed582d0de0e1a368440042030279a82ecf4a88 /qt-ui/profile | |
parent | 2e2a87e6196428280647085527720564c8e3c563 (diff) | |
download | subsurface-4005ee2ae88000f60839ffead6cdcf07bb598cb5.tar.gz |
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 <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile')
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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<dive*> 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<dive*> 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<dive*> 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<dive*> 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<dive*> 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<dive*> dives) reportedCeiling->setModel(dataModel); reportedCeiling->setVerticalDataColumn(DivePlotDataModel::CEILING); reportedCeiling->setHorizontalDataColumn(DivePlotDataModel::TIME); + reportedCeiling->setZValue(1); scene()->addItem(reportedCeiling); emit startProfileState(); } |